root/trunk/patches/2.6.22/93-avila-rtc-fixup.patch

Revision 866, 2.0 kB (checked in by rwhitby, 3 years ago)

Added rtc fixup patches (not for upstream). Removed dflt cmdline patches (we use arm-kernel-shim). Refreshed fsg3 patches (whitespace changes only).

  • linux-2.6.22-rc4-armeb/arch/arm/mach-ixp4xx/avila-setup.c

    old new  
    189189}; 
    190190#endif 
    191191 
     192static char avila_rtc_probe[] __initdata = "rtc-ds1672.probe=0,0x68 "; 
     193 
     194static 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 
    192221static void __init avila_init(void) 
    193222{ 
    194223        ixp4xx_sys_init(); 
     
    219248        /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */ 
    220249        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
    221250        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
     251        .fixup          = avila_fixup, 
    222252        .map_io         = ixp4xx_map_io, 
    223253        .init_irq       = ixp4xx_init_irq, 
    224254        .timer          = &ixp4xx_timer, 
     
    236266        /* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */ 
    237267        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
    238268        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 
     269        .fixup          = avila_fixup, 
    239270        .map_io         = ixp4xx_map_io, 
    240271        .init_irq       = ixp4xx_init_irq, 
    241272        .timer          = &ixp4xx_timer, 
Note: See TracBrowser for help on using the browser.