sunxi: A64: fix default DRAM_ODT_EN symbol
Subsystems (3)
PATCH 1/1 sunxi: A64: fix default DRAM_ODT_EN symbol
"default" lines in Kconfig are processed in order, the first hit will stop considering subsequent lines. In the case of the DRAM_ODT_EN symbol that means that everything following the first two lines will never be checked:
------------
config DRAM_ODT_EN
bool "sunxi dram odt enable"
default n if !MACH_SUN8I_A23
default y if MACH_SUN8I_A23
default y if MACH_SUN8I_R40
default y if MACH_SUN50I
------------
Assuming that the "default y" for the A64 and the R40 were a deliberate choice, fix the Kconfig stanza to take this into account. Also remove the now redundant lines from the respective defconfigs.
---
Hi,
I would be grateful if people could test this and find out whether enabling ODT works reliably.
Thanks!
Andre.
arch/arm/mach-sunxi/Kconfig | 2 +- configs/Bananapi_M2_Ultra_defconfig | 1 - configs/amarula_a64_relic_defconfig | 1 - configs/bananapi_m2_berry_defconfig | 1 - configs/sopine_baseboard_defconfig | 1 - 5 files changed, 1 insertion(+), 5 deletions(-)
arch/arm/mach-sunxi/Kconfig +1 -1
@@ -405,10 +405,10 @@ config DRAM_ZQ config DRAM_ODT_EN bool "sunxi dram odt enable" - default n if !MACH_SUN8I_A23 default y if MACH_SUN8I_A23 default y if MACH_SUN8I_R40 default y if MACH_SUN50I + default n ---help--- Select this to enable dram odt (on die termination).
configs/Bananapi_M2_Ultra_defconfig +0 -1
@@ -4,7 +4,6 @@ CONFIG_SPL=y CONFIG_MACH_SUN8I_R40=y CONFIG_DRAM_CLK=576 CONFIG_DRAM_ZQ=3881979 -CONFIG_DRAM_ODT_EN=y CONFIG_MMC0_CD_PIN="PH13" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_DEFAULT_DEVICE_TREE="sun8i-r40-bananapi-m2-ultra"
configs/amarula_a64_relic_defconfig +0 -1
@@ -3,7 +3,6 @@ CONFIG_ARCH_SUNXI=y CONFIG_SPL=y CONFIG_MACH_SUN50I=y CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y -CONFIG_DRAM_ODT_EN=y CONFIG_MMC_SUNXI_SLOT_EXTRA=2 # CONFIG_VIDEO_DE2 is not set CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-amarula-relic"
configs/bananapi_m2_berry_defconfig +0 -1
@@ -4,7 +4,6 @@ CONFIG_SPL=y CONFIG_MACH_SUN8I_R40=y CONFIG_DRAM_CLK=576 CONFIG_DRAM_ZQ=3881979 -CONFIG_DRAM_ODT_EN=y CONFIG_MMC0_CD_PIN="PH13" CONFIG_DEFAULT_DEVICE_TREE="sun8i-v40-bananapi-m2-berry" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
configs/sopine_baseboard_defconfig +0 -1
@@ -6,7 +6,6 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y CONFIG_DRAM_CLK=552 CONFIG_DRAM_ZQ=3881949 -CONFIG_DRAM_ODT_EN=y CONFIG_MMC0_CD_PIN="" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_SPL_SPI_SUNXI=y
Signature · 1 line
2.14.4
PATCH 1/1 sunxi: A64: fix default DRAM_ODT_EN symbol
Quoted 39 lines · Andre Przywara
"default" lines in
Kconfigare processed in order, the first hit will stop considering subsequent lines. In the case of theDRAM_ODT_ENsymbol that means that everything following the first two lines will never be checked:
------------
configDRAM_ODT_EN
bool "sunxi dram odt enable"
default n if !MACH_SUN8I_A23
default y ifMACH_SUN8I_A23
default y ifMACH_SUN8I_R40
default y ifMACH_SUN50I
------------Assuming that the "default y" for the A64 and the R40 were a deliberate choice, fix the
Kconfigstanza to take this into account. Also remove the now redundant lines from the respective defconfigs.Signed-off-by Andre Przywara <[email protected]>---
Hi,I would be grateful if people could test this and find out whether enabling ODT works reliably.
Thanks!
Andre.arch/arm/mach-sunxi/Kconfig | 2 +- configs/Bananapi_M2_Ultra_defconfig | 1 - configs/amarula_a64_relic_defconfig | 1 - configs/bananapi_m2_berry_defconfig | 1 - configs/sopine_baseboard_defconfig | 1 - 5 files changed, 1 insertion(+), 5 deletions(-)arch/arm/mach-sunxi/Kconfig +0
-0
arch/arm/mach-sunxi/Kconfig config DRAM_ZQ · line 411
Quoted 8 lines
arch/arm/mach-sunxi/Kconfig +1
-1@@ -405,10 +405,10 @@ config DRAM_ZQ config DRAM_ODT_EN bool "sunxi dram odt enable" - default n if !MACH_SUN8I_A23 default y if MACH_SUN8I_A23 default y if MACH_SUN8I_R40 default y if MACH_SUN50I + default n
I think this is the default's default, so there's no need to set it explicitly. Otherwise,
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180725/59340850/attachment.sig>
PATCH 1/1 sunxi: A64: fix default DRAM_ODT_EN symbol
In reply to Andre PrzywaraQuoted 13 lines · Andre Przywara
"default" lines in
Kconfigare processed in order, the first hit will stop considering subsequent lines. In the case of theDRAM_ODT_ENsymbol that means that everything following the first two lines will never be checked:
------------
configDRAM_ODT_EN
bool "sunxi dram odt enable"
default n if !MACH_SUN8I_A23
default y ifMACH_SUN8I_A23
default y ifMACH_SUN8I_R40
default y ifMACH_SUN50I
------------
Quoted 6 lines
Assuming that the "default y" for the A64 and the R40 were a deliberate choice, fix the
Kconfigstanza to take this into account. Also remove the now redundant lines from the respective defconfigs.Signed-off-by Andre Przywara <[email protected]>---
Can someone confirm A23?
PATCH 1/1 sunxi: A64: fix default DRAM_ODT_EN symbol
Quoted 18 lines · Jagan Teki
Quoted 17 lines · Andre Przywara
"default" lines in
Kconfigare processed in order, the first hit will stop considering subsequent lines. In the case of theDRAM_ODT_ENsymbol that means that everything following the first two lines will never be checked:
------------
configDRAM_ODT_EN
bool "sunxi dram odt enable"
default n if !MACH_SUN8I_A23
default y ifMACH_SUN8I_A23
default y ifMACH_SUN8I_R40
default y ifMACH_SUN50I
------------Assuming that the "default y" for the A64 and the R40 were a deliberate choice, fix the
Kconfigstanza to take this into account. Also remove the now redundant lines from the respective defconfigs.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Andre Przywara <[email protected]>---
Can someone confirm A23?
PATCH 1/1 sunxi: A64: fix default DRAM_ODT_EN symbol
Quoted 19 lines · Chen-Yu Tsai
Quoted 18 lines · Jagan Teki
Quoted 17 lines · Andre Przywara
"default" lines in
Kconfigare processed in order, the first hit will stop considering subsequent lines. In the case of theDRAM_ODT_ENsymbol that means that everything following the first two lines will never be checked:
------------
configDRAM_ODT_EN
bool "sunxi dram odt enable"
default n if !MACH_SUN8I_A23
default y ifMACH_SUN8I_A23
default y ifMACH_SUN8I_R40
default y ifMACH_SUN50I
------------Assuming that the "default y" for the A64 and the R40 were a deliberate choice, fix the
Kconfigstanza to take this into account. Also remove the now redundant lines from the respective defconfigs.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Signed-off-by Andre Przywara <[email protected]>---
Can someone confirm A23?
Tested-by Chen-Yu Tsai <[email protected]> # A23
Removed 'default n' and
Applied to u-boot-sunxi/master