Merge branch 'master' of git://git.denx.de/u-boot-sh
[oweals/u-boot.git] / Makefile
index 4dafd2ba17b9a6fd05e03bcacfe4989e4b00a72b..7ef7df9437b89c2f9ac4a5bede81d832d18b5dd3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2592,17 +2592,63 @@ afeb9260_config:        unconfig
 at91cap9adk_config     :       unconfig
        @$(MKCONFIG) $(@:_config=) arm arm926ejs at91cap9adk atmel at91
 
+at91sam9260ek_nandflash_config \
+at91sam9260ek_dataflash_cs0_config \
+at91sam9260ek_dataflash_cs1_config \
 at91sam9260ek_config   :       unconfig
-       @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9260ek atmel at91
+       @if [ "$(findstring _nandflash,$@)" ] ; then \
+               echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in NAND FLASH" ; \
+       elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
+               echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1"   >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \
+       else \
+               echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1"   >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in SPI DATAFLASH CS1" ; \
+       fi;
+       @$(MKCONFIG) -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
 
+at91sam9261ek_nandflash_config \
+at91sam9261ek_dataflash_cs0_config \
+at91sam9261ek_dataflash_cs3_config \
 at91sam9261ek_config   :       unconfig
-       @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9261ek atmel at91
+       @if [ "$(findstring _nandflash,$@)" ] ; then \
+               echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in NAND FLASH" ; \
+       elif [ "$(findstring dataflash_cs3,$@)" ] ; then \
+               echo "#define CONFIG_SYS_USE_DATAFLASH_CS3 1"   >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in SPI DATAFLASH CS3" ; \
+       else \
+               echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1"   >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \
+       fi;
+       @$(MKCONFIG) -a at91sam9261ek arm arm926ejs at91sam9261ek atmel at91
 
+at91sam9263ek_nandflash_config \
+at91sam9263ek_dataflash_config \
+at91sam9263ek_dataflash_cs0_config \
 at91sam9263ek_config   :       unconfig
-       @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9263ek atmel at91
+       @if [ "$(findstring _nandflash,$@)" ] ; then \
+               echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in NAND FLASH" ; \
+       else \
+               echo "#define CONFIG_SYS_USE_DATAFLASH 1"       >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \
+       fi;
+       @$(MKCONFIG) -a at91sam9263ek arm arm926ejs at91sam9263ek atmel at91
 
+at91sam9rlek_nandflash_config \
+at91sam9rlek_dataflash_config \
+at91sam9rlek_dataflash_cs0_config \
 at91sam9rlek_config    :       unconfig
-       @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9rlek atmel at91
+       @if [ "$(findstring _nandflash,$@)" ] ; then \
+               echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in NAND FLASH" ; \
+       else \
+               echo "#define CONFIG_SYS_USE_DATAFLASH 1"       >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \
+       fi;
+       @$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
 ########################################################################
 ## ARM Integrator boards - see doc/README-integrator for more info.
@@ -3107,11 +3153,6 @@ suzaku_config:   unconfig
        @echo "#define CONFIG_SUZAKU 1" > $(obj)include/config.h
        @$(MKCONFIG) -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno
 
-xupv2p_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_XUPV2P 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $(@:_config=) microblaze microblaze xupv2p xilinx
-
 #========================================================================
 # Blackfin
 #========================================================================
@@ -3164,7 +3205,7 @@ mimc200_config            :       unconfig
 rsk7203_config: unconfig
        @ >include/config.h
        @echo "#define CONFIG_RSK7203 1" >> include/config.h
-       @./mkconfig -a $(@:_config=) sh sh2 rsk7203 renesas
+       @$(MKCONFIG) -a $(@:_config=) sh sh2 rsk7203 renesas
 
 #########################################################################
 ## sh3 (Renesas SuperH)
@@ -3187,7 +3228,7 @@ ms7720se_config: unconfig
 MigoR_config :       unconfig
        @mkdir -p $(obj)include
        @echo "#define CONFIG_MIGO_R 1" > $(obj)include/config.h
-       @./mkconfig -a $(@:_config=) sh sh4 MigoR renesas
+       @$(MKCONFIG) -a $(@:_config=) sh sh4 MigoR renesas
 
 ms7750se_config: unconfig
        @mkdir -p $(obj)include