diff mbox series

[01/17] Convert CONFIG_FSL_FIXED_MMC_LOCATION et al to Kconfig

Message ID 20220620120758.765049-1-trini@konsulko.com
State Awaiting Upstream
Delegated to: Tom Rini
Headers show
Series [01/17] Convert CONFIG_FSL_FIXED_MMC_LOCATION et al to Kconfig | expand

Commit Message

Tom Rini June 20, 2022, 12:07 p.m. UTC
This converts the following to Kconfig:
   CONFIG_FSL_FIXED_MMC_LOCATION
   CONFIG_ESDHC_HC_BLK_ADDR

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/powerpc/include/asm/config_mpc85xx.h  |  3 ---
 boot/Kconfig                               | 13 +++++++++++++
 configs/P1010RDB-PA_36BIT_NOR_defconfig    |  1 +
 configs/P1010RDB-PA_36BIT_SDCARD_defconfig |  1 +
 configs/P1010RDB-PA_NOR_defconfig          |  1 +
 configs/P1010RDB-PA_SDCARD_defconfig       |  1 +
 configs/P1010RDB-PB_36BIT_NOR_defconfig    |  1 +
 configs/P1010RDB-PB_36BIT_SDCARD_defconfig |  1 +
 configs/P1010RDB-PB_NOR_defconfig          |  1 +
 configs/P1010RDB-PB_SDCARD_defconfig       |  1 +
 configs/P1020RDB-PC_36BIT_SDCARD_defconfig |  1 +
 configs/P1020RDB-PC_36BIT_defconfig        |  1 +
 configs/P1020RDB-PC_SDCARD_defconfig       |  1 +
 configs/P1020RDB-PC_defconfig              |  1 +
 configs/P1020RDB-PD_SDCARD_defconfig       |  1 +
 configs/P1020RDB-PD_defconfig              |  1 +
 configs/P2020RDB-PC_36BIT_SDCARD_defconfig |  1 +
 configs/P2020RDB-PC_36BIT_defconfig        |  1 +
 configs/P2020RDB-PC_SDCARD_defconfig       |  1 +
 configs/P2020RDB-PC_defconfig              |  1 +
 include/configs/P1010RDB.h                 |  4 +---
 include/configs/P2041RDB.h                 |  5 -----
 include/configs/corenet_ds.h               |  5 -----
 include/configs/p1_p2_rdb_pc.h             |  4 +---
 24 files changed, 33 insertions(+), 19 deletions(-)

Comments

Tom Rini July 6, 2022, 4:02 p.m. UTC | #1
On Mon, Jun 20, 2022 at 08:07:42AM -0400, Tom Rini wrote:

> This converts the following to Kconfig:
>    CONFIG_FSL_FIXED_MMC_LOCATION
>    CONFIG_ESDHC_HC_BLK_ADDR
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

For the series, applied to u-boot/next, thanks!
Tim Harvey July 22, 2022, 6:01 p.m. UTC | #2
On Mon, Jun 20, 2022 at 5:08 AM Tom Rini <trini@konsulko.com> wrote:
>
> This converts the following to Kconfig:
>    CONFIG_FSL_FIXED_MMC_LOCATION
>    CONFIG_ESDHC_HC_BLK_ADDR
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  arch/powerpc/include/asm/config_mpc85xx.h  |  3 ---
>  boot/Kconfig                               | 13 +++++++++++++
>  configs/P1010RDB-PA_36BIT_NOR_defconfig    |  1 +
>  configs/P1010RDB-PA_36BIT_SDCARD_defconfig |  1 +
>  configs/P1010RDB-PA_NOR_defconfig          |  1 +
>  configs/P1010RDB-PA_SDCARD_defconfig       |  1 +
>  configs/P1010RDB-PB_36BIT_NOR_defconfig    |  1 +
>  configs/P1010RDB-PB_36BIT_SDCARD_defconfig |  1 +
>  configs/P1010RDB-PB_NOR_defconfig          |  1 +
>  configs/P1010RDB-PB_SDCARD_defconfig       |  1 +
>  configs/P1020RDB-PC_36BIT_SDCARD_defconfig |  1 +
>  configs/P1020RDB-PC_36BIT_defconfig        |  1 +
>  configs/P1020RDB-PC_SDCARD_defconfig       |  1 +
>  configs/P1020RDB-PC_defconfig              |  1 +
>  configs/P1020RDB-PD_SDCARD_defconfig       |  1 +
>  configs/P1020RDB-PD_defconfig              |  1 +
>  configs/P2020RDB-PC_36BIT_SDCARD_defconfig |  1 +
>  configs/P2020RDB-PC_36BIT_defconfig        |  1 +
>  configs/P2020RDB-PC_SDCARD_defconfig       |  1 +
>  configs/P2020RDB-PC_defconfig              |  1 +
>  include/configs/P1010RDB.h                 |  4 +---
>  include/configs/P2041RDB.h                 |  5 -----
>  include/configs/corenet_ds.h               |  5 -----
>  include/configs/p1_p2_rdb_pc.h             |  4 +---
>  24 files changed, 33 insertions(+), 19 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h
> index e82adc6b4545..ce3a776c7e88 100644
> --- a/arch/powerpc/include/asm/config_mpc85xx.h
> +++ b/arch/powerpc/include/asm/config_mpc85xx.h
> @@ -33,7 +33,6 @@
>  #define CONFIG_SYS_FSL_PCIE_COMPAT     "fsl,qoriq-pcie-v2.2"
>  #define CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
>  #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
> -#define CONFIG_ESDHC_HC_BLK_ADDR
>
>  /* P1011 is single core version of P1020 */
>  #elif defined(CONFIG_ARCH_P1011)
> @@ -148,7 +147,6 @@
>  #define CONFIG_SYS_FSL_DSP_M2_RAM_ADDR 0xb0000000
>  #define CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT     0xff600000
>  #define CONFIG_SYS_FSL_IFC_BANK_COUNT  3
> -#define CONFIG_ESDHC_HC_BLK_ADDR
>
>  #elif defined(CONFIG_ARCH_BSC9132)
>  #define CONFIG_FSL_SDHC_V2_3
> @@ -160,7 +158,6 @@
>  #define CONFIG_SYS_FSL_IFC_BANK_COUNT  3
>  #define CONFIG_SYS_FSL_ESDHC_P1010_BROKEN_SDCLK
>  #define CONFIG_SYS_FSL_PCIE_COMPAT     "fsl,qoriq-pcie-v2.2"
> -#define CONFIG_ESDHC_HC_BLK_ADDR
>
>  #elif defined(CONFIG_ARCH_T4240)
>  #define CONFIG_FSL_CORENET             /* Freescale CoreNet platform */
> diff --git a/boot/Kconfig b/boot/Kconfig
> index 63dacc0d14f4..ee0dc90e93cc 100644
> --- a/boot/Kconfig
> +++ b/boot/Kconfig
> @@ -575,6 +575,19 @@ config SPIFLASH
>
>  endchoice
>
> +config FSL_FIXED_MMC_LOCATION
> +       bool "PBL MMC is at a fixed location"
> +       depends on SDCARD && !RAMBOOT_PBL
> +
> +config ESDHC_HC_BLK_ADDR
> +       def_bool y
> +       depends on FSL_FIXED_MMC_LOCATION && (ARCH_BSC9131 || ARCH_BSC9132 || ARCH_P1010)
> +       help
> +         In High Capacity SD Cards (> 2 GBytes), the 32-bit source address and
> +         code length of these soc specify the memory address in block address
> +         format. Block length is fixed to 512 bytes as per the SD High
> +         Capacity specification.
> +
>  config SYS_FSL_PBL_PBI
>         string "PBI(pre-boot instructions) commands for the PBL image"
>         depends on RAMBOOT_PBL
> diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
> index 81bfd7ae518c..481c69d2d33b 100644
> --- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
> +++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
> @@ -16,6 +16,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
> diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
> index 1ebfdec719e8..92bb8cdedf66 100644
> --- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
> +++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
> @@ -22,6 +22,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
> diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
> index 9240c38c164a..9c93d653748b 100644
> --- a/configs/P1010RDB-PA_NOR_defconfig
> +++ b/configs/P1010RDB-PA_NOR_defconfig
> @@ -15,6 +15,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
> diff --git a/configs/P1010RDB-PA_SDCARD_defconfig b/configs/P1010RDB-PA_SDCARD_defconfig
> index c0fa3b5e4eb3..736e52efdd9c 100644
> --- a/configs/P1010RDB-PA_SDCARD_defconfig
> +++ b/configs/P1010RDB-PA_SDCARD_defconfig
> @@ -21,6 +21,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
> diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
> index 0a3ba0573e01..eace5d0d2c29 100644
> --- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
> +++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
> @@ -16,6 +16,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
> diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
> index 3e5d313c405f..435c83c5f9b7 100644
> --- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
> +++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
> @@ -22,6 +22,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
> diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
> index af65061a0c3e..abb98580532a 100644
> --- a/configs/P1010RDB-PB_NOR_defconfig
> +++ b/configs/P1010RDB-PB_NOR_defconfig
> @@ -15,6 +15,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
> diff --git a/configs/P1010RDB-PB_SDCARD_defconfig b/configs/P1010RDB-PB_SDCARD_defconfig
> index 36892c9fc2e4..1b114b8c9791 100644
> --- a/configs/P1010RDB-PB_SDCARD_defconfig
> +++ b/configs/P1010RDB-PB_SDCARD_defconfig
> @@ -21,6 +21,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
> diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
> index 6c4575367be2..555f52f21a0c 100644
> --- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
> +++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
> @@ -24,6 +24,7 @@ CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
>  CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
> index 0130ce6cb661..32c537a30c7a 100644
> --- a/configs/P1020RDB-PC_36BIT_defconfig
> +++ b/configs/P1020RDB-PC_36BIT_defconfig
> @@ -18,6 +18,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
> index 6b6b12eae624..065845908aa3 100644
> --- a/configs/P1020RDB-PC_SDCARD_defconfig
> +++ b/configs/P1020RDB-PC_SDCARD_defconfig
> @@ -23,6 +23,7 @@ CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
>  CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P1020RDB-PC_defconfig b/configs/P1020RDB-PC_defconfig
> index 643cee0b24ca..c5b5573c6025 100644
> --- a/configs/P1020RDB-PC_defconfig
> +++ b/configs/P1020RDB-PC_defconfig
> @@ -17,6 +17,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
> index c488aae69d5d..4547bdde55d7 100644
> --- a/configs/P1020RDB-PD_SDCARD_defconfig
> +++ b/configs/P1020RDB-PD_SDCARD_defconfig
> @@ -23,6 +23,7 @@ CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
>  CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P1020RDB-PD_defconfig b/configs/P1020RDB-PD_defconfig
> index 40b6afa6cc0f..71a32289de0a 100644
> --- a/configs/P1020RDB-PD_defconfig
> +++ b/configs/P1020RDB-PD_defconfig
> @@ -17,6 +17,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
> index 48f787ec91bf..7612b05fbae2 100644
> --- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
> +++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
> @@ -24,6 +24,7 @@ CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
>  CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
> index 9b376595e7b8..996675f243d4 100644
> --- a/configs/P2020RDB-PC_36BIT_defconfig
> +++ b/configs/P2020RDB-PC_36BIT_defconfig
> @@ -18,6 +18,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
> index cd91e8903a67..fabca9b2a5c6 100644
> --- a/configs/P2020RDB-PC_SDCARD_defconfig
> +++ b/configs/P2020RDB-PC_SDCARD_defconfig
> @@ -23,6 +23,7 @@ CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
>  CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/configs/P2020RDB-PC_defconfig b/configs/P2020RDB-PC_defconfig
> index 228f36af9a95..06c6f28b5961 100644
> --- a/configs/P2020RDB-PC_defconfig
> +++ b/configs/P2020RDB-PC_defconfig
> @@ -17,6 +17,7 @@ CONFIG_FIT=y
>  CONFIG_FIT_VERBOSE=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_OF_STDOUT_VIA_ALIAS=y
> +CONFIG_FSL_FIXED_MMC_LOCATION=y
>  CONFIG_BOOTDELAY=10
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
> diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
> index 19aebb810c7b..813516892c61 100644
> --- a/include/configs/P1010RDB.h
> +++ b/include/configs/P1010RDB.h
> @@ -465,9 +465,7 @@ extern unsigned long get_sdram_size(void);
>  /*
>   * Environment
>   */
> -#if defined(CONFIG_SDCARD)
> -#define CONFIG_FSL_FIXED_MMC_LOCATION
> -#elif defined(CONFIG_MTD_RAW_NAND)
> +#if defined(CONFIG_MTD_RAW_NAND)
>  #ifdef CONFIG_TPL_BUILD
>  #define SPL_ENV_ADDR           (CONFIG_SYS_INIT_L2_ADDR + (160 << 10))
>  #endif
> diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
> index 4e96d2a06b79..4a1fccff598c 100644
> --- a/include/configs/P2041RDB.h
> +++ b/include/configs/P2041RDB.h
> @@ -43,11 +43,6 @@
>  #define CONFIG_SRIO_PCIE_BOOT_MASTER
>  #define CONFIG_SYS_DPAA_RMAN           /* RMan */
>
> -#if defined(CONFIG_SPIFLASH)
> -#elif defined(CONFIG_SDCARD)
> -       #define CONFIG_FSL_FIXED_MMC_LOCATION
> -#endif
> -
>  #ifndef __ASSEMBLY__
>  #include <linux/stringify.h>
>  #endif
> diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
> index 6a4fd90ded9a..c0952e092858 100644
> --- a/include/configs/corenet_ds.h
> +++ b/include/configs/corenet_ds.h
> @@ -39,11 +39,6 @@
>  #define CONFIG_PCIE1                   /* PCIE controller 1 */
>  #define CONFIG_PCIE2                   /* PCIE controller 2 */
>
> -#if defined(CONFIG_SPIFLASH)
> -#elif defined(CONFIG_SDCARD)
> -#define CONFIG_FSL_FIXED_MMC_LOCATION
> -#endif
> -
>  /*
>   * These can be toggled for performance analysis, otherwise use default.
>   */
> diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
> index 39552be32b3c..b719c7e923cf 100644
> --- a/include/configs/p1_p2_rdb_pc.h
> +++ b/include/configs/p1_p2_rdb_pc.h
> @@ -424,9 +424,7 @@
>  /*
>   * Environment
>   */
> -#if defined(CONFIG_SDCARD)
> -#define CONFIG_FSL_FIXED_MMC_LOCATION
> -#elif defined(CONFIG_MTD_RAW_NAND)
> +#if defined(CONFIG_MTD_RAW_NAND)
>  #ifdef CONFIG_TPL_BUILD
>  #define SPL_ENV_ADDR           (CONFIG_SYS_INIT_L2_ADDR + (160 << 10))
>  #endif
> --
> 2.25.1
>

Tom,

I'm not sure this patch had the intended results. I just noticed that
default bootcmd was changed due to this for the the imx8m*venice
boards I maintain.

How did you go about generating this? In my case
CONFIG_USE_BOOTCOMMAND is not set and prior to this patch was getting
defaulted in include/config_distro_bootcmd.h but now that is removed
and its getting set in tools/env/fw_env_private.h to something
different.

To fix this, I'll have to submit a patch that does the following for
configs/imx8m*_venice_defconfig
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="run distro_bootcmd"

I figured it was worth mentioning and asking for others that run into this.

Best Regards,

Tim
Tom Rini July 22, 2022, 7:06 p.m. UTC | #3
On Fri, Jul 22, 2022 at 11:01:52AM -0700, Tim Harvey wrote:
> On Mon, Jun 20, 2022 at 5:08 AM Tom Rini <trini@konsulko.com> wrote:
> >
> > This converts the following to Kconfig:
> >    CONFIG_FSL_FIXED_MMC_LOCATION
> >    CONFIG_ESDHC_HC_BLK_ADDR
> >
> > Signed-off-by: Tom Rini <trini@konsulko.com>
[snip]
> Tom,
> 
> I'm not sure this patch had the intended results. I just noticed that
> default bootcmd was changed due to this for the the imx8m*venice
> boards I maintain.
> 
> How did you go about generating this? In my case
> CONFIG_USE_BOOTCOMMAND is not set and prior to this patch was getting
> defaulted in include/config_distro_bootcmd.h but now that is removed
> and its getting set in tools/env/fw_env_private.h to something
> different.
> 
> To fix this, I'll have to submit a patch that does the following for
> configs/imx8m*_venice_defconfig
> +CONFIG_USE_BOOTCOMMAND=y
> +CONFIG_BOOTCOMMAND="run distro_bootcmd"
> 
> I figured it was worth mentioning and asking for others that run into this.

It's this commit, specifically?  Looking at u-boot-initial-env (and
disabling LTO for the moment), I don't see bootcmd set before nor after.
I could see this being a merge related problem or similar from
970bf8603b877e2b66170290f751f9c23c120838 where I finished moving
everyone that was in-tree at the time that should have been setting
CONFIG_USE_BOOTCOMMAND and then CONFIG_BOOTCOMMAND (if not using the
default) leading to this kind of problem.
Tim Harvey July 22, 2022, 8:05 p.m. UTC | #4
On Fri, Jul 22, 2022 at 12:06 PM Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, Jul 22, 2022 at 11:01:52AM -0700, Tim Harvey wrote:
> > On Mon, Jun 20, 2022 at 5:08 AM Tom Rini <trini@konsulko.com> wrote:
> > >
> > > This converts the following to Kconfig:
> > >    CONFIG_FSL_FIXED_MMC_LOCATION
> > >    CONFIG_ESDHC_HC_BLK_ADDR
> > >
> > > Signed-off-by: Tom Rini <trini@konsulko.com>
> [snip]
> > Tom,
> >
> > I'm not sure this patch had the intended results. I just noticed that
> > default bootcmd was changed due to this for the the imx8m*venice
> > boards I maintain.
> >
> > How did you go about generating this? In my case
> > CONFIG_USE_BOOTCOMMAND is not set and prior to this patch was getting
> > defaulted in include/config_distro_bootcmd.h but now that is removed
> > and its getting set in tools/env/fw_env_private.h to something
> > different.
> >
> > To fix this, I'll have to submit a patch that does the following for
> > configs/imx8m*_venice_defconfig
> > +CONFIG_USE_BOOTCOMMAND=y
> > +CONFIG_BOOTCOMMAND="run distro_bootcmd"
> >
> > I figured it was worth mentioning and asking for others that run into this.
>
> It's this commit, specifically?  Looking at u-boot-initial-env (and
> disabling LTO for the moment), I don't see bootcmd set before nor after.
> I could see this being a merge related problem or similar from
> 970bf8603b877e2b66170290f751f9c23c120838 where I finished moving
> everyone that was in-tree at the time that should have been setting
> CONFIG_USE_BOOTCOMMAND and then CONFIG_BOOTCOMMAND (if not using the
> default) leading to this kind of problem.
>

Tom,

I apologize... not sure how I ended up replying to the wrong patch.

Indeed it is commit 970bf8603b87 ("Convert CONFIG_USE_BOOTCOMMAND et
al to Kconfig") that I was referring to.

It looks like any board that specifically did not define
CONFIG_USE_BOOTCOMMAND was likely affected and if I simply remove '#
CONFIG_USE_BOOTCOMMAND is not set' from my defconfigs it fixes it.

This is what I was going to submit but if the above assumption is
correct there would be a lot of other boards affected.

    imx8m*_venice_defconfig: fix default bootcmd

    commit 970bf8603b87 ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig")
    had an unintended side effect of resulting in a bootcmd env var change
    for boards like venice that did not have CONFIG_USE_BOOTCOMMAND defined
    and relied on it being defaulted in include/config_distro_bootcmd.h.
    Following that patch it instead got defaulted in tools/env/fw_env_private.h

    Fix this by enabling CONFIG_USE_BOOTCOMMAND for venice.

    Fixes: commit 970bf8603b87 ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig
")
    Signed-off-by: Tim Harvey <tharvey@gateworks.com>

diff --git a/configs/imx8mm_venice_defconfig b/configs/imx8mm_venice_defconfig
index 0165a4e5df08..c0fff026fbbc 100644
--- a/configs/imx8mm_venice_defconfig
+++ b/configs/imx8mm_venice_defconfig
@@ -27,7 +27,6 @@ CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_SYSTEM_SETUP=y
-# CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="gsc wd-disable"
 CONFIG_BOARD_LATE_INIT=y
diff --git a/configs/imx8mn_venice_defconfig b/configs/imx8mn_venice_defconfig
index 63a654973710..4bbf9ded74ad 100644
--- a/configs/imx8mn_venice_defconfig
+++ b/configs/imx8mn_venice_defconfig
@@ -28,7 +28,6 @@ CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_SYSTEM_SETUP=y
-# CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="gsc wd-disable"
 CONFIG_BOARD_LATE_INIT=y
diff --git a/configs/imx8mp_venice_defconfig b/configs/imx8mp_venice_defconfig
index 6758cd251e60..398875ae323a 100644
--- a/configs/imx8mp_venice_defconfig
+++ b/configs/imx8mp_venice_defconfig
@@ -28,7 +28,6 @@ CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_SYSTEM_SETUP=y
-# CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="gsc wd-disable"
 CONFIG_BOARD_LATE_INIT=y

Best Regards,

Tim
Tom Rini July 22, 2022, 8:12 p.m. UTC | #5
On Fri, Jul 22, 2022 at 01:05:38PM -0700, Tim Harvey wrote:
> On Fri, Jul 22, 2022 at 12:06 PM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, Jul 22, 2022 at 11:01:52AM -0700, Tim Harvey wrote:
> > > On Mon, Jun 20, 2022 at 5:08 AM Tom Rini <trini@konsulko.com> wrote:
> > > >
> > > > This converts the following to Kconfig:
> > > >    CONFIG_FSL_FIXED_MMC_LOCATION
> > > >    CONFIG_ESDHC_HC_BLK_ADDR
> > > >
> > > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > [snip]
> > > Tom,
> > >
> > > I'm not sure this patch had the intended results. I just noticed that
> > > default bootcmd was changed due to this for the the imx8m*venice
> > > boards I maintain.
> > >
> > > How did you go about generating this? In my case
> > > CONFIG_USE_BOOTCOMMAND is not set and prior to this patch was getting
> > > defaulted in include/config_distro_bootcmd.h but now that is removed
> > > and its getting set in tools/env/fw_env_private.h to something
> > > different.
> > >
> > > To fix this, I'll have to submit a patch that does the following for
> > > configs/imx8m*_venice_defconfig
> > > +CONFIG_USE_BOOTCOMMAND=y
> > > +CONFIG_BOOTCOMMAND="run distro_bootcmd"
> > >
> > > I figured it was worth mentioning and asking for others that run into this.
> >
> > It's this commit, specifically?  Looking at u-boot-initial-env (and
> > disabling LTO for the moment), I don't see bootcmd set before nor after.
> > I could see this being a merge related problem or similar from
> > 970bf8603b877e2b66170290f751f9c23c120838 where I finished moving
> > everyone that was in-tree at the time that should have been setting
> > CONFIG_USE_BOOTCOMMAND and then CONFIG_BOOTCOMMAND (if not using the
> > default) leading to this kind of problem.
> >
> 
> Tom,
> 
> I apologize... not sure how I ended up replying to the wrong patch.
> 
> Indeed it is commit 970bf8603b87 ("Convert CONFIG_USE_BOOTCOMMAND et
> al to Kconfig") that I was referring to.
> 
> It looks like any board that specifically did not define
> CONFIG_USE_BOOTCOMMAND was likely affected and if I simply remove '#
> CONFIG_USE_BOOTCOMMAND is not set' from my defconfigs it fixes it.
> 
> This is what I was going to submit but if the above assumption is
> correct there would be a lot of other boards affected.
> 
>     imx8m*_venice_defconfig: fix default bootcmd
> 
>     commit 970bf8603b87 ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig")
>     had an unintended side effect of resulting in a bootcmd env var change
>     for boards like venice that did not have CONFIG_USE_BOOTCOMMAND defined
>     and relied on it being defaulted in include/config_distro_bootcmd.h.
>     Following that patch it instead got defaulted in tools/env/fw_env_private.h
> 
>     Fix this by enabling CONFIG_USE_BOOTCOMMAND for venice.
> 
>     Fixes: commit 970bf8603b87 ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig
> ")
>     Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> 

OK, yeah, makes more sense.  I'm not quite sure how I missed this
platform in the migration but apparently I did.  A patch to fix up other
platforms you can see were also broken would be appreciated, thanks!
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h
index e82adc6b4545..ce3a776c7e88 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -33,7 +33,6 @@ 
 #define CONFIG_SYS_FSL_PCIE_COMPAT	"fsl,qoriq-pcie-v2.2"
 #define CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
 #define CONFIG_SYS_FSL_USB1_PHY_ENABLE
-#define CONFIG_ESDHC_HC_BLK_ADDR
 
 /* P1011 is single core version of P1020 */
 #elif defined(CONFIG_ARCH_P1011)
@@ -148,7 +147,6 @@ 
 #define CONFIG_SYS_FSL_DSP_M2_RAM_ADDR	0xb0000000
 #define CONFIG_SYS_FSL_DSP_CCSRBAR_DEFAULT	0xff600000
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT	3
-#define CONFIG_ESDHC_HC_BLK_ADDR
 
 #elif defined(CONFIG_ARCH_BSC9132)
 #define CONFIG_FSL_SDHC_V2_3
@@ -160,7 +158,6 @@ 
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT	3
 #define CONFIG_SYS_FSL_ESDHC_P1010_BROKEN_SDCLK
 #define CONFIG_SYS_FSL_PCIE_COMPAT	"fsl,qoriq-pcie-v2.2"
-#define CONFIG_ESDHC_HC_BLK_ADDR
 
 #elif defined(CONFIG_ARCH_T4240)
 #define CONFIG_FSL_CORENET		/* Freescale CoreNet platform */
diff --git a/boot/Kconfig b/boot/Kconfig
index 63dacc0d14f4..ee0dc90e93cc 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -575,6 +575,19 @@  config SPIFLASH
 
 endchoice
 
+config FSL_FIXED_MMC_LOCATION
+	bool "PBL MMC is at a fixed location"
+	depends on SDCARD && !RAMBOOT_PBL
+
+config ESDHC_HC_BLK_ADDR
+	def_bool y
+	depends on FSL_FIXED_MMC_LOCATION && (ARCH_BSC9131 || ARCH_BSC9132 || ARCH_P1010)
+	help
+	  In High Capacity SD Cards (> 2 GBytes), the 32-bit source address and
+	  code length of these soc specify the memory address in block address
+	  format. Block length is fixed to 512 bytes as per the SD High
+	  Capacity specification.
+
 config SYS_FSL_PBL_PBI
 	string "PBI(pre-boot instructions) commands for the PBL image"
 	depends on RAMBOOT_PBL
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index 81bfd7ae518c..481c69d2d33b 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -16,6 +16,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
index 1ebfdec719e8..92bb8cdedf66 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -22,6 +22,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
index 9240c38c164a..9c93d653748b 100644
--- a/configs/P1010RDB-PA_NOR_defconfig
+++ b/configs/P1010RDB-PA_NOR_defconfig
@@ -15,6 +15,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
diff --git a/configs/P1010RDB-PA_SDCARD_defconfig b/configs/P1010RDB-PA_SDCARD_defconfig
index c0fa3b5e4eb3..736e52efdd9c 100644
--- a/configs/P1010RDB-PA_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_SDCARD_defconfig
@@ -21,6 +21,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index 0a3ba0573e01..eace5d0d2c29 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -16,6 +16,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
index 3e5d313c405f..435c83c5f9b7 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -22,6 +22,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
index af65061a0c3e..abb98580532a 100644
--- a/configs/P1010RDB-PB_NOR_defconfig
+++ b/configs/P1010RDB-PB_NOR_defconfig
@@ -15,6 +15,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
diff --git a/configs/P1010RDB-PB_SDCARD_defconfig b/configs/P1010RDB-PB_SDCARD_defconfig
index 36892c9fc2e4..1b114b8c9791 100644
--- a/configs/P1010RDB-PB_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_SDCARD_defconfig
@@ -21,6 +21,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs ramdisk_size=$ramdisk_size;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr"
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index 6c4575367be2..555f52f21a0c 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -24,6 +24,7 @@  CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
index 0130ce6cb661..32c537a30c7a 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -18,6 +18,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
index 6b6b12eae624..065845908aa3 100644
--- a/configs/P1020RDB-PC_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_SDCARD_defconfig
@@ -23,6 +23,7 @@  CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P1020RDB-PC_defconfig b/configs/P1020RDB-PC_defconfig
index 643cee0b24ca..c5b5573c6025 100644
--- a/configs/P1020RDB-PC_defconfig
+++ b/configs/P1020RDB-PC_defconfig
@@ -17,6 +17,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
index c488aae69d5d..4547bdde55d7 100644
--- a/configs/P1020RDB-PD_SDCARD_defconfig
+++ b/configs/P1020RDB-PD_SDCARD_defconfig
@@ -23,6 +23,7 @@  CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P1020RDB-PD_defconfig b/configs/P1020RDB-PD_defconfig
index 40b6afa6cc0f..71a32289de0a 100644
--- a/configs/P1020RDB-PD_defconfig
+++ b/configs/P1020RDB-PD_defconfig
@@ -17,6 +17,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index 48f787ec91bf..7612b05fbae2 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -24,6 +24,7 @@  CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
index 9b376595e7b8..996675f243d4 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -18,6 +18,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
index cd91e8903a67..fabca9b2a5c6 100644
--- a/configs/P2020RDB-PC_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_SDCARD_defconfig
@@ -23,6 +23,7 @@  CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SPL_SYS_MONITOR_BASE=0xF8F81000
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/configs/P2020RDB-PC_defconfig b/configs/P2020RDB-PC_defconfig
index 228f36af9a95..06c6f28b5961 100644
--- a/configs/P2020RDB-PC_defconfig
+++ b/configs/P2020RDB-PC_defconfig
@@ -17,6 +17,7 @@  CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_FSL_FIXED_MMC_LOCATION=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="setenv bootargs root=/dev/$bdev rw rootdelay=30 console=$consoledev,$baudrate $othbootargs;usb start;ext2load usb 0:1 $loadaddr /boot/$bootfile;ext2load usb 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr"
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 19aebb810c7b..813516892c61 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -465,9 +465,7 @@  extern unsigned long get_sdram_size(void);
 /*
  * Environment
  */
-#if defined(CONFIG_SDCARD)
-#define CONFIG_FSL_FIXED_MMC_LOCATION
-#elif defined(CONFIG_MTD_RAW_NAND)
+#if defined(CONFIG_MTD_RAW_NAND)
 #ifdef CONFIG_TPL_BUILD
 #define SPL_ENV_ADDR		(CONFIG_SYS_INIT_L2_ADDR + (160 << 10))
 #endif
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 4e96d2a06b79..4a1fccff598c 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -43,11 +43,6 @@ 
 #define CONFIG_SRIO_PCIE_BOOT_MASTER
 #define CONFIG_SYS_DPAA_RMAN		/* RMan */
 
-#if defined(CONFIG_SPIFLASH)
-#elif defined(CONFIG_SDCARD)
-	#define CONFIG_FSL_FIXED_MMC_LOCATION
-#endif
-
 #ifndef __ASSEMBLY__
 #include <linux/stringify.h>
 #endif
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 6a4fd90ded9a..c0952e092858 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -39,11 +39,6 @@ 
 #define CONFIG_PCIE1			/* PCIE controller 1 */
 #define CONFIG_PCIE2			/* PCIE controller 2 */
 
-#if defined(CONFIG_SPIFLASH)
-#elif defined(CONFIG_SDCARD)
-#define CONFIG_FSL_FIXED_MMC_LOCATION
-#endif
-
 /*
  * These can be toggled for performance analysis, otherwise use default.
  */
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 39552be32b3c..b719c7e923cf 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -424,9 +424,7 @@ 
 /*
  * Environment
  */
-#if defined(CONFIG_SDCARD)
-#define CONFIG_FSL_FIXED_MMC_LOCATION
-#elif defined(CONFIG_MTD_RAW_NAND)
+#if defined(CONFIG_MTD_RAW_NAND)
 #ifdef CONFIG_TPL_BUILD
 #define SPL_ENV_ADDR		(CONFIG_SYS_INIT_L2_ADDR + (160 << 10))
 #endif