root/trunk/patches/2.6.22/91-nslu2-rtc-fixup.patch

Revision 866, 1.9 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/nslu2-setup.c

    old new  
    2121#include <linux/i2c-gpio.h> 
    2222#include <linux/mtd/mtd.h> 
    2323 
     24#include <asm/setup.h> 
    2425#include <asm/mach-types.h> 
    2526#include <asm/mach/arch.h> 
    2627#include <asm/mach/flash.h> 
     
    215216    .init   = nslu2_timer_init, 
    216217}; 
    217218 
     219static char nslu2_rtc_probe[] __initdata = "rtc-x1205.probe=0,0x6f "; 
     220 
     221static 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 
    218248static void __init nslu2_init(void) 
    219249{ 
    220250        ixp4xx_sys_init(); 
     
    242272        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
    243273        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 
    244274        .boot_params    = 0x00000100, 
     275        .fixup          = nslu2_fixup, 
    245276        .map_io         = ixp4xx_map_io, 
    246277        .init_irq       = ixp4xx_init_irq, 
    247278        .timer          = &nslu2_timer, 
Note: See TracBrowser for help on using the browser.