]> git.sur5r.net Git - u-boot/commitdiff
sdhc_boot: Introduce CONFIG_FSL_FIXED_MMC_LOCATION option
authorFabio Estevam <festevam@gmail.com>
Wed, 11 Jan 2012 09:20:50 +0000 (09:20 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sun, 12 Feb 2012 09:11:25 +0000 (10:11 +0100)
Since commit 97039ab98 (env_mmc: Allow board code to override the environment address)
mmc_get_env_addr is a weak-aliased function in common/env_mmc.c

The mmc_get_env_addr implementation that exists at
board/freescale/common/sdhc_boot.c is meant to be used only for PowerPC boards,
but currently it is being used for all platforms that have CONFIG_ENV_IS_IN_MMC defined.

Introduce CONFIG_FSL_FIXED_MMC_LOCATION so that the boards that need to use
the mmc_get_env_addr version from board/freescale/common/sdhc_boot.c could activate
this config option on their board file.

This fixes the retrieval of CONFIG_ENV_OFFSET on non-PowerPC boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefano Babic <sbabic@denx.de>
board/freescale/common/Makefile
include/configs/MPC8536DS.h
include/configs/P1010RDB.h
include/configs/P1_P2_RDB.h
include/configs/P2020COME.h
include/configs/P2020DS.h
include/configs/P2041RDB.h
include/configs/corenet_ds.h
include/configs/p1_p2_rdb_pc.h

index 9077aaf106cd4c8c59b96443b6dc5635636f7bb6..0b40dc7bf72d008f86ba89e7790d11f269e048b4 100644 (file)
@@ -39,7 +39,7 @@ COBJS-$(CONFIG_PQ_MDS_PIB)    += pq-mds-pib.o
 COBJS-$(CONFIG_ID_EEPROM)      += sys_eeprom.o
 COBJS-$(CONFIG_FSL_SGMII_RISER)        += sgmii_riser.o
 ifndef CONFIG_RAMBOOT_PBL
-COBJS-$(CONFIG_ENV_IS_IN_MMC)  += sdhc_boot.o
+COBJS-$(CONFIG_FSL_FIXED_MMC_LOCATION) += sdhc_boot.o
 endif
 
 COBJS-$(CONFIG_MPC8541CDS)     += cds_pci_ft.o
index 16db98fe57cc09ade05355328ed085d32922d0f6..c26cb639b3ec2aac4b1c36ad96f9801e7c3338d6 100644 (file)
 #define CONFIG_ENV_SECT_SIZE   0x10000
 #elif defined(CONFIG_RAMBOOT_SDCARD)
 #define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_FSL_FIXED_MMC_LOCATION
 #define CONFIG_ENV_SIZE                0x2000
 #define CONFIG_SYS_MMC_ENV_DEV  0
 #else
index af4609f841393a407287885232811108f239e24e..5edd1aad3428c619b3996569299a82c0943cbd4b 100644 (file)
@@ -609,6 +609,7 @@ extern unsigned long get_sdram_size(void);
 #if defined(CONFIG_SYS_RAMBOOT)
 #if defined(CONFIG_RAMBOOT_SDCARD)
 #define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_FSL_FIXED_MMC_LOCATION
 #define CONFIG_SYS_MMC_ENV_DEV         0
 #define CONFIG_ENV_SIZE                        0x2000
 #elif defined(CONFIG_RAMBOOT_SPIFLASH)
index cee788ab1310c4f070d7f4524f34e99c9670b275..2ac93be4ec59c277dfa3bdf62dd1dde01eb42cc3 100644 (file)
@@ -518,6 +518,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
        #define CONFIG_ENV_OFFSET       ((512 * 1024) + CONFIG_SYS_NAND_BLOCK_SIZE)
 #elif defined(CONFIG_RAMBOOT_SDCARD)
 #define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_FSL_FIXED_MMC_LOCATION
 #define CONFIG_ENV_SIZE                        0x2000
 #define CONFIG_SYS_MMC_ENV_DEV         0
 #elif defined(CONFIG_RAMBOOT_SPIFLASH)
index cf20d2b2eee2bf5444da0b9ea1db3ba50b8e4d4c..365322c6a59788bffaa4cfc3e3a8cdeae74057f8 100644 (file)
@@ -350,6 +350,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
  */
 #if defined(CONFIG_RAMBOOT_SDCARD)
        #define CONFIG_ENV_IS_IN_MMC    1
+       #define CONFIG_FSL_FIXED_MMC_LOCATION
        #define CONFIG_ENV_SIZE         0x2000
        #define CONFIG_SYS_MMC_ENV_DEV  0
 #elif defined(CONFIG_RAMBOOT_SPIFLASH)
index 2d9657a15347d5c038bc38ebf80a8cea2ead245b..f0eb0294aa72568740ce4bd5180a351c41b79ef6 100644 (file)
  */
 #if defined(CONFIG_SDCARD)
 #define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_FSL_FIXED_MMC_LOCATION
 #define CONFIG_ENV_SIZE                        0x2000
 #define CONFIG_SYS_MMC_ENV_DEV         0
 #elif defined(CONFIG_SPIFLASH)
index a48055e2c5e9d19b1bd4d242775a54be8f18831f..da98f8f027481cda6336239580031c2df693ff31 100644 (file)
@@ -92,6 +92,7 @@
 #elif defined(CONFIG_SDCARD)
        #define CONFIG_SYS_EXTRA_ENV_RELOC
        #define CONFIG_ENV_IS_IN_MMC
+       #define CONFIG_FSL_FIXED_MMC_LOCATION
        #define CONFIG_SYS_MMC_ENV_DEV          0
        #define CONFIG_ENV_SIZE                 0x2000
        #define CONFIG_ENV_OFFSET               (512 * 1097)
index 7925b9583890e865a7ee5039739570ca4c1a7691..77dd0a2d1e199a9b0a561a99071fcec89a898189 100644 (file)
@@ -88,6 +88,7 @@
 #elif defined(CONFIG_SDCARD)
 #define CONFIG_SYS_EXTRA_ENV_RELOC
 #define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_FSL_FIXED_MMC_LOCATION
 #define CONFIG_SYS_MMC_ENV_DEV          0
 #define CONFIG_ENV_SIZE                        0x2000
 #define CONFIG_ENV_OFFSET              (512 * 1097)
index 8e8fa163b8acd84e2bc7f3b5f7a6aa4ec9902406..778a4f9a72d815835b310ada7a156a16a39f7831 100644 (file)
 #define CONFIG_ENV_SECT_SIZE   0x10000
 #elif defined(CONFIG_RAMBOOT_SDCARD)
 #define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_FSL_FIXED_MMC_LOCATION
 #define CONFIG_ENV_SIZE                0x2000
 #define CONFIG_SYS_MMC_ENV_DEV 0
 #elif defined(CONFIG_NAND_U_BOOT)