* [PATCH] Ocelot-3 memory configuration patch
@ 2004-12-07 0:35 Manish Lachwani
2004-12-07 10:06 ` Michael Stickel
0 siblings, 1 reply; 3+ messages in thread
From: Manish Lachwani @ 2004-12-07 0:35 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
Hi Ralf,
Based on your suggestion, I have now modified the Ocelot-3 code
to probe for memory that has been configured by PMON. Please review ...
Thanks
Manish Lachwani
[-- Attachment #2: common_mips_ocelot3_memory.patch --]
[-- Type: text/plain, Size: 1802 bytes --]
Index: linux/arch/mips/momentum/ocelot_3/prom.c
===================================================================
--- linux.orig/arch/mips/momentum/ocelot_3/prom.c
+++ linux/arch/mips/momentum/ocelot_3/prom.c
@@ -34,6 +34,7 @@
struct callvectors* debug_vectors;
extern unsigned long marvell_base;
extern unsigned long cpu_clock;
+extern unsigned long memsize;
#ifdef CONFIG_MV643XX_ETH
extern unsigned char prom_mac_addr_base[6];
@@ -194,6 +195,11 @@
NULL, 10);
printk("cpu_clock set to %d\n", cpu_clock);
}
+ if (strncmp("memsize", ptr, strlen("memsize")) == 0) {
+ memsize = simple_strtol(ptr + strlen("memsize="),
+ NULL, 10);
+ }
+
i++;
}
printk("arcs_cmdline: %s\n", arcs_cmdline);
@@ -222,6 +228,10 @@
cpu_clock = simple_strtol(*env + strlen("cpuclock="),
NULL, 10);
}
+ if (strncmp("memsize", *env, strlen("memsize")) == 0) {
+ memsize = simple_strtol(*env + strlen("memsize="),
+ NULL, 10);
+ }
env++;
}
#endif /* CONFIG_MIPS64 */
Index: linux/arch/mips/momentum/ocelot_3/setup.c
===================================================================
--- linux.orig/arch/mips/momentum/ocelot_3/setup.c
+++ linux/arch/mips/momentum/ocelot_3/setup.c
@@ -77,6 +77,9 @@
/* CPU clock */
unsigned long cpu_clock;
+/* Memory size */
+unsigned long memsize;
+
/* RTC/NVRAM */
unsigned char* rtc_base = (unsigned char*)(signed)0xfc800000;
@@ -390,8 +393,8 @@
printk(" - Boot flash write jumper: %s\n", (tmpword&0x40)?"installed":"absent");
printk(" - L3 cache size: %d MB\n", (1<<((tmpword&12) >> 2))&~1);
- /* Support for 256 MB memory */
- add_memory_region(0x0, 0x10000000, BOOT_MEM_RAM);
+ /* Support for memory configured by PMON*/
+ add_memory_region(0x0, memsize * 1024 * 1024, BOOT_MEM_RAM);
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Ocelot-3 memory configuration patch
2004-12-07 0:35 [PATCH] Ocelot-3 memory configuration patch Manish Lachwani
@ 2004-12-07 10:06 ` Michael Stickel
2004-12-07 16:55 ` Manish Lachwani
0 siblings, 1 reply; 3+ messages in thread
From: Michael Stickel @ 2004-12-07 10:06 UTC (permalink / raw)
To: linux-mips
What if the "memsize" PMON variable is not defined?
Can that happen. Then the memory size is either 0L,
or an undefined value.
Shouldn't it be initialized to 128 by default?
On Tuesday 07 December 2004 01:35, you wrote:
> Hi Ralf,
>
> Based on your suggestion, I have now modified the Ocelot-3 code
> to probe for memory that has been configured by PMON. Please review ...
>
> Thanks
> Manish Lachwani
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Ocelot-3 memory configuration patch
2004-12-07 10:06 ` Michael Stickel
@ 2004-12-07 16:55 ` Manish Lachwani
0 siblings, 0 replies; 3+ messages in thread
From: Manish Lachwani @ 2004-12-07 16:55 UTC (permalink / raw)
To: Michael Stickel; +Cc: linux-mips
Michael Stickel wrote:
> What if the "memsize" PMON variable is not defined?
> Can that happen. Then the memory size is either 0L,
> or an undefined value.
> Shouldn't it be initialized to 128 by default?
>
> On Tuesday 07 December 2004 01:35, you wrote:
>
>>Hi Ralf,
>>
>>Based on your suggestion, I have now modified the Ocelot-3 code
>>to probe for memory that has been configured by PMON. Please review ...
>>
>>Thanks
>>Manish Lachwani
>
>
memsize is always defined by PMON
Thanks
Manish Lachwani
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-12-07 16:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-07 0:35 [PATCH] Ocelot-3 memory configuration patch Manish Lachwani
2004-12-07 10:06 ` Michael Stickel
2004-12-07 16:55 ` Manish Lachwani
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.