[package] remove the i2c-gpio-custom driver from adm5120, and make it available on...
[openwrt.git] / target / linux / ixp4xx / patches-2.6.23 / 091-nslu2_rtc_fixup.patch
1 diff -uprN linux-2.6.23.orig/arch/arm/mach-ixp4xx/nslu2-setup.c linux-2.6.23/arch/arm/mach-ixp4xx/nslu2-setup.c
2 --- linux-2.6.23.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-10-09 15:31:38.000000000 -0500
3 +++ linux-2.6.23/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-10-11 01:04:46.000000000 -0500
4 @@ -19,6 +19,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 @@ -171,6 +172,35 @@ static struct sys_timer nslu2_timer = {
13 .init = nslu2_timer_init,
14 };
15
16 +static char nslu2_rtc_probe[] __initdata = "rtc-isl1208.ignore=0,0x6f rtc-x1205.probe=0,0x6f ";
17 +
18 +static void __init nslu2_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(nslu2_rtc_probe) + strlen(p) + 1 + 4) >> 2;
35 + strlcpy(t->u.cmdline.cmdline, nslu2_rtc_probe, COMMAND_LINE_SIZE);
36 + strlcpy(t->u.cmdline.cmdline + strlen(nslu2_rtc_probe), p,
37 + COMMAND_LINE_SIZE - strlen(nslu2_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 nslu2_init(void)
46 {
47 ixp4xx_sys_init();
48 @@ -196,6 +226,7 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
49 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
50 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC,
51 .boot_params = 0x00000100,
52 + .fixup = nslu2_fixup,
53 .map_io = ixp4xx_map_io,
54 .init_irq = ixp4xx_init_irq,
55 .timer = &nslu2_timer,
This page took 0.051783 seconds and 5 git commands to generate.