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

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Sep 9 11:45:56 UTC 2019


On 9/6/19 6:31 PM, duhuanpeng wrote:
> 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

Hello Duhuan,

thank you for your contribution. You can find the maintainer is Daniel
Schwierzeck with:

scripts/get_maintainer.pl -f arch/mips/mach-ath79/ar933x/lowlevel_init.S

The original code is by Wills Wang. I have put both on copy.

The process for committing patches is described here:
https://www.denx.de/wiki/U-Boot/Patches

>
> 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);

Actual AR9331 boards have different RAM sizes e.g. 32MiB or 64 MiB.
get_ram_size() probes the RAM size as powers of 2 from 256MiB to 4Byte.
It will be important to find out, why this fails for your board.

Could you, please, indicate which router you are building for, how much
RAM it has, and what the base address of the RAM is.

Best regards

Heinrich

>
>          return 0;
>   }
>
> thanks
>
>
>
>
> _______________________________________________
> U-Boot-Board-Maintainers mailing list
> U-Boot-Board-Maintainers at lists.denx.de
> https://lists.denx.de/listinfo/u-boot-board-maintainers
>



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