summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-sunxi/dram_sun4i.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-05-13 13:00:46 (GMT)
committerHans de Goede <hdegoede@redhat.com>2015-05-19 16:46:44 (GMT)
commit8975cdf4bce6e562ebb5451a2d1a9beca096660b (patch)
treedef8587997c42c10c7a8cdffe74ddccb1737769d /arch/arm/include/asm/arch-sunxi/dram_sun4i.h
parenta881db09c073bfc043be8a7e909ac955fdd3794a (diff)
downloadu-boot-fsl-qoriq-8975cdf4bce6e562ebb5451a2d1a9beca096660b.tar.xz
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/include/asm/arch-sunxi/dram_sun4i.h')
-rw-r--r--arch/arm/include/asm/arch-sunxi/dram_sun4i.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun4i.h b/arch/arm/include/asm/arch-sunxi/dram_sun4i.h
index 40c385a..139e336 100644
--- a/arch/arm/include/asm/arch-sunxi/dram_sun4i.h
+++ b/arch/arm/include/asm/arch-sunxi/dram_sun4i.h
@@ -164,8 +164,7 @@ struct dram_para {
#define DRAM_ZQSR_ZDONE (1 << 31) /* ZQ calibration completion flag */
-#define DRAM_IOCR_ODT_EN(n) ((((n) & 0x3) << 30) | ((n) & 0x3) << 0)
-#define DRAM_IOCR_ODT_EN_MASK DRAM_IOCR_ODT_EN(0x3)
+#define DRAM_IOCR_ODT_EN ((3 << 30) | (3 << 0))
#define DRAM_MR_BURST_LENGTH(n) (((n) & 0x7) << 0)
#define DRAM_MR_BURST_LENGTH_MASK DRAM_MR_BURST_LENGTH(0x7)