summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/sunxi/dram_sun4i.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 /arch/arm/cpu/armv7/sunxi/dram_sun4i.c
parenta881db09c073bfc043be8a7e909ac955fdd3794a (diff)
downloadu-boot-imx-8975cdf4bce6e562ebb5451a2d1a9beca096660b.zip
u-boot-imx-8975cdf4bce6e562ebb5451a2d1a9beca096660b.tar.gz
u-boot-imx-8975cdf4bce6e562ebb5451a2d1a9beca096660b.tar.bz2
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 'arch/arm/cpu/armv7/sunxi/dram_sun4i.c')
-rw-r--r--arch/arm/cpu/armv7/sunxi/dram_sun4i.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/dram_sun4i.c b/arch/arm/cpu/armv7/sunxi/dram_sun4i.c
index c736fa3..f7b4915 100644
--- a/arch/arm/cpu/armv7/sunxi/dram_sun4i.c
+++ b/arch/arm/cpu/armv7/sunxi/dram_sun4i.c
@@ -508,7 +508,7 @@ static void mctl_ddr3_initialize(void)
/*
* Perform impedance calibration on the DRAM controller side of the wire.
*/
-static void mctl_set_impedance(u32 zq, u32 odt_en)
+static void mctl_set_impedance(u32 zq, bool odt_en)
{
struct sunxi_dram_reg *dram = (struct sunxi_dram_reg *)SUNXI_DRAMC_BASE;
u32 reg_val;
@@ -556,7 +556,7 @@ static void mctl_set_impedance(u32 zq, u32 odt_en)
clrbits_le32(&dram->zqcr0, DRAM_ZQCR0_ZCAL);
/* Set I/O configure register */
- writel(DRAM_IOCR_ODT_EN(odt_en), &dram->iocr);
+ writel(DRAM_IOCR_ODT_EN, &dram->iocr);
}
static unsigned long dramc_init_helper(struct dram_para *para)