1 Index: linux-2.6.25.1/arch/arm/mach-ixp4xx/wg302v1-setup.c
2 ===================================================================
3 --- linux-2.6.25.1.orig/arch/arm/mach-ixp4xx/wg302v1-setup.c
4 +++ linux-2.6.25.1/arch/arm/mach-ixp4xx/wg302v1-setup.c
5 @@ -100,6 +100,36 @@ static struct platform_device *wg302v1_d
9 +static char wg302v1_mem_fixup[] __initdata = "mem=32M ";
11 +static void __init wg302v1_fixup(struct machine_desc *desc,
12 + struct tag *tags, char **cmdline, struct meminfo *mi)
15 + struct tag *t = tags;
18 + /* Find the end of the tags table, taking note of any cmdline tag. */
19 + for (; t->hdr.size; t = tag_next(t)) {
20 + if (t->hdr.tag == ATAG_CMDLINE) {
21 + p = t->u.cmdline.cmdline;
25 + /* Overwrite the end of the table with a new cmdline tag. */
26 + t->hdr.tag = ATAG_CMDLINE;
27 + t->hdr.size = (sizeof (struct tag_header) +
28 + strlen(wg302v1_mem_fixup) + strlen(p) + 1 + 4) >> 2;
29 + strlcpy(t->u.cmdline.cmdline, wg302v1_mem_fixup, COMMAND_LINE_SIZE);
30 + strlcpy(t->u.cmdline.cmdline + strlen(wg302v1_mem_fixup), p,
31 + COMMAND_LINE_SIZE - strlen(wg302v1_mem_fixup));
33 + /* Terminate the table. */
35 + t->hdr.tag = ATAG_NONE;
39 static void __init wg302v1_init(void)
42 @@ -118,6 +148,7 @@ MACHINE_START(WG302V1, "Netgear WG302 v1
43 /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
44 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
45 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
46 + .fixup = wg302v1_fixup,
47 .map_io = ixp4xx_map_io,
48 .init_irq = ixp4xx_init_irq,
49 .timer = &ixp4xx_timer,