Changeset 13656


Ignore:
Timestamp:
2008-12-15T17:11:42+01:00 (9 years ago)
Author:
juhosg
Message:

[ar71xx] move machine setup code

Location:
trunk/target/linux/ar71xx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/platform.h

    r13499 r13656  
    7575                                   struct gpio_button *buttons) __init; 
    7676 
     77#ifdef CONFIG_AR71XX_EARLY_SERIAL 
     78static inline void ar71xx_add_device_uart(void) {} 
     79#else 
     80extern void ar71xx_add_device_uart(void) __init; 
     81#endif 
     82 
     83extern void ar71xx_add_device_wdt(void) __init; 
     84 
    7785#endif /* __ASM_MACH_AR71XX_PLATFORM_H */ 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c

    r13505 r13656  
    1919#include <linux/serial_8250.h> 
    2020 
    21 #include <asm/mips_machine.h> 
    2221#include <asm/mach-ar71xx/ar71xx.h> 
    2322#include <asm/mach-ar71xx/platform.h> 
     
    139138} 
    140139 
    141 #ifdef CONFIG_AR71XX_EARLY_SERIAL 
    142 static void __init ar71xx_add_device_uart(void) {}; 
    143 #else 
     140#ifndef CONFIG_AR71XX_EARLY_SERIAL 
    144141static struct resource ar71xx_uart_resources[] = { 
    145142        { 
     
    173170}; 
    174171 
    175 static void __init ar71xx_add_device_uart(void) 
     172void __init ar71xx_add_device_uart(void) 
    176173{ 
    177174        ar71xx_uart_data[0].uartclk = ar71xx_ahb_freq; 
     
    598595                                "\"%s\"\n", mac_str); 
    599596} 
    600  
    601 static int __init ar71xx_machine_setup(void) 
    602 { 
    603         ar71xx_gpio_init(); 
    604  
    605         ar71xx_add_device_uart(); 
    606         ar71xx_add_device_wdt(); 
    607  
    608         mips_machine_setup(ar71xx_mach_type); 
    609         return 0; 
    610 } 
    611  
    612 arch_initcall(ar71xx_machine_setup); 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/setup.c

    r13516 r13656  
    2424#include <asm/time.h>           /* for mips_hpt_frequency */ 
    2525#include <asm/reboot.h>         /* for _machine_{restart,halt} */ 
     26#include <asm/mips_machine.h> 
    2627 
    2728#include <asm/mach-ar71xx/ar71xx.h> 
     
    271272        mips_hpt_frequency = ar71xx_cpu_freq / 2; 
    272273} 
     274 
     275static int __init ar71xx_machine_setup(void) 
     276{ 
     277        ar71xx_gpio_init(); 
     278 
     279        ar71xx_add_device_uart(); 
     280        ar71xx_add_device_wdt(); 
     281 
     282        mips_machine_setup(ar71xx_mach_type); 
     283        return 0; 
     284} 
     285 
     286arch_initcall(ar71xx_machine_setup); 
  • trunk/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/platform.h

    r13499 r13656  
    7575                                   struct gpio_button *buttons) __init; 
    7676 
     77#ifdef CONFIG_AR71XX_EARLY_SERIAL 
     78static inline void ar71xx_add_device_uart(void) {} 
     79#else 
     80extern void ar71xx_add_device_uart(void) __init; 
     81#endif 
     82 
     83extern void ar71xx_add_device_wdt(void) __init; 
     84 
    7785#endif /* __ASM_MACH_AR71XX_PLATFORM_H */ 
Note: See TracChangeset for help on using the changeset viewer.