u-boot-brain/arch/arm/mach-stm32mp/Kconfig
Patrick Delaunay 11dfd1a331 stm32mp1: select boot device and partition
Bootrom loads SPL from SDCARD or eMMC
according BootPin selection.

Then SPL loads U-Boot on the same mmc device
with the following predefined GPT partitioning:

on SDCARD: gpt partitioning
  1: SPL
  2: SPL#2
  3: U-Boot
  4: bootable partition

on eMMC:
  The 2 boot partitions are used for SPL (2 copy)
    boot1: SPL
    boot2: SPL#2
  The user partition use gpt partitioning
    1: U-Boot
    2: bootable partition

This patch select the correct SPL partition
(3 for SDCARD on mmc0 and 1 for eMMC on mmc1)
according the BootRom information saved in TAMP register
and based on configuration flasg:
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
  => for BOOT_DEVICE_MMC1 or mmc 0 in U-Boot
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_MMC2 (new)
  => for BOOT_DEVICE_MMC2 or mmc 1 in U-Boot

And the correct boot_targets is selected according the environment
variables boot_device and boot_instance, with preboot command,
to search the bootable partition with kernel on this device
(generic distro support).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06 20:45:28 -04:00

52 lines
1.1 KiB
Plaintext

if ARCH_STM32MP
config SPL
select SPL_BOARD_INIT
select SPL_CLK
select SPL_DM
select SPL_DM_SEQ_ALIAS
select SPL_FRAMEWORK
select SPL_GPIO_SUPPORT
select SPL_LIBCOMMON_SUPPORT
select SPL_LIBGENERIC_SUPPORT
select SPL_OF_CONTROL
select SPL_OF_TRANSLATE
select SPL_PINCTRL
select SPL_REGMAP
select SPL_RESET_SUPPORT
select SPL_SERIAL_SUPPORT
select SPL_SYSCON
imply SPL_LIBDISK_SUPPORT
config SYS_SOC
default "stm32mp"
config TARGET_STM32MP1
bool "Support stm32mp1xx"
select CPU_V7
select PINCTRL_STM32
select STM32_RESET
help
target STMicroelectronics SOC STM32MP1 family
STMicroelectronics MPU with core ARMv7
config SYS_TEXT_BASE
prompt "U-Boot base address"
default 0xC0100000
help
configure the U-Boot base address
when DDR driver is used:
DDR + 1MB (0xC0100000)
config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_MMC2
hex "Partition on MMC2 to use to load U-Boot from"
depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
default 1
help
Partition on the second MMC to load U-Boot from when the MMC is being
used in raw mode
source "board/st/stm32mp1/Kconfig"
endif