Skip to contentSkip to conversation

MIPS: ralink: add missing SZ_1M multiplier

PATCH In review John Crispin 2 participants 3 messages Jun 6, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: ralink: add missing SZ_1M multiplier

On RT5350 the memory size is set to Bytes and not MegaBytes due to a missing multiplier.

---
 arch/mips/ralink/of.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/ralink/of.c +1 -1
index f916774..b25c1f2 100644
@@ -88,7 +88,7 @@ void __init plat_mem_setup(void)
 	__dt_setup_arch(&__dtb_start);
 
 	if (soc_info.mem_size)
-		add_memory_region(soc_info.mem_base, soc_info.mem_size,
+		add_memory_region(soc_info.mem_base, soc_info.mem_size * SZ_1M,
 				  BOOT_MEM_RAM);
 	else
 		detect_memory_region(soc_info.mem_base,
Signature · 1 line
1.7.10.4
#1 lore raw

2013/6/6 John Crispin <[email protected]>:

Quoted 2 lines

On RT5350 the memory size is set to Bytes and not MegaBytes due to a missing multiplier.

You might want to mention that the regression got introduced in dd63b008 ("MIPS: ralink: make use of the new memory detection code"). This also needs to be in a future 3.10-rc pull request to Linus.

Cheers

Quoted 23 lines
---
 arch/mips/ralink/of.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/ralink/of.c +1 -2
index f916774..b25c1f2 100644
@@ -88,7 +88,7 @@ void __init plat_mem_setup(void)
        __dt_setup_arch(&__dtb_start);
 
        if (soc_info.mem_size)
-               add_memory_region(soc_info.mem_base, soc_info.mem_size,
+               add_memory_region(soc_info.mem_base, soc_info.mem_size * SZ_1M,
                                  BOOT_MEM_RAM);
        else
                detect_memory_region(soc_info.mem_base,
--

1.7.10.4

#2 lore raw
Quoted 8 lines · Florian Fainelli

2013/6/6 John Crispin<[email protected]>:

Quoted 2 lines

On RT5350 the memory size is set to Bytes and not MegaBytes due to a missing multiplier.

You might want to mention that the regression got introduced in dd63b008 ("MIPS: ralink: make use of the new memory detection code"). This also needs to be in a future 3.10-rc pull request to Linus.

Cheers

Hi Florian

correct !

i mailed it as ralf is preparing a 3.10-rc pull request and i wanted this to make it ....

i will ping ralf on irc and ask him to fold the "dd63b008 ("MIPS: ralink: make use of the new memory detection code")." bit into the comment

Thanks,
John