ram: sun20i_d1: Hack up the driver for the D1

Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
Samuel Holland 2023-10-31 02:40:12 -05:00
parent 82a78f639b
commit f6f17315f7
2 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,6 @@
config DRAM_SUN20I_D1 config DRAM_SUN20I_D1
bool bool "DRAM driver support for Allwinner R528/T113s"
depends on ARCH_SUNXI depends on BOARD_SUNXI
help help
This enables support for the DRAM controller driver covering This enables support for the DRAM controller driver covering
the Allwinner D1/R528/T113s SoCs. the Allwinner D1/R528/T113s SoCs.

View File

@ -12,7 +12,23 @@
* [1] https://github.com/szemzoa/awboot.git * [1] https://github.com/szemzoa/awboot.git
*/ */
#ifndef CONFIG_DRAM_CLK
#define CONFIG_DRAM_CLK 792
#endif
#ifndef CONFIG_DRAM_ZQ
#define CONFIG_DRAM_ZQ 0x007b7bfb
#endif
#define readl rv_readl
#define writel rv_writel
#include <asm/io.h> #include <asm/io.h>
#undef readl
#undef writel
#define readl(x) rv_readl((const volatile void __iomem *)(u64)(x))
#define writel(v, x) rv_writel(v, (volatile void __iomem *)(u64)(x))
#include <config.h> #include <config.h>
#include <cpu_func.h> #include <cpu_func.h>
#ifdef CONFIG_RAM #ifdef CONFIG_RAM