]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - board/sipeed/maix/maix.c
treewide: Remove clk_free
[thirdparty/u-boot.git] / board / sipeed / maix / maix.c
index cbcb23cf5c2825bb98ea1718c5da097203316562..06653b5a8765922d4efde12cd40d7e52868526f7 100644 (file)
 
 phys_size_t get_effective_memsize(void)
 {
-       return CONFIG_SYS_SDRAM_SIZE;
+       return CFG_SYS_SDRAM_SIZE;
 }
 
-int board_init(void)
+static int sram_init(void)
 {
        int ret, i;
-       const char * const banks[] = { "sram0", "sram1", "airam" };
+       const char * const banks[] = { "sram0", "sram1", "aisram" };
        ofnode memory;
        struct clk clk;
 
        /* Enable RAM clocks */
-       memory = ofnode_by_compatible(ofnode_null(), "kendryte,k210-sram");
+       memory = ofnode_by_compatible(ofnode_null(), "canaan,k210-sram");
        if (ofnode_equal(memory, ofnode_null()))
                return -ENOENT;
 
@@ -32,10 +32,19 @@ int board_init(void)
                        continue;
 
                ret = clk_enable(&clk);
-               clk_free(&clk);
                if (ret)
                        return ret;
        }
 
        return 0;
 }
+
+int board_early_init_f(void)
+{
+       return sram_init();
+}
+
+int board_init(void)
+{
+       return 0;
+}