1 --- a/arch/arm/mach-ixp4xx/wg302v1-setup.c
2 +++ b/arch/arm/mach-ixp4xx/wg302v1-setup.c
3 @@ -117,6 +117,34 @@ static struct platform_device *wg302v1_d
7 +static char wg302v1_mem_fixup[] __initdata = " mem=32M";
9 +static void __init wg302v1_fixup(struct tag *tags, char **cmdline)
11 + struct tag *t = tags;
13 + size_t fixlen, cmdlen;
15 + /* Find the end of the tags table, taking note of any cmdline tag. */
16 + for (; t->hdr.size; t = tag_next(t)) {
17 + if (t->hdr.tag == ATAG_CMDLINE) {
18 + p = t->u.cmdline.cmdline;
22 + fixlen = strlen(wg302v1_mem_fixup);
24 + if (fixlen + cmdlen >= COMMAND_LINE_SIZE)
27 + /* append the fixup to the cmdline */
28 + memmove(p + cmdlen, wg302v1_mem_fixup, fixlen + 1);
30 + /* Adjust the size of the atag if there was one */
32 + t->hdr.size += fixlen;
35 static void __init wg302v1_init(void)