[U-Boot-Board-Maintainers] mach-ath79: ap121(ar9331) die in lowlevel_init

duhuanpeng iu87m888m at qq.com
Fri Sep 6 16:31:26 UTC 2019


Hello, 

I have a AR9331 board, with 64MB RAM and 16MB SPI Flash, I find it dies
in arch/mips/mach-ath79/ar933x/lowlevel_init.S

Here is my modified code

du at router:~/hc9391/u-boot$ git diff
diff --git a/arch/mips/mach-ath79/ar933x/lowlevel_init.S b/arch/mips/mach-ath79/ar933x/lowlevel_init.S
index 390d4b3..872c092 100644
--- a/arch/mips/mach-ath79/ar933x/lowlevel_init.S
+++ b/arch/mips/mach-ath79/ar933x/lowlevel_init.S
@@ -78,6 +78,15 @@ LEAF(lowlevel_init)
        /* These three WLAN_RESET will avoid original issue */
        li      t3, 0x03
 1:
+
+li      t0, 0x18040000
+li      t1, 1
+sw      t1, 0(t0)
+
+lw      t1, 8(t0)
+xori    t1, t1, 1
+sw      t1, 8(t0)
+
        li      t0, CKSEG1ADDR(AR71XX_RESET_BASE)
        lw      t1, AR933X_RESET_REG_RESET_MODULE(t0)
        ori     t1, t1, 0x0800
diff --git a/arch/mips/mach-ath79/dram.c b/arch/mips/mach-ath79/dram.c
index 138a7f8..4b6672f 100644
--- a/arch/mips/mach-ath79/dram.c
+++ b/arch/mips/mach-ath79/dram.c
@@ -13,7 +13,7 @@ DECLARE_GLOBAL_DATA_PTR;
 int dram_init(void)
 {
        ddr_tap_tuning();
-       gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M);
+       gd->ram_size = get_ram_size((void *)KSEG1, SZ_64M);
 
        return 0;
 }

thanks






More information about the U-Boot-Board-Maintainers mailing list