Aspeed: Support eMMC boot
Subsystems (3)
cover Aspeed: Support eMMC boot
Add support to boot from the eMMC on AST2600 systems. Include the necessary devicetree entries for Tacoma and Rainier machines.
Eddie James (3):
ARM: dts: Aspeed: Tacoma and Rainier: Add eMMC nodes and parameters
arch: ARM: Aspeed: Add SPL eMMC partition boot support
configs: Add AST2600 SPL eMMC configuration
arch/arm/dts/ast2600-rainier.dts | 8 ++ arch/arm/dts/ast2600-tacoma.dts | 8 ++ arch/arm/mach-aspeed/Kconfig | 7 ++ arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 +- configs/ast2600_openbmc_spl_emmc_defconfig | 130 +++++++++++++++++++++ include/configs/aspeed-common.h | 6 + 6 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 configs/ast2600_openbmc_spl_emmc_defconfig
Signature · 1 line
2.26.2
PATCH 1/3 ARM: dts: Aspeed: Tacoma and Rainier: Add eMMC nodes and parameters
Add the necessary eMMC/SDHC nodes and information to use the eMMC from SPL and U-Boot.
--- arch/arm/dts/ast2600-rainier.dts | 8 ++++++++ arch/arm/dts/ast2600-tacoma.dts | 8 ++++++++ 2 files changed, 16 insertions(+)
arch/arm/dts/ast2600-rainier.dts +8 -0
@@ -18,6 +18,7 @@ }; aliases { + mmc0 = &emmc_slot0; spi0 = &fmc; spi1 = &spi1; };
@@ -89,9 +90,16 @@ }; }; +&emmc { + u-boot,dm-pre-reloc; + timing-phase = <0x700ff>; +}; + &emmc_slot0 { + u-boot,dm-pre-reloc; status = "okay"; bus-width = <4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_emmc_default>; + sdhci-drive-type = <1>; };
arch/arm/dts/ast2600-tacoma.dts +8 -0
@@ -18,6 +18,7 @@ }; aliases { + mmc0 = &emmc_slot0; spi0 = &fmc; spi1 = &spi1; };
@@ -80,9 +81,16 @@ }; }; +&emmc { + u-boot,dm-pre-reloc; + timing-phase = <0x700ff>; +}; + &emmc_slot0 { + u-boot,dm-pre-reloc; status = "okay"; bus-width = <4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_emmc_default>; + sdhci-drive-type = <1>; };
Signature · 1 line
2.26.2
Re: [PATCH U-Boot v2019.04-aspeed-openbmc 1/3] ARM: dts: Aspeed: Tacoma and Rainier: Add eMMC nodes and parameters
Quoted 5 lines · Eddie James
Add the necessary eMMC/SDHC nodes and information to use the eMMC from SPL and U-Boot.
Signed-off-by Eddie James <[email protected]>
Quoted 66 lines
--- arch/arm/dts/ast2600-rainier.dts | 8 ++++++++ arch/arm/dts/ast2600-tacoma.dts | 8 ++++++++ 2 files changed, 16 insertions(+)arch/arm/dts/ast2600-rainier.dts +8
-0@@ -18,6 +18,7 @@ }; aliases { + mmc0 = &emmc_slot0; spi0 = &fmc; spi1 = &spi1; };@@ -89,9 +90,16 @@ }; }; +&emmc { + u-boot,dm-pre-reloc; + timing-phase = <0x700ff>; +}; + &emmc_slot0 { + u-boot,dm-pre-reloc; status = "okay"; bus-width = <4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_emmc_default>; + sdhci-drive-type = <1>; };arch/arm/dts/ast2600-tacoma.dts +8
-1@@ -18,6 +18,7 @@ }; aliases { + mmc0 = &emmc_slot0; spi0 = &fmc; spi1 = &spi1; };@@ -80,9 +81,16 @@ }; }; +&emmc { + u-boot,dm-pre-reloc; + timing-phase = <0x700ff>; +}; + &emmc_slot0 { + u-boot,dm-pre-reloc; status = "okay"; bus-width = <4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_emmc_default>; + sdhci-drive-type = <1>; }; --2.26.2
PATCH 2/3 arch: ARM: Aspeed: Add SPL eMMC partition boot support
In reply to Eddie JamesSupport loading U-Boot from a specific partition on the eMMC device.
--- arch/arm/mach-aspeed/Kconfig | 7 +++++++ arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-)
arch/arm/mach-aspeed/Kconfig +7 -0
@@ -90,6 +90,13 @@ config ASPEED_UBOOT_MMC_BASE The base block number of the U-Boot image in the eMMC device +config ASPEED_UBOOT_MMC_PART + int "U-Boot eMMC partition" + default 0 + help + The partition number of the U-Boot + image in the eMMC device + config ASPEED_UBOOT_MMC_SIZE hex "U-Boot eMMC size in blocks" default 0x0
arch/arm/mach-aspeed/ast2600/spl_boot.c +8 -1
@@ -46,8 +46,8 @@ static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) {int err; +int part =CONFIG_ASPEED_UBOOT_MMC_PART ;u32 count; -struct mmc *mmc =NULL ;struct udevice *dev;struct blk_desc *bd;
@@ -78,6 +78,13 @@ static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image, bd =mmc_get_blk_desc (mmc); +if (part) { +if (CONFIG_IS_ENABLED (MMC_TINY )) + err =mmc_switch_part (mmc, part); +else + err =blk_dselect_hwpart (bd, part); + } + count =blk_dread (bd,CONFIG_ASPEED_UBOOT_MMC_BASE ,CONFIG_ASPEED_UBOOT_MMC_SIZE , (void *)CONFIG_ASPEED_UBOOT_DRAM_BASE );if (count !=CONFIG_ASPEED_UBOOT_MMC_SIZE ) {
Signature · 1 line
2.26.2
Re: [PATCH U-Boot v2019.04-aspeed-openbmc 2/3] arch: ARM: Aspeed: Add SPL eMMC partition boot support
Quoted 15 lines · Eddie James
Support loading U-Boot from a specific partition on the eMMC device.
Signed-off-by Eddie James <[email protected]>--- arch/arm/mach-aspeed/Kconfig | 7 +++++++ arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-)arch/arm/mach-aspeed/Kconfig +0
-0
arch/arm/mach-aspeed/Kconfig config ASPEED_UBOOT_MMC_BASE · line 98
Quoted 9 lines
arch/arm/mach-aspeed/Kconfig +6
-0@@ -90,6 +90,13 @@ config ASPEED_UBOOT_MMC_BASE The base block number of the U-Boot image in the eMMC device +config ASPEED_UBOOT_MMC_PART + int "U-Boot eMMC partition" + default 0 + help + The partition number of the U-Boot + image in the eMMC device
To clarify, it's the partition number in the user area of the eMMC device? (and not the eMMC partition).
Quoted 35 lines
arch/arm/mach-aspeed/Kconfig +1
-0+ config ASPEED_UBOOT_MMC_SIZE hex "U-Boot eMMC size in blocks" default 0x0arch/arm/mach-aspeed/ast2600/spl_boot.c +8
-2@@ -46,8 +46,8 @@ static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) {int err; +int part =CONFIG_ASPEED_UBOOT_MMC_PART ;u32 count; -struct mmc *mmc =NULL ;struct udevice *dev;struct blk_desc *bd;@@ -78,6 +78,13 @@ static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image, bd =mmc_get_blk_desc (mmc); +if (part) { +if (CONFIG_IS_ENABLED (MMC_TINY )) + err =mmc_switch_part (mmc, part); +else + err =blk_dselect_hwpart (bd, part); + } + count =blk_dread (bd,CONFIG_ASPEED_UBOOT_MMC_BASE ,CONFIG_ASPEED_UBOOT_MMC_SIZE , (void *)CONFIG_ASPEED_UBOOT_DRAM_BASE );if (count !=CONFIG_ASPEED_UBOOT_MMC_SIZE ) { --2.26.2
Re: [PATCH U-Boot v2019.04-aspeed-openbmc 2/3] arch: ARM: Aspeed: Add SPL eMMC partition boot support
Quoted 18 lines · Joel Stanley
Quoted 17 lines · Eddie James
Support loading U-Boot from a specific partition on the eMMC device.
Signed-off-by Eddie James <[email protected]>--- arch/arm/mach-aspeed/Kconfig | 7 +++++++ arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-)arch/arm/mach-aspeed/Kconfig +0
-0@@ -90,6 +90,13 @@ config ASPEED_UBOOT_MMC_BASE The base block number of the U-Boot image in the eMMC device
Quoted 8 lines
arch/arm/mach-aspeed/Kconfig config ASPEED_UBOOT_MMC_BASE · line 98
Quoted 6 lines
arch/arm/mach-aspeed/Kconfig +6
-0+config ASPEED_UBOOT_MMC_PART + int "U-Boot eMMC partition" + default 0 + help + The partition number of the U-Boot + image in the eMMC deviceTo clarify, it's the partition number in the user area of the eMMC device? (and not the eMMC partition).
Ah, no it is the eMMC partition, where 0 is user data, 1 is boot partition 0, and 2 is boot partition 1.
Thanks,
Eddie
Quoted 38 lines
Reviewed-by Joel Stanley <[email protected]>Quoted 35 lines
arch/arm/mach-aspeed/Kconfig +1
-0+ config ASPEED_UBOOT_MMC_SIZE hex "U-Boot eMMC size in blocks" default 0x0arch/arm/mach-aspeed/ast2600/spl_boot.c +8
-2@@ -46,8 +46,8 @@ static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) {int err; +int part =CONFIG_ASPEED_UBOOT_MMC_PART ;u32 count; -struct mmc *mmc =NULL ;struct udevice *dev;struct blk_desc *bd;@@ -78,6 +78,13 @@ static int aspeed_spl_mmc_load_image(struct spl_image_info *spl_image, bd =mmc_get_blk_desc (mmc); +if (part) { +if (CONFIG_IS_ENABLED (MMC_TINY )) + err =mmc_switch_part (mmc, part); +else + err =blk_dselect_hwpart (bd, part); + } + count =blk_dread (bd,CONFIG_ASPEED_UBOOT_MMC_BASE ,CONFIG_ASPEED_UBOOT_MMC_SIZE , (void *)CONFIG_ASPEED_UBOOT_DRAM_BASE );if (count !=CONFIG_ASPEED_UBOOT_MMC_SIZE ) { --2.26.2
Joel Stanley
maintainerRe: [PATCH U-Boot v2019.04-aspeed-openbmc 2/3] arch: ARM: Aspeed: Add SPL eMMC partition boot support
Quoted 31 lines · Eddie James
Quoted 18 lines · Joel Stanley
Quoted 17 lines · Eddie James
Support loading U-Boot from a specific partition on the eMMC device.
Signed-off-by Eddie James <[email protected]>--- arch/arm/mach-aspeed/Kconfig | 7 +++++++ arch/arm/mach-aspeed/ast2600/spl_boot.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-)arch/arm/mach-aspeed/Kconfig +0
-0@@ -90,6 +90,13 @@ config ASPEED_UBOOT_MMC_BASE The base block number of the U-Boot image in the eMMC deviceQuoted 8 lines
arch/arm/mach-aspeed/Kconfig config ASPEED_UBOOT_MMC_BASE · line 98
Quoted 6 lines
arch/arm/mach-aspeed/Kconfig +6
-0+config ASPEED_UBOOT_MMC_PART + int "U-Boot eMMC partition" + default 0 + help + The partition number of the U-Boot + image in the eMMC deviceTo clarify, it's the partition number in the user area of the eMMC device? (and not the eMMC partition).
Quoted 2 lines
Ah, no it is the eMMC partition, where 0 is user data, 1 is boot partition 0, and 2 is boot partition 1.
Can you update your patch to make that clear?
PATCH 3/3 configs: Add AST2600 SPL eMMC configuration
In reply to Eddie JamesU-Boot and environment are to be loaded off the eMMC.
--- configs/ast2600_openbmc_spl_emmc_defconfig | 130 +++++++++++++++++++++ include/configs/aspeed-common.h | 6 + 2 files changed, 136 insertions(+) create mode 100644 configs/ast2600_openbmc_spl_emmc_defconfig
configs/ast2600_openbmc_spl_emmc_defconfig new file +130 -0
@@ -0,0 +1,130 @@ +CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="evb_ast2600a1_spl" +CONFIG_SYS_DCACHE_OFF=y +CONFIG_POSITION_INDEPENDENT=y +CONFIG_SPL_SYS_THUMB_BUILD=y +CONFIG_SYS_THUMB_BUILD=y +CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds" +CONFIG_ARCH_ASPEED=y +CONFIG_SYS_TEXT_BASE=0x10000 +CONFIG_ASPEED_AST2600=y +CONFIG_ASPEED_UBOOT_SPI_BASE=0x10000 +CONFIG_ASPEED_UBOOT_SPI_SIZE=0xd0000 +CONFIG_ASPEED_UBOOT_MMC_BASE=0x80 +CONFIG_ASPEED_UBOOT_MMC_PART=1 +CONFIG_ASPEED_UBOOT_MMC_SIZE=0x680 +CONFIG_ASPEED_UBOOT_UART_SIZE=0xe0000 +CONFIG_ASPEED_UBOOT_DRAM_BASE=0x81000000 +CONFIG_ASPEED_KERNEL_FIT_SPI_BASE=0x20100000 +CONFIG_ASPEED_KERNEL_FIT_SPI_SIZE=0x1000000 +CONFIG_ASPEED_KERNEL_FIT_MMC_BASE=0x800 +CONFIG_ASPEED_KERNEL_FIT_MMC_SIZE=0x8000 +CONFIG_ASPEED_KERNEL_FIT_DRAM_BASE=0x83000000 +CONFIG_TARGET_EVB_AST2600A1=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x800 +CONFIG_SPL_MMC_SUPPORT=y +CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y +CONFIG_ENV_SIZE=0x10000 +CONFIG_ENV_OFFSET=0x5000 +CONFIG_SPL=y +CONFIG_SPL_STACK_R_ADDR=0x90300000 +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y +CONFIG_ARMV7_PSCI_NR_CPUS=2 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_FIT=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="console=ttyS4,115200n8 root=/dev/ram rw" +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="bootm 20100000" +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_ARCH_EARLY_INIT_R=y +CONFIG_BOARD_EARLY_INIT_F=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set +CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_STACK_R=y +CONFIG_SPL_SEPARATE_BSS=y +CONFIG_SPL_DM_RESET=y +CONFIG_SPL_RAM_SUPPORT=y +CONFIG_SPL_RAM_DEVICE=y +CONFIG_SPL_WATCHDOG_SUPPORT=y +CONFIG_SPL_YMODEM_SUPPORT=y +CONFIG_HUSH_PARSER=y +# CONFIG_AUTO_COMPLETE is not set +CONFIG_SYS_PROMPT="ast# " +CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_XIMG is not set +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_ALT_MEMTEST=y +CONFIG_CMD_CLK=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPT=y +# CONFIG_RANDOM_UUID is not set +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y +CONFIG_CMD_SF=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_NCSI=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_MTDPARTS=y +# CONFIG_SPL_EFI_PARTITION is not set +CONFIG_SPL_OF_CONTROL=y +CONFIG_ENV_IS_IN_MMC=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_DM=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y +CONFIG_SPL_OF_TRANSLATE=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_DM_GPIO=y +CONFIG_ASPEED_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_ASPEED=y +CONFIG_MISC=y +CONFIG_ASPEED_AHBC=y +CONFIG_DM_MMC=y +CONFIG_SPL_MMC_TINY=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_ASPEED=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_WINBOND=y +CONFIG_PHY_BROADCOM=y +CONFIG_PHY_REALTEK=y +CONFIG_PHY_NCSI=y +CONFIG_DM_ETH=y +CONFIG_PHY_GIGE=y +CONFIG_FTGMAC100=y +CONFIG_MDIO=y +CONFIG_PHY=y +CONFIG_PINCTRL=y +CONFIG_RAM=y +CONFIG_SPL_RAM=y +CONFIG_DM_SERIAL=y +CONFIG_SYS_NS16550=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_SYSRESET=y +CONFIG_WDT=y +CONFIG_USE_TINY_PRINTF=y +CONFIG_TPM=y +CONFIG_SPL_TPM=y +# CONFIG_EFI_LOADER is not set
include/configs/aspeed-common.h +6 -0
@@ -41,6 +41,12 @@#define CONFIG_SYS_BOOTMAPSZ (256 * 1024 * 1024)#define CONFIG_SYS_MALLOC_LEN (32 << 20) +#ifdef CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 0 +#define CONFIG_ENV_OFFSET_REDUND 0x15000 +#endif +/* * BOOTP options */
Signature · 1 line
2.26.2
Joel Stanley
maintainerRe: [PATCH U-Boot v2019.04-aspeed-openbmc 3/3] configs: Add AST2600 SPL eMMC configuration
include/configs/aspeed-common.h line 47
Quoted 12 lines · Eddie James
include/configs/aspeed-common.h +4
-0@@ -41,6 +41,12 @@#define CONFIG_SYS_BOOTMAPSZ (256 * 1024 * 1024)#define CONFIG_SYS_MALLOC_LEN (32 << 20) +#ifdef CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 0 +#define CONFIG_ENV_OFFSET_REDUND 0x15000
84KB? How was this chosen?
Re: [PATCH U-Boot v2019.04-aspeed-openbmc 3/3] configs: Add AST2600 SPL eMMC configuration
Quoted 10 lines · Joel Stanley
Quoted 8 lines · Eddie James
include/configs/aspeed-common.h +0
-0@@ -41,6 +41,12 @@#define CONFIG_SYS_BOOTMAPSZ (256 * 1024 * 1024)#define CONFIG_SYS_MALLOC_LEN (32 << 20)
Quoted 5 lines
include/configs/aspeed-common.h line 47
Quoted 4 lines
include/configs/aspeed-common.h +4
-0+#ifdef CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 0 +#define CONFIG_ENV_OFFSET_REDUND 0x1500084KB? How was this chosen?
The env is at 0x5000 in the user partition, and is sized at 0x10000. The redundant follows it immediately...
Thanks,
Eddie
Joel Stanley
maintainerRe: [PATCH U-Boot v2019.04-aspeed-openbmc 3/3] configs: Add AST2600 SPL eMMC configuration
Quoted 20 lines · Eddie James
Quoted 10 lines · Joel Stanley
Quoted 8 lines · Eddie James
include/configs/aspeed-common.h +0
-0@@ -41,6 +41,12 @@#define CONFIG_SYS_BOOTMAPSZ (256 * 1024 * 1024)#define CONFIG_SYS_MALLOC_LEN (32 << 20)Quoted 5 lines
include/configs/aspeed-common.h line 47
Quoted 4 lines
include/configs/aspeed-common.h +4
-0+#ifdef CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 0 +#define CONFIG_ENV_OFFSET_REDUND 0x1500084KB? How was this chosen?
Quoted 2 lines
The env is at
0x5000in the user partition, and is sized at0x10000. The redundant follows it immediately...
Can you put that and the information from your other email in the commit message.
Joel Stanley
maintainerRe: [PATCH U-Boot v2019.04-aspeed-openbmc 3/3] configs: Add AST2600 SPL eMMC configuration
In reply to Eddie Jamesconfigs/ast2600_openbmc_spl_emmc_defconfig
Quoted 11 lines · Eddie James
U-Boot and environment are to be loaded off the eMMC.
Signed-off-by Eddie James <[email protected]>--- configs/ast2600_openbmc_spl_emmc_defconfig | 130 +++++++++++++++++++++ include/configs/aspeed-common.h | 6 + 2 files changed, 136 insertions(+) create mode 100644 configs/ast2600_openbmc_spl_emmc_defconfigconfigs/ast2600_openbmc_spl_emmc_defconfig +0
-0
Here's the diff between the emmc and nor configs:
$ diff -up configs/ast2600_openbmc_spl_defconfig configs/ast2600_openbmc_spl_emmc_defconfig --- configs/ast2600_openbmc_spl_defconfig 2020-09-24 14:39:38.129075805 +0930 +++ configs/ast2600_openbmc_spl_emmc_defconfig 2020-10-09 14:16:35.786706472 +1030 @@ -9,9 +9,10 @@ CONFIG_ARCH_ASPEED=y CONFIG_SYS_TEXT_BASE=0x10000 CONFIG_ASPEED_AST2600=y CONFIG_ASPEED_UBOOT_SPI_BASE=0x10000 -CONFIG_ASPEED_UBOOT_SPI_SIZE=0xe0000 -CONFIG_ASPEED_UBOOT_MMC_BASE=0x000000 -CONFIG_ASPEED_UBOOT_MMC_SIZE=0x700 +CONFIG_ASPEED_UBOOT_SPI_SIZE=0xd0000
Can we remove this from the config?
+CONFIG_ASPEED_UBOOT_MMC_BASE=0x80
+CONFIG_ASPEED_UBOOT_MMC_PART=1
+CONFIG_ASPEED_UBOOT_MMC_SIZE=0x680
CONFIG_ASPEED_UBOOT_UART_SIZE=0xe0000
CONFIG_ASPEED_UBOOT_DRAM_BASE=0x81000000
CONFIG_ASPEED_KERNEL_FIT_SPI_BASE=0x20100000
@@ -27,7 +28,7 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_ENV_SIZE=0x10000
-CONFIG_ENV_OFFSET=0xE0000
+CONFIG_ENV_OFFSET=0x5000
What's the 0x5000 here?
CONFIG_SPL=y
CONFIG_SPL_STACK_R_ADDR=0x90300000
CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
@@ -81,13 +82,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_CMD_MTDPARTS=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_SPL_OF_CONTROL=y
-CONFIG_ENV_IS_IN_SPI_FLASH=y
-CONFIG_USE_ENV_SPI_BUS=y
-CONFIG_ENV_SPI_BUS=0
-CONFIG_USE_ENV_SPI_CS=y
-CONFIG_ENV_SPI_CS=0
-CONFIG_USE_ENV_SPI_MAX_HZ=y
-CONFIG_ENV_SPI_MAX_HZ=100000000
+CONFIG_ENV_IS_IN_MMC=y
This hunk makes sense.
Re: [PATCH U-Boot v2019.04-aspeed-openbmc 3/3] configs: Add AST2600 SPL eMMC configuration
Quoted 27 lines · Joel Stanley
configs/ast2600_openbmc_spl_emmc_defconfig
Quoted 10 lines · Eddie James
U-Boot and environment are to be loaded off the eMMC.
Signed-off-by Eddie James <[email protected]>--- configs/ast2600_openbmc_spl_emmc_defconfig | 130 +++++++++++++++++++++ include/configs/aspeed-common.h | 6 + 2 files changed, 136 insertions(+)create mode 100644 configs/ast2600_openbmc_spl_emmc_defconfig
configs/ast2600_openbmc_spl_emmc_defconfig +0
-0Here's the diff between the emmc and nor configs:
$ diff -up configs/ast2600_openbmc_spl_defconfig configs/ast2600_openbmc_spl_emmc_defconfigast2600_openbmc_spl_emmc_defconfig 2020-10-09 renamed from ast2600_openbmc_spl_defconfig 2020-09-24 14:39:38.129075805 +0930 +0
-014:16:35.786706472 +1030
ast2600_openbmc_spl_emmc_defconfig 2020-10-09 renamed from ast2600_openbmc_spl_defconfig 2020-09-24 14:39:38.129075805 +0930 +1
-3@@ -9,9 +9,10 @@ CONFIG_ARCH_ASPEED=y CONFIG_SYS_TEXT_BASE=0x10000 CONFIG_ASPEED_AST2600=y CONFIG_ASPEED_UBOOT_SPI_BASE=0x10000 -CONFIG_ASPEED_UBOOT_SPI_SIZE=0xe0000 -CONFIG_ASPEED_UBOOT_MMC_BASE=0x000000 -CONFIG_ASPEED_UBOOT_MMC_SIZE=0x700 +CONFIG_ASPEED_UBOOT_SPI_SIZE=0xd0000
Quoted 1 line
Can we remove this from the config?
Yes? The build might complain if that isn't set?
Quoted 14 lines
ast2600_openbmc_spl_emmc_defconfig 2020-10-09 renamed from ast2600_openbmc_spl_defconfig 2020-09-24 14:39:38.129075805 +0930 +4
-1+CONFIG_ASPEED_UBOOT_MMC_BASE=0x80 +CONFIG_ASPEED_UBOOT_MMC_PART=1 +CONFIG_ASPEED_UBOOT_MMC_SIZE=0x680 CONFIG_ASPEED_UBOOT_UART_SIZE=0xe0000 CONFIG_ASPEED_UBOOT_DRAM_BASE=0x81000000 CONFIG_ASPEED_KERNEL_FIT_SPI_BASE=0x20100000@@ -27,7 +28,7 @@ CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_DRIVERS_MISC_SUPPORT=y CONFIG_ENV_SIZE=0x10000 -CONFIG_ENV_OFFSET=0xE0000 +CONFIG_ENV_OFFSET=0x5000
Quoted 1 line
What's the
0x5000here?
That's the location of the environment within the user partition of the MMC.
Thanks,
Eddie
Quoted 18 lines
CONFIG_SPL=y
CONFIG_SPL_STACK_R_ADDR=0x90300000
CONFIG_ARMV7_BOOT_SEC_DEFAULT=yast2600_openbmc_spl_emmc_defconfig 2020-10-09 renamed from ast2600_openbmc_spl_defconfig 2020-09-24 14:39:38.129075805 +0930 +1
-7@@ -81,13 +82,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_MTDPARTS=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_SPL_OF_CONTROL=y -CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_USE_ENV_SPI_BUS=y -CONFIG_ENV_SPI_BUS=0 -CONFIG_USE_ENV_SPI_CS=y -CONFIG_ENV_SPI_CS=0 -CONFIG_USE_ENV_SPI_MAX_HZ=y -CONFIG_ENV_SPI_MAX_HZ=100000000 +CONFIG_ENV_IS_IN_MMC=yThis hunk makes sense.