davinci: omapl138_lcdk: fix a few bugs for SPL boot
Subsystems (3)
v3 cover davinci: omapl138_lcdk: fix a few bugs for SPL boot
This patchset tries to fix the SPL on omapl138_lcdk. With this patchset, the SPL will be able to boot from EMMC/SPI.
The NAND support is still broken so the default u-boot.ais image still has a SPL that is unable to load u-boot.
Changes v2 .. v3
* Make CONFIG_SYS_DA850_PLL_INIT & CONFIG_SYS_DA850_DDR_INIT to be new Kconfig options.
Changes v1 .. v2:
* Don't add an AIS config file but instead configure the PLL and DDR in the SPL. This follow what other boards are doing.
* Use new kconfig option to support EMMC boot.
Fabien Parent (6):
ARM: davinci: Move CONFIG_SYS_DA850_PLL_INIT to Kconfig
ARM: davinci: Move CONFIG_SYS_DA850_DDR_INIT to Kconfig
davinci: omapl138_lcdk: configure pll0
davinci: omapl138_lcdk: configure ddr2
davinci: da850evm: fix empty boot method list in the SPL
davinci: omapl138_lcdk: add u-boot sector for mmc/sd boot
arch/arm/mach-davinci/Kconfig | 16 ++++++++++ board/davinci/da8xxevm/u-boot-spl-da850evm.lds | 3 ++ configs/omapl138_lcdk_defconfig | 1 + include/configs/calimain.h | 2 -- include/configs/da850evm.h | 2 -- include/configs/ipam390.h | 2 -- include/configs/legoev3.h | 2 -- include/configs/omapl138_lcdk.h | 41 ++++++++++++++++++++++++++ scripts/config_whitelist.txt | 2 -- 9 files changed, 61 insertions(+), 10 deletions(-)
Signature · 1 line
2.10.2
PATCH v3 1/6 ARM: davinci: Move CONFIG_SYS_DA850_PLL_INIT to Kconfig
Clean config headers by moving CONFIG_SYS_DA850_PLL_INIT away to a Kconfig file.
---
v1 -> v3
* New patch
--- arch/arm/mach-davinci/Kconfig | 7 +++++++ include/configs/calimain.h | 1 - include/configs/da850evm.h | 1 - include/configs/ipam390.h | 1 - include/configs/legoev3.h | 1 - scripts/config_whitelist.txt | 1 - 6 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/mach-davinci/Kconfig +7 -0
@@ -7,10 +7,12 @@ choice config TARGET_IPAM390 bool "IPAM390 board" select SUPPORT_SPL + select SYS_DA850_PLL_INIT config TARGET_DA850EVM bool "DA850 EVM board" select SUPPORT_SPL + select SYS_DA850_PLL_INIT config TARGET_EA20 bool "EA20 board"
@@ -21,15 +23,20 @@ config TARGET_OMAPL138_LCDK config TARGET_CALIMAIN bool "Calimain board" + select SYS_DA850_PLL_INIT config TARGET_LEGOEV3 bool "LEGO MINDSTORMS EV3" + select SYS_DA850_PLL_INIT endchoice config SYS_SOC default "davinci" +config SYS_DA850_PLL_INIT + bool + source "board/Barix/ipam390/Kconfig" source "board/davinci/da8xxevm/Kconfig" source "board/davinci/ea20/Kconfig"
include/configs/calimain.h +0 -1
@@ -32,7 +32,6 @@#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID)#define CONFIG_SYS_TEXT_BASE 0x60000000#define CONFIG_DA850_LOWLEVEL -#define CONFIG_SYS_DA850_PLL_INIT #define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_ARCH_CPU_INIT #define CONFIG_DA8XX_GPIO
include/configs/da850evm.h +0 -1
@@ -31,7 +31,6 @@#define CONFIG_SYS_OSCIN_FREQ 24000000#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) -#define CONFIG_SYS_DA850_PLL_INIT #define CONFIG_SYS_DA850_DDR_INIT #ifdef CONFIG_DIRECT_NOR_BOOT
include/configs/ipam390.h +0 -1
@@ -32,7 +32,6 @@#define CONFIG_SYS_OSCIN_FREQ 24000000#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) -#define CONFIG_SYS_DA850_PLL_INIT #define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_SYS_TEXT_BASE 0xc1080000
include/configs/legoev3.h +0 -1
@@ -26,7 +26,6 @@#define CONFIG_SYS_OSCIN_FREQ 24000000#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) -#define CONFIG_SYS_DA850_PLL_INIT #define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_SYS_TEXT_BASE 0xc1080000
scripts/config_whitelist.txt +0 -1
@@ -4778,7 +4778,6 @@ CONFIG_SYS_DA850_PLL1_PLLDIV2 CONFIG_SYS_DA850_PLL1_PLLDIV3 CONFIG_SYS_DA850_PLL1_PLLM CONFIG_SYS_DA850_PLL1_POSTDIV -CONFIG_SYS_DA850_PLL_INIT CONFIG_SYS_DA850_SYSCFG_SUSPSRC CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1
Signature · 1 line
2.10.2
PATCH v3 1/6 ARM: davinci: Move CONFIG_SYS_DA850_PLL_INIT to Kconfig
Quoted 4 lines · Fabien Parent
Clean config headers by moving
CONFIG_SYS_DA850_PLL_INITaway to aKconfigfile.Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/c76baafe/attachment.sig>
PATCH v3 1/6 ARM: davinci: Move CONFIG_SYS_DA850_PLL_INIT to Kconfig
In reply to Fabien ParentQuoted 5 lines · Fabien Parent
Clean config headers by moving
CONFIG_SYS_DA850_PLL_INITaway to aKconfigfile.Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/075a2fde/attachment.sig>
PATCH v3 2/6 ARM: davinci: Move CONFIG_SYS_DA850_DDR_INIT to Kconfig
In reply to Fabien ParentClean config headers by moving CONFIG_SYS_DA850_DDR_INIT away to a Kconfig file.
---
v1 -> v3
* New patch
--- arch/arm/mach-davinci/Kconfig | 7 +++++++ include/configs/calimain.h | 1 - include/configs/da850evm.h | 1 - include/configs/ipam390.h | 1 - include/configs/legoev3.h | 1 - scripts/config_whitelist.txt | 1 - 6 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/mach-davinci/Kconfig +7 -0
@@ -8,11 +8,13 @@ config TARGET_IPAM390 bool "IPAM390 board" select SUPPORT_SPL select SYS_DA850_PLL_INIT + select SYS_DA850_DDR_INIT config TARGET_DA850EVM bool "DA850 EVM board" select SUPPORT_SPL select SYS_DA850_PLL_INIT + select SYS_DA850_DDR_INIT config TARGET_EA20 bool "EA20 board"
@@ -24,10 +26,12 @@ config TARGET_OMAPL138_LCDK config TARGET_CALIMAIN bool "Calimain board" select SYS_DA850_PLL_INIT + select SYS_DA850_DDR_INIT config TARGET_LEGOEV3 bool "LEGO MINDSTORMS EV3" select SYS_DA850_PLL_INIT + select SYS_DA850_DDR_INIT endchoice
@@ -37,6 +41,9 @@ config SYS_SOC config SYS_DA850_PLL_INIT bool +config SYS_DA850_DDR_INIT + bool + source "board/Barix/ipam390/Kconfig" source "board/davinci/da8xxevm/Kconfig" source "board/davinci/ea20/Kconfig"
include/configs/calimain.h +0 -1
@@ -32,7 +32,6 @@#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID)#define CONFIG_SYS_TEXT_BASE 0x60000000#define CONFIG_DA850_LOWLEVEL -#define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_ARCH_CPU_INIT #define CONFIG_DA8XX_GPIO #define CONFIG_HW_WATCHDOG
include/configs/da850evm.h +0 -1
@@ -31,7 +31,6 @@#define CONFIG_SYS_OSCIN_FREQ 24000000#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) -#define CONFIG_SYS_DA850_DDR_INIT #ifdef CONFIG_DIRECT_NOR_BOOT #define CONFIG_ARCH_CPU_INIT
include/configs/ipam390.h +0 -1
@@ -32,7 +32,6 @@#define CONFIG_SYS_OSCIN_FREQ 24000000#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) -#define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_SYS_TEXT_BASE 0xc1080000/*
include/configs/legoev3.h +0 -1
@@ -26,7 +26,6 @@#define CONFIG_SYS_OSCIN_FREQ 24000000#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE#define CONFIG_SYS_HZ_CLOCK clk_get(DAVINCI_AUXCLK_CLKID) -#define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_SYS_TEXT_BASE 0xc1080000
scripts/config_whitelist.txt +0 -1
@@ -4762,7 +4762,6 @@ CONFIG_SYS_DA850_DDR2_SDBCR2 CONFIG_SYS_DA850_DDR2_SDRCR CONFIG_SYS_DA850_DDR2_SDTIMR CONFIG_SYS_DA850_DDR2_SDTIMR2 -CONFIG_SYS_DA850_DDR_INIT CONFIG_SYS_DA850_PLL0_PLLDIV1 CONFIG_SYS_DA850_PLL0_PLLDIV2 CONFIG_SYS_DA850_PLL0_PLLDIV3
Signature · 1 line
2.10.2
PATCH v3 2/6 ARM: davinci: Move CONFIG_SYS_DA850_DDR_INIT to Kconfig
Quoted 4 lines · Fabien Parent
Clean config headers by moving
CONFIG_SYS_DA850_DDR_INITaway to aKconfigfile.Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/4ce4e3cb/attachment.sig>
PATCH v3 2/6 ARM: davinci: Move CONFIG_SYS_DA850_DDR_INIT to Kconfig
In reply to Fabien ParentQuoted 5 lines · Fabien Parent
Clean config headers by moving
CONFIG_SYS_DA850_DDR_INITaway to aKconfigfile.Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/32458c74/attachment.sig>
PATCH v3 3/6 davinci: omapl138_lcdk: configure pll0
In reply to Fabien ParentThe SPL is not able to boot properly because the PLL0 is not configured. Configure it.
---
v2 -> v3
* Use new Kconfig option SYS_DA850_PLL_INIT instead of defining it in the config header file
v1 -> v2
* New patch
--- arch/arm/mach-davinci/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-davinci/Kconfig +1 -0
@@ -22,6 +22,7 @@ config TARGET_EA20 config TARGET_OMAPL138_LCDK bool "OMAPL138 LCDK" select SUPPORT_SPL + select SYS_DA850_PLL_INIT config TARGET_CALIMAIN bool "Calimain board"
Signature · 1 line
2.10.2
PATCH v3 3/6 davinci: omapl138_lcdk: configure pll0
Quoted 4 lines · Fabien Parent
The SPL is not able to boot properly because the PLL0 is not configured. Configure it.
Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/71c7c63d/attachment.sig>
PATCH v3 3/6 davinci: omapl138_lcdk: configure pll0
In reply to Fabien ParentQuoted 5 lines · Fabien Parent
The SPL is not able to boot properly because the PLL0 is not configured. Configure it.
Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/20bbba2f/attachment.sig>
PATCH v3 4/6 davinci: omapl138_lcdk: configure ddr2
In reply to Fabien ParentThe SPL is unable to load u-boot because the DDR2 is not configured. Configure the DDR2.
---
v2 -> v3
* Use new Kconfig option SYS_DA850_DDR_INIT instead of defining it in the config header file
v1 -> v2
* New patch
--- arch/arm/mach-davinci/Kconfig | 1 + include/configs/omapl138_lcdk.h | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+)
arch/arm/mach-davinci/Kconfig +1 -0
@@ -23,6 +23,7 @@ config TARGET_OMAPL138_LCDK bool "OMAPL138 LCDK" select SUPPORT_SPL select SYS_DA850_PLL_INIT + select SYS_DA850_DDR_INIT config TARGET_CALIMAIN bool "Calimain board"
include/configs/omapl138_lcdk.h +41 -0
47 lines not on this page · raw message
Signature · 1 line
2.10.2
PATCH v3 4/6 davinci: omapl138_lcdk: configure ddr2
Quoted 4 lines · Fabien Parent
The SPL is unable to load u-boot because the DDR2 is not configured. Configure the DDR2.
Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/dff66648/attachment.sig>
PATCH v3 4/6 davinci: omapl138_lcdk: configure ddr2
In reply to Fabien ParentQuoted 5 lines · Fabien Parent
The SPL is unable to load u-boot because the DDR2 is not configured. Configure the DDR2.
Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/b640944c/attachment.sig>
PATCH v3 5/6 davinci: da850evm: fix empty boot method list in the SPL
In reply to Fabien ParentThe list of available boot method is not part of the binary which prevent the SPL from booting u-boot or Linux.
Add the missing .u_boot_list* sections to the binary to fix it.
---
v2 -> v3:
* No change
v1 -> v2:
* No change
--- board/davinci/da8xxevm/u-boot-spl-da850evm.lds | 3 +++ 1 file changed, 3 insertions(+)
board/davinci/da8xxevm/u-boot-spl-da850evm.lds +3 -0
@@ -34,6 +34,9 @@ SECTIONS .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram . = ALIGN(4); + .u_boot_list : { KEEP(*(SORT(.u_boot_list*))); } >.sram + + . = ALIGN(4); .rel.dyn : { __rel_dyn_start = .; *(.rel*)
Signature · 1 line
2.10.2
PATCH v3 5/6 davinci: da850evm: fix empty boot method list in the SPL
Quoted 7 lines · Fabien Parent
The list of available boot method is not part of the binary which prevent the SPL from booting u-boot or Linux.
Add the missing .u_boot_list* sections to the binary to fix it.
Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/e1b4c42e/attachment.sig>
PATCH v3 6/6 davinci: omapl138_lcdk: add u-boot sector for mmc/sd boot
In reply to Fabien ParentSet the correct CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR value in order to be able to boot from MMC/SD.
The SPL is stored at sector 0x75, while u-boot will follow at sector 0xb5.
---
v2 -> v3:
* No change
v1 -> v2:
* Rebased on Sam's patches, i.e. use new Kconfig option instead of setting the value inside the config header file
--- configs/omapl138_lcdk_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/omapl138_lcdk_defconfig +1 -0
@@ -9,6 +9,7 @@ CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5 CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot > " # CONFIG_CMD_IMLS is not set
Signature · 1 line
2.10.2
PATCH v3 6/6 davinci: omapl138_lcdk: add u-boot sector for mmc/sd boot
Quoted 8 lines · Fabien Parent
Set the correct
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTORvalue in order to be able to boot from MMC/SD.The SPL is stored at sector
0x75, while u-boot will follow at sector0xb5.Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/b29068f2/attachment.sig>