Commit 48c1fd38 authored by Marco Stornelli's avatar Marco Stornelli Committed by Haavard Skinnemoen

avr32: added mem kernel command line option support

Signed-off-by: default avatarMarco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
parent 3d256151
...@@ -283,6 +283,25 @@ static int __init early_parse_fbmem(char *p) ...@@ -283,6 +283,25 @@ static int __init early_parse_fbmem(char *p)
} }
early_param("fbmem", early_parse_fbmem); 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) static int __init parse_tag_core(struct tag *tag)
{ {
if (tag->hdr.size > 2) { if (tag->hdr.size > 2) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment