]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: BCM47XX: improve memory size detection
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 3 Oct 2012 11:34:17 +0000 (11:34 +0000)
committerJohn Crispin <blogic@openwrt.org>
Fri, 9 Nov 2012 10:37:17 +0000 (11:37 +0100)
commitae07d69d6df074c6fe23971b85ef7d3edbb61952
tree55182513e1ffc244339cc41ba5513519bc095d1c
parent5192c73cd5f8d93063b213657b1e703e465f63b9
MIPS: BCM47XX: improve memory size detection

The memory size is detected by finding a place where it repeats in
memory. Currently we are just checking when the function prom_init is
seen again, but it is better to check for a bigger part of the memory
to decrease the chance of wrong results.

This should fix a problem we saw in OpenWrt, where the detected
available memory decreed on some devices when doing a soft reboot.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: http://patchwork.linux-mips.org/patch/4362
Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/bcm47xx/prom.c