root/trunk/patches/2.6.22/93-avila-rtc-fixup.patch
| Revision 866, 2.0 kB (checked in by rwhitby, 3 years ago) |
|---|
-
linux-2.6.22-rc4-armeb/arch/arm/mach-ixp4xx/avila-setup.c
old new 189 189 }; 190 190 #endif 191 191 192 static char avila_rtc_probe[] __initdata = "rtc-ds1672.probe=0,0x68 "; 193 194 static void __init avila_fixup(struct machine_desc *desc, 195 struct tag *tags, char **cmdline, struct meminfo *mi) 196 { 197 struct tag *t = tags; 198 char *p = *cmdline; 199 200 /* Find the end of the tags table, taking note of any cmdline tag. */ 201 for (; t->hdr.size; t = tag_next(t)) { 202 if (t->hdr.tag == ATAG_CMDLINE) { 203 p = t->u.cmdline.cmdline; 204 } 205 } 206 207 /* Overwrite the end of the table with a new cmdline tag. */ 208 t->hdr.tag = ATAG_CMDLINE; 209 t->hdr.size = (sizeof (struct tag_header) + 210 strlen(avila_rtc_probe) + strlen(p) + 1 + 4) >> 2; 211 strlcpy(t->u.cmdline.cmdline, avila_rtc_probe, COMMAND_LINE_SIZE); 212 strlcpy(t->u.cmdline.cmdline + strlen(avila_rtc_probe), p, 213 COMMAND_LINE_SIZE - strlen(avila_rtc_probe)); 214 215 /* Terminate the table. */ 216 t = tag_next(t); 217 t->hdr.tag = ATAG_NONE; 218 t->hdr.size = 0; 219 } 220 192 221 static void __init avila_init(void) 193 222 { 194 223 ixp4xx_sys_init(); … … 219 248 /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */ 220 249 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 221 250 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 251 .fixup = avila_fixup, 222 252 .map_io = ixp4xx_map_io, 223 253 .init_irq = ixp4xx_init_irq, 224 254 .timer = &ixp4xx_timer, … … 236 266 /* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */ 237 267 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 238 268 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 269 .fixup = avila_fixup, 239 270 .map_io = ixp4xx_map_io, 240 271 .init_irq = ixp4xx_init_irq, 241 272 .timer = &ixp4xx_timer,
Note: See TracBrowser for help on using the browser.
