summaryrefslogtreecommitdiffstats
path: root/arch/avr32/kernel
diff options
context:
space:
mode:
authorMarco Stornelli <marco.stornelli@gmail.com>2008-09-16 09:14:03 +0200
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-09-22 09:51:01 +0200
commit48c1fd3882286fd9e978ca8725013f2e060b700e (patch)
tree77613bf4d867532f4f4976592a66ee39d96869c3 /arch/avr32/kernel
parent3d256151471ba9fd60a5b896a706eb21a6b1cea1 (diff)
downloadop-kernel-dev-48c1fd3882286fd9e978ca8725013f2e060b700e.zip
op-kernel-dev-48c1fd3882286fd9e978ca8725013f2e060b700e.tar.gz
avr32: added mem kernel command line option support
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/kernel')
-rw-r--r--arch/avr32/kernel/setup.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
index d8e623c..5c70839 100644
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -283,6 +283,25 @@ static int __init early_parse_fbmem(char *p)
}
early_param("fbmem", early_parse_fbmem);
+/*
+ * Pick out the memory size. We look for mem=size@start,
+ * where start and size are "size[KkMmGg]"
+ */
+static int __init early_mem(char *p)
+{
+ resource_size_t size, start;
+
+ start = system_ram->start;
+ size = memparse(p, &p);
+ if (*p == '@')
+ start = memparse(p + 1, &p);
+
+ system_ram->start = start;
+ system_ram->end = system_ram->start + size - 1;
+ return 0;
+}
+early_param("mem", early_mem);
+
static int __init parse_tag_core(struct tag *tag)
{
if (tag->hdr.size > 2) {
OpenPOWER on IntegriCloud