]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
CAM5200 flash driver modifications:
authorMarian Balakowicz <m8@semihalf.com>
Tue, 9 Jan 2007 23:26:15 +0000 (00:26 +0100)
committerMarian Balakowicz <m8@semihalf.com>
Tue, 9 Jan 2007 23:26:15 +0000 (00:26 +0100)
- use CFI driver (replaces custom flash driver) for main 'cam5200' target
- add second build target 'cam5200_niosflash' which still uses custom driver

Makefile
board/tqm5200/cam5200_flash.c
include/configs/TQM5200.h

index a973dffc52a03f5b903a72fe213199ec8467a3d9..0cad2263acd9ac43574022079a35bf2c70592406 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -557,6 +557,7 @@ Total5200_Rev2_lowboot_config:      unconfig
        @$(MKCONFIG) -a Total5200 ppc mpc5xxx total5200
 
 cam5200_config \
+cam5200_niosflash_config \
 fo300_config \
 MiniFAP_config \
 TQM5200S_config \
@@ -574,6 +575,10 @@ TQM5200_STK100_config:     unconfig
                  echo "#define CONFIG_TQM5200_B"       >>$(obj)include/config.h ; \
                  echo "... TQM5200S on Cam5200" ; \
                }
+       @[ -z "$(findstring niosflash,$@)" ] || \
+               { echo "#define CONFIG_CAM5200_NIOSFLASH"       >>$(obj)include/config.h ; \
+                 echo "... with NIOS flash driver" ; \
+               }
        @[ -z "$(findstring fo300,$@)" ] || \
                { echo "#define CONFIG_FO300"   >>$(obj)include/config.h ; \
                  echo "... TQM5200 on FO300" ; \
index 8c3f62e398cef2d15e939498cc3da910e3aa01f4..b3f095d807f3366af1412f6b04f77f94f4602bbc 100644 (file)
@@ -25,7 +25,7 @@
 #include <mpc5xxx.h>
 #include <asm/processor.h>
 
-#ifdef CONFIG_CAM5200
+#if defined(CONFIG_CAM5200) && defined(CONFIG_CAM5200_NIOSFLASH)
 
 #if 0
 #define DEBUGF(x...) printf(x)
@@ -783,4 +783,4 @@ unsigned long flash_init(void)
 
        return total_b;
 }
-#endif /* ifdef CONFIG_CAM5200 */
+#endif /* if defined(CONFIG_CAM5200) && defined(CONFIG_CAM5200_NIOSFLASH) */
index 08674ca49f5caa3ed9d43c711fca1d56d1b46297..15906a0a379550d03daf15acbc1b6dfe7fc92829 100644 (file)
  */
 #define CFG_FLASH_BASE         0xFC000000
 
-#ifndef CONFIG_CAM5200
-/* use CFI flash driver */
-#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
-#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
-#define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
-#define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks
-                                          (= chip selects) */
-#define CFG_MAX_FLASH_SECT     512     /* max num of sects on one chip */
-#else /* CONFIG_CAM5200 */
+#if defined(CONFIG_CAM5200) && defined(CONFIG_CAM5200_NIOSFLASH)
 #define CFG_MAX_FLASH_BANKS    2       /* max num of flash banks
                                           (= chip selects) */
 #define CFG_FLASH_WORD_SIZE    unsigned int /* main flash device with */
 #define CFG_FLASH_ADDR1                0x2AA
 #define CFG_FLASH_2ND_16BIT_DEV        1       /* NIOS flash is a 16bit device */
 #define CFG_MAX_FLASH_SECT     128
-#endif /* ifndef CONFIG_CAM5200 */
+#else
+/* use CFI flash driver */
+#define CFG_FLASH_CFI          1       /* Flash is CFI conformant */
+#define CFG_FLASH_CFI_DRIVER   1       /* Use the common driver */
+#define CFG_FLASH_BANKS_LIST   { CFG_BOOTCS_START }
+#define CFG_MAX_FLASH_BANKS    1       /* max num of flash banks
+                                          (= chip selects) */
+#define CFG_MAX_FLASH_SECT     512     /* max num of sects on one chip */
+#endif
 
 #define CFG_FLASH_EMPTY_INFO
 #define CFG_FLASH_SIZE         0x04000000 /* 64 MByte */