diff options
author | Marco Stornelli <marco.stornelli@gmail.com> | 2008-09-16 03:14:03 -0400 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-09-22 03:51:01 -0400 |
commit | 48c1fd3882286fd9e978ca8725013f2e060b700e (patch) | |
tree | 77613bf4d867532f4f4976592a66ee39d96869c3 /arch | |
parent | 3d256151471ba9fd60a5b896a706eb21a6b1cea1 (diff) |
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')
-rw-r--r-- | arch/avr32/kernel/setup.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index d8e623c426c1..5c7083916c33 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) | |||
283 | } | 283 | } |
284 | early_param("fbmem", early_parse_fbmem); | 284 | early_param("fbmem", early_parse_fbmem); |
285 | 285 | ||
286 | /* | ||
287 | * Pick out the memory size. We look for mem=size@start, | ||
288 | * where start and size are "size[KkMmGg]" | ||
289 | */ | ||
290 | static int __init early_mem(char *p) | ||
291 | { | ||
292 | resource_size_t size, start; | ||
293 | |||
294 | start = system_ram->start; | ||
295 | size = memparse(p, &p); | ||
296 | if (*p == '@') | ||
297 | start = memparse(p + 1, &p); | ||
298 | |||
299 | system_ram->start = start; | ||
300 | system_ram->end = system_ram->start + size - 1; | ||
301 | return 0; | ||
302 | } | ||
303 | early_param("mem", early_mem); | ||
304 | |||
286 | static int __init parse_tag_core(struct tag *tag) | 305 | static int __init parse_tag_core(struct tag *tag) |
287 | { | 306 | { |
288 | if (tag->hdr.size > 2) { | 307 | if (tag->hdr.size > 2) { |