@@ -44,4 +44,6 @@ config BOARD_SPECIFIC_OPTIONS
imply RESET_SYSCON
imply SYSRESET
imply SYSRESET_SYSCON
+ imply RAM
+ imply K210_SRAM
endif
@@ -9,33 +9,7 @@
#include <fdt_support.h>
#include <asm/io.h>
-phys_size_t get_effective_memsize(void)
-{
- return CONFIG_SYS_SDRAM_SIZE;
-}
-
int board_init(void)
{
- int ret, i;
- const char * const banks[] = { "sram0", "sram1", "airam" };
- ofnode memory;
- struct clk clk;
-
- /* Enable RAM clocks */
- memory = ofnode_by_compatible(ofnode_null(), "kendryte,k210-sram");
- if (ofnode_equal(memory, ofnode_null()))
- return -ENOENT;
-
- for (i = 0; i < ARRAY_SIZE(banks); i++) {
- ret = clk_get_by_name_nodev(memory, banks[i], &clk);
- if (ret)
- continue;
-
- ret = clk_enable(&clk);
- clk_free(&clk);
- if (ret)
- return ret;
- }
-
return 0;
}
@@ -1,4 +1,5 @@
CONFIG_RISCV=y
+CONFIG_SYS_MALLOC_F_LEN=0x10000
CONFIG_TARGET_SIPEED_MAIX=y
CONFIG_ARCH_RV64I=y
CONFIG_STACK_SIZE=0x100000
@@ -14,10 +14,6 @@
#define CONFIG_SYS_MALLOC_LEN SZ_128K
#define CONFIG_SYS_CACHELINE_SIZE 64
-#define CONFIG_SYS_SDRAM_BASE 0x80000000
-/* Don't relocate into AI ram since it isn't set up yet */
-#define CONFIG_SYS_SDRAM_SIZE (SZ_4M + SZ_2M)
-
/* For early init */
#define K210_SYSCTL_BASE 0x50440000
CONFIG_SYS_SDRAM_{BASE,SIZE} are no longer necessary. The default get_effective_memsize will also work. The clock driver creates a bunch of devices, so we need to increase the pre-reloc malloc arena. Signed-off-by: Sean Anderson <seanga2@gmail.com> --- board/sipeed/maix/Kconfig | 2 ++ board/sipeed/maix/maix.c | 26 -------------------------- configs/sipeed_maix_bitm_defconfig | 1 + include/configs/sipeed-maix.h | 4 ---- 4 files changed, 3 insertions(+), 30 deletions(-)