root/trunk/patches/2.6.22/92-nas100d-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/nas100d-setup.c

    old new  
    1919#include <linux/i2c-gpio.h> 
    2020#include <linux/mtd/mtd.h> 
    2121 
     22#include <asm/setup.h> 
    2223#include <asm/mach-types.h> 
    2324#include <asm/mach/arch.h> 
    2425#include <asm/mach/flash.h> 
     
    186187        gpio_line_set(NAS100D_PO_GPIO, IXP4XX_GPIO_HIGH); 
    187188} 
    188189 
     190static char nas100d_rtc_probe[] __initdata = "rtc-pcf8563.probe=0,0x51 "; 
     191 
     192static void __init nas100d_fixup(struct machine_desc *desc, 
     193                struct tag *tags, char **cmdline, struct meminfo *mi) 
     194{ 
     195    struct tag *t = tags; 
     196    char *p = *cmdline; 
     197 
     198    /* Find the end of the tags table, taking note of any cmdline tag. */ 
     199    for (; t->hdr.size; t = tag_next(t)) { 
     200        if (t->hdr.tag == ATAG_CMDLINE) { 
     201            p = t->u.cmdline.cmdline; 
     202        } 
     203    } 
     204 
     205    /* Overwrite the end of the table with a new cmdline tag. */ 
     206    t->hdr.tag = ATAG_CMDLINE; 
     207    t->hdr.size = (sizeof (struct tag_header) + 
     208        strlen(nas100d_rtc_probe) + strlen(p) + 1 + 4) >> 2; 
     209    strlcpy(t->u.cmdline.cmdline, nas100d_rtc_probe, COMMAND_LINE_SIZE); 
     210    strlcpy(t->u.cmdline.cmdline + strlen(nas100d_rtc_probe), p, 
     211        COMMAND_LINE_SIZE - strlen(nas100d_rtc_probe)); 
     212 
     213    /* Terminate the table. */ 
     214    t = tag_next(t); 
     215    t->hdr.tag = ATAG_NONE; 
     216    t->hdr.size = 0; 
     217} 
     218 
    189219static void __init nas100d_init(void) 
    190220{ 
    191221        ixp4xx_sys_init(); 
     
    216246        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS, 
    217247        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xFFFC, 
    218248        .boot_params    = 0x00000100, 
     249        .fixup          = nas100d_fixup, 
    219250        .map_io         = ixp4xx_map_io, 
    220251        .init_irq       = ixp4xx_init_irq, 
    221252        .timer          = &ixp4xx_timer, 
Note: See TracBrowser for help on using the browser.