[adm5120] fix led driver (closes: #2972)
[openwrt.git] / target / linux / ixp4xx / patches-2.6.23 / 092-nas100d_rtc_fixup.patch
1 diff -uprN linux-2.6.23.orig/arch/arm/mach-ixp4xx/nas100d-setup.c linux-2.6.23/arch/arm/mach-ixp4xx/nas100d-setup.c
2 --- linux-2.6.23.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-10-09 15:31:38.000000000 -0500
3 +++ linux-2.6.23/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-10-11 01:06:33.000000000 -0500
4 @@ -17,6 +17,7 @@
5 #include <linux/serial_8250.h>
6 #include <linux/leds.h>
7
8 +#include <asm/setup.h>
9 #include <asm/mach-types.h>
10 #include <asm/mach/arch.h>
11 #include <asm/mach/flash.h>
12 @@ -142,6 +143,35 @@ static void nas100d_power_off(void)
13 gpio_line_set(NAS100D_PO_GPIO, IXP4XX_GPIO_HIGH);
14 }
15
16 +static char nas100d_rtc_probe[] __initdata = "rtc-pcf8563.probe=0,0x51 ";
17 +
18 +static void __init nas100d_fixup(struct machine_desc *desc,
19 + struct tag *tags, char **cmdline, struct meminfo *mi)
20 +{
21 + struct tag *t = tags;
22 + char *p = *cmdline;
23 +
24 + /* Find the end of the tags table, taking note of any cmdline tag. */
25 + for (; t->hdr.size; t = tag_next(t)) {
26 + if (t->hdr.tag == ATAG_CMDLINE) {
27 + p = t->u.cmdline.cmdline;
28 + }
29 + }
30 +
31 + /* Overwrite the end of the table with a new cmdline tag. */
32 + t->hdr.tag = ATAG_CMDLINE;
33 + t->hdr.size = (sizeof (struct tag_header) +
34 + strlen(nas100d_rtc_probe) + strlen(p) + 1 + 4) >> 2;
35 + strlcpy(t->u.cmdline.cmdline, nas100d_rtc_probe, COMMAND_LINE_SIZE);
36 + strlcpy(t->u.cmdline.cmdline + strlen(nas100d_rtc_probe), p,
37 + COMMAND_LINE_SIZE - strlen(nas100d_rtc_probe));
38 +
39 + /* Terminate the table. */
40 + t = tag_next(t);
41 + t->hdr.tag = ATAG_NONE;
42 + t->hdr.size = 0;
43 +}
44 +
45 static void __init nas100d_init(void)
46 {
47 ixp4xx_sys_init();
48 @@ -170,6 +200,7 @@ MACHINE_START(NAS100D, "Iomega NAS 100d"
49 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
50 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
51 .boot_params = 0x00000100,
52 + .fixup = nas100d_fixup,
53 .map_io = ixp4xx_map_io,
54 .init_irq = ixp4xx_init_irq,
55 .timer = &ixp4xx_timer,
This page took 0.053278 seconds and 5 git commands to generate.