All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] MIPS: ath79: make use of the new memory detection code
@ 2013-04-15 10:45 John Crispin
  2013-04-19 19:22 ` Gabor Juhos
  0 siblings, 1 reply; 2+ messages in thread
From: John Crispin @ 2013-04-15 10:45 UTC (permalink / raw)
  To: Gabor Juhos; +Cc: linux-mips, John Crispin

There is now a generic function for detecting memory size. Use this instead of
the one found in the ath79 support.

Signed-off-by: John Crispin <blogic@openwrt.org>
---
Hi Gabor,

I only compile tested this one inside a openwrt tree.

 arch/mips/ath79/setup.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index d5b3c90..a0233a2 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -51,20 +51,6 @@ static void ath79_halt(void)
 		cpu_wait();
 }
 
-static void __init ath79_detect_mem_size(void)
-{
-	unsigned long size;
-
-	for (size = ATH79_MEM_SIZE_MIN; size < ATH79_MEM_SIZE_MAX;
-	     size <<= 1) {
-		if (!memcmp(ath79_detect_mem_size,
-			    ath79_detect_mem_size + size, 1024))
-			break;
-	}
-
-	add_memory_region(0, size, BOOT_MEM_RAM);
-}
-
 static void __init ath79_detect_sys_type(void)
 {
 	char *chip = "????";
@@ -212,7 +198,7 @@ void __init plat_mem_setup(void)
 					 AR71XX_DDR_CTRL_SIZE);
 
 	ath79_detect_sys_type();
-	ath79_detect_mem_size();
+	detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
 	ath79_clocks_init();
 
 	_machine_restart = ath79_restart;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] MIPS: ath79: make use of the new memory detection code
  2013-04-15 10:45 [RFC] MIPS: ath79: make use of the new memory detection code John Crispin
@ 2013-04-19 19:22 ` Gabor Juhos
  0 siblings, 0 replies; 2+ messages in thread
From: Gabor Juhos @ 2013-04-19 19:22 UTC (permalink / raw)
  To: John Crispin; +Cc: linux-mips

2013.04.15. 12:45 keltezéssel, John Crispin írta:
> There is now a generic function for detecting memory size. Use this instead of
> the one found in the ath79 support.
> 
> Signed-off-by: John Crispin <blogic@openwrt.org>

Although this was sent only as an RFC, it is working on top of v2 of the
detect_memory_region patch series.

Acked-by: Gabor Juhos <juhosg@openwrt.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-19 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15 10:45 [RFC] MIPS: ath79: make use of the new memory detection code John Crispin
2013-04-19 19:22 ` Gabor Juhos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.