root/trunk/patches/2.6.22/95-dsmg600-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).

  • arch/arm/mach-ixp4xx/dsmg600-setup.c

    old new  
    1616#include <linux/serial_8250.h> 
    1717#include <linux/i2c-gpio.h> 
    1818 
     19#include <asm/setup.h> 
    1920#include <asm/mach-types.h> 
    2021#include <asm/mach/arch.h> 
    2122#include <asm/mach/flash.h> 
     
    145146    .init   = dsmg600_timer_init, 
    146147}; 
    147148 
     149static char dsmg600_rtc_probe[] __initdata = "rtc-pcf8563.probe=0,0x51 "; 
     150 
     151static 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 
    148178static void __init dsmg600_init(void) 
    149179{ 
    150180        ixp4xx_sys_init(); 
     
    177207        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
    178208        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 
    179209        .boot_params    = 0x00000100, 
     210        .fixup          = dsmg600_fixup, 
    180211        .map_io         = ixp4xx_map_io, 
    181212        .init_irq       = ixp4xx_init_irq, 
    182213        .timer          = &dsmg600_timer, 
Note: See TracBrowser for help on using the browser.