root/trunk/patches/2.6.22/95-dsmg600-rtc-fixup.patch
| Revision 866, 1.9 KB (checked in by rwhitby, 3 years ago) |
|---|
-
arch/arm/mach-ixp4xx/dsmg600-setup.c
old new 16 16 #include <linux/serial_8250.h> 17 17 #include <linux/i2c-gpio.h> 18 18 19 #include <asm/setup.h> 19 20 #include <asm/mach-types.h> 20 21 #include <asm/mach/arch.h> 21 22 #include <asm/mach/flash.h> … … 145 146 .init = dsmg600_timer_init, 146 147 }; 147 148 149 static char dsmg600_rtc_probe[] __initdata = "rtc-pcf8563.probe=0,0x51 "; 150 151 static void __init dsmg600_fixup(struct machine_desc *desc, 152 struct tag *tags, char **cmdline, struct meminfo *mi) 153 { 154 struct tag *t = tags; 155 char *p = *cmdline; 156 157 /* Find the end of the tags table, taking note of any cmdline tag. */ 158 for (; t->hdr.size; t = tag_next(t)) { 159 if (t->hdr.tag == ATAG_CMDLINE) { 160 p = t->u.cmdline.cmdline; 161 } 162 } 163 164 /* Overwrite the end of the table with a new cmdline tag. */ 165 t->hdr.tag = ATAG_CMDLINE; 166 t->hdr.size = (sizeof (struct tag_header) + 167 strlen(dsmg600_rtc_probe) + strlen(p) + 1 + 4) >> 2; 168 strlcpy(t->u.cmdline.cmdline, dsmg600_rtc_probe, COMMAND_LINE_SIZE); 169 strlcpy(t->u.cmdline.cmdline + strlen(dsmg600_rtc_probe), p, 170 COMMAND_LINE_SIZE - strlen(dsmg600_rtc_probe)); 171 172 /* Terminate the table. */ 173 t = tag_next(t); 174 t->hdr.tag = ATAG_NONE; 175 t->hdr.size = 0; 176 } 177 148 178 static void __init dsmg600_init(void) 149 179 { 150 180 ixp4xx_sys_init(); … … 177 207 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 178 208 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 179 209 .boot_params = 0x00000100, 210 .fixup = dsmg600_fixup, 180 211 .map_io = ixp4xx_map_io, 181 212 .init_irq = ixp4xx_init_irq, 182 213 .timer = &dsmg600_timer,
Note: See TracBrowser
for help on using the browser.
