root/trunk/patches/2.6.22/92-nas100d-rtc-fixup.patch
| Revision 866, 1.9 kB (checked in by rwhitby, 3 years ago) |
|---|
-
linux-2.6.22-rc4-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c
old new 19 19 #include <linux/i2c-gpio.h> 20 20 #include <linux/mtd/mtd.h> 21 21 22 #include <asm/setup.h> 22 23 #include <asm/mach-types.h> 23 24 #include <asm/mach/arch.h> 24 25 #include <asm/mach/flash.h> … … 186 187 gpio_line_set(NAS100D_PO_GPIO, IXP4XX_GPIO_HIGH); 187 188 } 188 189 190 static char nas100d_rtc_probe[] __initdata = "rtc-pcf8563.probe=0,0x51 "; 191 192 static void __init nas100d_fixup(struct machine_desc *desc, 193 struct tag *tags, char **cmdline, struct meminfo *mi) 194 { 195 struct tag *t = tags; 196 char *p = *cmdline; 197 198 /* Find the end of the tags table, taking note of any cmdline tag. */ 199 for (; t->hdr.size; t = tag_next(t)) { 200 if (t->hdr.tag == ATAG_CMDLINE) { 201 p = t->u.cmdline.cmdline; 202 } 203 } 204 205 /* Overwrite the end of the table with a new cmdline tag. */ 206 t->hdr.tag = ATAG_CMDLINE; 207 t->hdr.size = (sizeof (struct tag_header) + 208 strlen(nas100d_rtc_probe) + strlen(p) + 1 + 4) >> 2; 209 strlcpy(t->u.cmdline.cmdline, nas100d_rtc_probe, COMMAND_LINE_SIZE); 210 strlcpy(t->u.cmdline.cmdline + strlen(nas100d_rtc_probe), p, 211 COMMAND_LINE_SIZE - strlen(nas100d_rtc_probe)); 212 213 /* Terminate the table. */ 214 t = tag_next(t); 215 t->hdr.tag = ATAG_NONE; 216 t->hdr.size = 0; 217 } 218 189 219 static void __init nas100d_init(void) 190 220 { 191 221 ixp4xx_sys_init(); … … 216 246 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 217 247 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 218 248 .boot_params = 0x00000100, 249 .fixup = nas100d_fixup, 219 250 .map_io = ixp4xx_map_io, 220 251 .init_irq = ixp4xx_init_irq, 221 252 .timer = &ixp4xx_timer,
Note: See TracBrowser for help on using the browser.
