1 --- a/arch/arm/mach-ixp4xx/wg302v1-setup.c
2 +++ b/arch/arm/mach-ixp4xx/wg302v1-setup.c
3 @@ -117,6 +117,35 @@ 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,
12 + struct tag *t = tags;
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 + /* Overwrite the end of the table with a new cmdline tag. */
23 + t->hdr.tag = ATAG_CMDLINE;
24 + t->hdr.size = (sizeof (struct tag_header) +
25 + strlen(wg302v1_mem_fixup) + strlen(p) + 1 + 4) >> 2;
26 + strlcpy(t->u.cmdline.cmdline, wg302v1_mem_fixup, COMMAND_LINE_SIZE);
27 + strlcpy(t->u.cmdline.cmdline + strlen(wg302v1_mem_fixup), p,
28 + COMMAND_LINE_SIZE - strlen(wg302v1_mem_fixup));
30 + /* Terminate the table. */
32 + t->hdr.tag = ATAG_NONE;
36 static void __init wg302v1_init(void)