diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-08-13 01:40:42 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-08-13 01:40:42 +0200 |
commit | 00b1883a4cac59d97cd297b1a3a398db85982865 (patch) | |
tree | 441d91dc472d200c0428b5370bbcc8a110b78e34 /drivers/mtd | |
parent | 7ba44a5521cdb7fa1c72864025cde1e21a6f6921 (diff) | |
download | u-boot-imx-00b1883a4cac59d97cd297b1a3a398db85982865.zip u-boot-imx-00b1883a4cac59d97cd297b1a3a398db85982865.tar.gz u-boot-imx-00b1883a4cac59d97cd297b1a3a398db85982865.tar.bz2 |
drivers/mtd: Move conditional compilation to Makefile
rename CFG_FLASH_CFI_DRIVER to CONFIG_FLASH_CFI_DRIVER
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/Makefile | 6 | ||||
-rw-r--r-- | drivers/mtd/at45.c | 3 | ||||
-rw-r--r-- | drivers/mtd/cfi_flash.c | 3 | ||||
-rw-r--r-- | drivers/mtd/mw_eeprom.c | 5 |
4 files changed, 3 insertions, 14 deletions
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index ff932a1..6538f7a 100644 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -25,11 +25,11 @@ include $(TOPDIR)/config.mk LIB := $(obj)libmtd.a -COBJS-y += at45.o -COBJS-y += cfi_flash.o +COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o +COBJS-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o -COBJS-y += mw_eeprom.o COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o +COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/mtd/at45.c b/drivers/mtd/at45.c index a9d13ff..d1a60aa 100644 --- a/drivers/mtd/at45.c +++ b/drivers/mtd/at45.c @@ -20,8 +20,6 @@ #include <config.h> #include <common.h> - -#ifdef CONFIG_HAS_DATAFLASH #include <dataflash.h> /* @@ -559,4 +557,3 @@ int AT91F_DataflashProbe(int cs, AT91PS_DataflashDesc pDesc) AT91F_DataFlashGetStatus(pDesc); return ((pDesc->command[1] == 0xFF) ? 0 : pDesc->command[1] & 0x3C); } -#endif diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 479075c..402d835 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -39,7 +39,6 @@ #include <asm/io.h> #include <asm/byteorder.h> #include <environment.h> -#ifdef CFG_FLASH_CFI_DRIVER /* * This file implements a Common Flash Interface (CFI) driver for @@ -2015,5 +2014,3 @@ unsigned long flash_init (void) #endif return (size); } - -#endif /* CFG_FLASH_CFI */ diff --git a/drivers/mtd/mw_eeprom.c b/drivers/mtd/mw_eeprom.c index 2b33488..f32ced4 100644 --- a/drivers/mtd/mw_eeprom.c +++ b/drivers/mtd/mw_eeprom.c @@ -1,9 +1,6 @@ /* Three-wire (MicroWire) serial eeprom driver (for 93C46 and compatibles) */ #include <common.h> - -#ifdef CONFIG_MW_EEPROM - #include <ssi.h> /* @@ -237,5 +234,3 @@ int mw_eeprom_probe(int dev) } return 0; } - -#endif |