summaryrefslogtreecommitdiffstats
path: root/board/sunxi/dram_sun5i_auto.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-05-13 15:00:46 +0200
committerHans de Goede <hdegoede@redhat.com>2015-05-19 18:46:44 +0200
commit8975cdf4bce6e562ebb5451a2d1a9beca096660b (patch)
treedef8587997c42c10c7a8cdffe74ddccb1737769d /board/sunxi/dram_sun5i_auto.c
parenta881db09c073bfc043be8a7e909ac955fdd3794a (diff)
downloadtalos-obmc-uboot-8975cdf4bce6e562ebb5451a2d1a9beca096660b.tar.gz
talos-obmc-uboot-8975cdf4bce6e562ebb5451a2d1a9beca096660b.zip
sunxi: Make DRAM_ODT_EN Kconfig setting a bool
Make DRAM_ODT_EN Kconfig setting a bool, add a separate DRAM_ODT_CORRECTION setting for A23 SoCs and use DRAM_ODT_EN Kconfig everywhere instead of only in dram_sun4i.c and hardcoding odt_en elsewhere. Note this commit makes no functional changes for existing boards, its purpose is to allow changing the odt_en value on future A33 boards. For sun4i/sun5i/sun7i boards which set DRAM_ODT_EN=y (which no defconfigs currently do) this patch turns on odt for both the DQ and the DQS lines, whereas previously it was possibly (but not desirable) to turn odt on only for one of them by setting the in DRAM_ODT_EN option to 1 or 2 instead of 3. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Diffstat (limited to 'board/sunxi/dram_sun5i_auto.c')
-rw-r--r--board/sunxi/dram_sun5i_auto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/sunxi/dram_sun5i_auto.c b/board/sunxi/dram_sun5i_auto.c
index 660b18ebbd..596a206072 100644
--- a/board/sunxi/dram_sun5i_auto.c
+++ b/board/sunxi/dram_sun5i_auto.c
@@ -2,6 +2,7 @@
#include <common.h>
#include <asm/arch/dram.h>
+#include <linux/kconfig.h>
static struct dram_para dram_para = {
.clock = CONFIG_DRAM_CLK,
@@ -12,7 +13,7 @@ static struct dram_para dram_para = {
.io_width = 0,
.bus_width = 0,
.zq = CONFIG_DRAM_ZQ,
- .odt_en = CONFIG_DRAM_ODT_EN,
+ .odt_en = IS_ENABLED(CONFIG_DRAM_ODT_EN),
.size = 0,
#ifdef CONFIG_DRAM_TIMINGS_VENDOR_MAGIC
.cas = 9,
OpenPOWER on IntegriCloud