diff mbox

[OpenWrt-Devel,4/4] ralink: firewrt support memory detect

Message ID 1430965539-10221-4-git-send-email-fl.service@t-firefly.com
State Rejected
Headers show

Commit Message

wengbj May 7, 2015, 2:25 a.m. UTC
Signed-off-by: wengbj <fl.service@t-firefly.com>
---
 target/linux/ramips/dts/FIREWRT.dts |    5 -----
 1 file changed, 5 deletions(-)

Comments

Felix Fietkau June 4, 2015, 9:52 p.m. UTC | #1
On 2015-05-07 04:25, wengbj wrote:
> Signed-off-by: wengbj <fl.service@t-firefly.com>
FYI, I've fixed highmem support for the FireWRT board properly in r45889
+ r45890.
It works fine on my board and I've verified it using memtester.

- Felix
Felix Fietkau June 5, 2015, 7:01 a.m. UTC | #2
On 2015-06-05 08:16, wbj@t-chip.com.cn wrote:
> Dear sir:
>     it not working on my board .
Please provide details.

>     The memory map is not correct. and you forget to using long jump.
In my tests, I found that the window at 0x20000000 is bigger than
documented in the datasheet. I'm not entirely sure about how it is
routed in the hardware, maybe I need to add a 64M offset to account for
the re-map, but I did run memtester for a while with the biggest memory
size I could use, and it did not print any errors.

Since I use only 256M low-mem, the long-jump is not necessary.

- Felix
Felix Fietkau June 5, 2015, 7:40 a.m. UTC | #3
On 2015-06-05 09:30, wbj@t-chip.com.cn wrote:
> Dear sir:
>     I believe that it will work well on other 256mb memory board .
> 
>     But FireWRT has 512mb memory .
>     I am confuse that enable HIGHMEM is not for using 512mb memory ? 
I'm running my code on the FireWRT board with 512M.
I ran memtester with 465M (biggest mmap it could do without causing OOM).

>     Why enable HIGHMEM without using long jump .
kmalloc will only return allocations from low-memory space. As long as
the first 256M are low-mem and the second 256M are high-mem, no
long-jump is needed.

I have another idea for adjusting the code to the memory map you
provided without using long-jump. I'm going to change the highmem start
offset from 0x20000000 to 0x10000000, that way module allocations will
always fit in the 256M boundary.

- Felix
Felix Fietkau June 5, 2015, 8:10 a.m. UTC | #4
On 2015-06-05 09:54, wbj@t-chip.com.cn wrote:
> Dear sir:
> 
>     i got it.
>     please ignore the 2 patches i have send this morning .
>     i will try again and give you more detail.
I now implemented the highmem offset change that I mentioned in my last
email and added your memory map fix. It is working well in my test.

- Felix
diff mbox

Patch

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index 2b018e6..d0decd5 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -6,11 +6,6 @@ 
 	compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
 	model = "Firefly FireWRT";
 
-	memory@0 {
-		device_type = "memory";
-		reg = <0x0 0x10000000>;
-	};
-
 	chosen {
 		bootargs = "console=ttyS0,57600";
 	};