root/trunk/patches/2.6.22/91-nslu2-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/nslu2-setup.c
old new 21 21 #include <linux/i2c-gpio.h> 22 22 #include <linux/mtd/mtd.h> 23 23 24 #include <asm/setup.h> 24 25 #include <asm/mach-types.h> 25 26 #include <asm/mach/arch.h> 26 27 #include <asm/mach/flash.h> … … 215 216 .init = nslu2_timer_init, 216 217 }; 217 218 219 static char nslu2_rtc_probe[] __initdata = "rtc-x1205.probe=0,0x6f "; 220 221 static void __init nslu2_fixup(struct machine_desc *desc, 222 struct tag *tags, char **cmdline, struct meminfo *mi) 223 { 224 struct tag *t = tags; 225 char *p = *cmdline; 226 227 /* Find the end of the tags table, taking note of any cmdline tag. */ 228 for (; t->hdr.size; t = tag_next(t)) { 229 if (t->hdr.tag == ATAG_CMDLINE) { 230 p = t->u.cmdline.cmdline; 231 } 232 } 233 234 /* Overwrite the end of the table with a new cmdline tag. */ 235 t->hdr.tag = ATAG_CMDLINE; 236 t->hdr.size = (sizeof (struct tag_header) + 237 strlen(nslu2_rtc_probe) + strlen(p) + 1 + 4) >> 2; 238 strlcpy(t->u.cmdline.cmdline, nslu2_rtc_probe, COMMAND_LINE_SIZE); 239 strlcpy(t->u.cmdline.cmdline + strlen(nslu2_rtc_probe), p, 240 COMMAND_LINE_SIZE - strlen(nslu2_rtc_probe)); 241 242 /* Terminate the table. */ 243 t = tag_next(t); 244 t->hdr.tag = ATAG_NONE; 245 t->hdr.size = 0; 246 } 247 218 248 static void __init nslu2_init(void) 219 249 { 220 250 ixp4xx_sys_init(); … … 242 272 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 243 273 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 244 274 .boot_params = 0x00000100, 275 .fixup = nslu2_fixup, 245 276 .map_io = ixp4xx_map_io, 246 277 .init_irq = ixp4xx_init_irq, 247 278 .timer = &nslu2_timer,
Note: See TracBrowser for help on using the browser.
