#16844: AsiaRF AWM003 (ramips) memory detection problem, finds 32meg instead of
64meg
-----------------------+-------------------------------------
 Reporter:  russell@…  |      Owner:  developers
     Type:  defect     |     Status:  new
 Priority:  normal     |  Milestone:  Barrier Breaker (trunk)
Component:  packages   |    Version:  Trunk
 Keywords:             |
-----------------------+-------------------------------------
 We have a few of the AWM003 modules and AWM-EVB eval boards, and building
 a stock openwrt trunk image as of r41281
 (CONFIG_TARGET_ramips_rt305x_AWM002EVB=y) builds and runs fine, but we
 have noticed that the memory that the kernel finds is only 32meg instead
 of the 64meg that are on the board.  I have successfully hacked the dts to
 force 64meg:

 {{{
 diff --git a/target/linux/ramips/dts/AWM002.dtsi
 b/target/linux/ramips/dts/AWM002.dtsi
 index e1579b5..e41fcf6 100644
 --- a/target/linux/ramips/dts/AWM002.dtsi
 +++ b/target/linux/ramips/dts/AWM002.dtsi
 @@ -4,6 +4,11 @@
         compatible = "AWM002", "ralink,rt5350-soc";
         model = "AsiaRF AWM002";

 +        memory@0 {
 +                device_type = "memory";
 +                reg = <0x0 0x4000000>;
 +        };
 +
         palmbus@10000000 {
                 spi@b00 {
                         status = "okay";
 }}}

 and it runs fine that way, but since the AWM002 and AWM003 are apparently
 otherwise identical, it seems a shame to need a different image for each
 module and that dynamic memory size detection doesn't seem to be working.

 I found the function static unsigned long rt5350_get_mem_size(void) in
 build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-
 ramips_rt305x/linux-3.10.36/arch/mips/ralink/rt305x.c and if it's actually
 being used in this context implies that something is setting up the
 SYSCFG0 register incorrectly (the bootloader? something else?).  The
 bootloader implies it detects 64meg right before the kernel boots:

 {{{
 [...]
 3: System Boot system code via Flash.
 ## Booting image at bc050000 ...
 raspi_read: from:50000 len:40
 .   Image Name:   MIPS OpenWrt Linux-3.10.36
    Created:      2014-06-19  21:28:49 UTC
    Image Type:   MIPS Linux Kernel Image (lzma compressed)
    Data Size:    982105 Bytes = 959.1 kB
    Load Address: 80000000
    Entry Point:  80000000
 raspi_read: from:50040 len:efc59
 ...............   Verifying Checksum ... OK
    Uncompressing Kernel Image ... OK
 No initrd
 ## Transferring control to Linux (at address 80000000) ...
 ## Giving linux memsize in MB, 64

 Starting kernel ...

 [    0.000000] Linux version 3.10.36 (openwrt@iris) (gcc version 4.8.3
 (OpenWrt/Linaro GCC 4.8-2014.04 r41055) ) #20 Thu Jun 19 14:28:40 PDT 2014
 [    0.000000] SoC Type: Ralink RT5350 id:1 rev:3
 [    0.000000] bootconsole [early0] enabled
 [    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
 [    0.000000] MIPS: machine is AsiaRF AWM002 EVB
 [    0.000000] Determined physical RAM map:
 [    0.000000]  memory: 02000000 @ 00000000 (usable)
 [    0.000000] Initrd not found or empty - disabling initrd
 [    0.000000] Zone ranges:
 [    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
 [    0.000000] Movable zone start for each node
 [    0.000000] Early memory node ranges
 [    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
 [    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32
 bytes.
 [    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize
 32 bytes
 [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.
 Total pages: 8128
 [...]
 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/16844>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to