Changeset 18943


Ignore:
Timestamp:
2009-12-26T15:19:26+01:00 (8 years ago)
Author:
juhosg
Message:

ar71xx: move dsa switch device support into a separate file

Location:
trunk/target/linux/ar71xx
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/config-2.6.30

    r18940 r18943  
    77CONFIG_AR71XX_DEV_AP94_PCI=y 
    88CONFIG_AR71XX_DEV_AR913X_WMAC=y 
     9CONFIG_AR71XX_DEV_DSA=y 
    910CONFIG_AR71XX_DEV_GPIO_BUTTONS=y 
    1011CONFIG_AR71XX_DEV_LEDS_GPIO=y 
  • trunk/target/linux/ar71xx/config-2.6.31

    r18940 r18943  
    99CONFIG_AR71XX_DEV_AP94_PCI=y 
    1010CONFIG_AR71XX_DEV_AR913X_WMAC=y 
     11CONFIG_AR71XX_DEV_DSA=y 
    1112CONFIG_AR71XX_DEV_GPIO_BUTTONS=y 
    1213CONFIG_AR71XX_DEV_LEDS_GPIO=y 
  • trunk/target/linux/ar71xx/config-2.6.32

    r18940 r18943  
    99CONFIG_AR71XX_DEV_AP94_PCI=y 
    1010CONFIG_AR71XX_DEV_AR913X_WMAC=y 
     11CONFIG_AR71XX_DEV_DSA=y 
    1112CONFIG_AR71XX_DEV_GPIO_BUTTONS=y 
    1213CONFIG_AR71XX_DEV_LEDS_GPIO=y 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig

    r18941 r18943  
    143143        select AR71XX_DEV_M25P80 
    144144        select AR71XX_DEV_PB42_PCI if PCI 
     145        select AR71XX_DEV_DSA 
    145146        select AR71XX_DEV_GPIO_BUTTONS 
    146147        select AR71XX_DEV_LEDS_GPIO 
     
    151152        select AR71XX_DEV_M25P80 
    152153        select AR71XX_DEV_AR913X_WMAC 
     154        select AR71XX_DEV_DSA 
    153155        select AR71XX_DEV_GPIO_BUTTONS 
    154156        select AR71XX_DEV_LEDS_GPIO 
     
    196198        def_bool n 
    197199 
     200config AR71XX_DEV_DSA 
     201        def_bool n 
     202 
    198203config AR71XX_DEV_GPIO_BUTTONS 
    199204        def_bool n 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/Makefile

    r18940 r18943  
    1717obj-$(CONFIG_AR71XX_DEV_AP94_PCI)       += dev-ap94-pci.o 
    1818obj-$(CONFIG_AR71XX_DEV_AR913X_WMAC)    += dev-ar913x-wmac.o 
     19obj-$(CONFIG_AR71XX_DEV_DSA)            += dev-dsa.o 
    1920obj-$(CONFIG_AR71XX_DEV_GPIO_BUTTONS)   += dev-gpio-buttons.o 
    2021obj-$(CONFIG_AR71XX_DEV_LEDS_GPIO)      += dev-leds-gpio.o 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c

    r18940 r18943  
    7373static struct ag71xx_mdio_platform_data ar71xx_mdio_data; 
    7474 
    75 static struct platform_device ar71xx_mdio_device = { 
     75struct platform_device ar71xx_mdio_device = { 
    7676        .name           = "ag71xx-mdio", 
    7777        .id             = -1, 
     
    253253}; 
    254254 
    255 static struct platform_device ar71xx_eth0_device = { 
     255struct platform_device ar71xx_eth0_device = { 
    256256        .name           = "ag71xx", 
    257257        .id             = 0, 
     
    286286}; 
    287287 
    288 static struct platform_device ar71xx_eth1_device = { 
     288struct platform_device ar71xx_eth1_device = { 
    289289        .name           = "ag71xx", 
    290290        .id             = 1, 
     
    546546                                "\"%s\"\n", mac_str); 
    547547} 
    548  
    549 static struct platform_device ar71xx_dsa_switch_device = { 
    550         .name           = "dsa", 
    551         .id             = 0, 
    552 }; 
    553  
    554 void __init ar71xx_add_device_dsa(unsigned int id, 
    555                                   struct dsa_platform_data *d) 
    556 { 
    557         int i; 
    558  
    559         switch (id) { 
    560         case 0: 
    561                 d->netdev = &ar71xx_eth0_device.dev; 
    562                 break; 
    563         case 1: 
    564                 d->netdev = &ar71xx_eth1_device.dev; 
    565                 break; 
    566         default: 
    567                 printk(KERN_ERR 
    568                         "ar71xx: invalid ethernet id %d for DSA switch\n", 
    569                         id); 
    570                 return; 
    571         } 
    572  
    573         for (i = 0; i < d->nr_chips; i++) 
    574                 d->chip[i].mii_bus = &ar71xx_mdio_device.dev; 
    575  
    576         ar71xx_dsa_switch_device.dev.platform_data = d; 
    577  
    578         platform_device_register(&ar71xx_dsa_switch_device); 
    579 } 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/devices.h

    r18940 r18943  
    1515#include <asm/mach-ar71xx/platform.h> 
    1616 
    17 #include <net/dsa.h> 
     17struct platform_device; 
    1818 
    1919void ar71xx_add_device_spi(struct ar71xx_spi_platform_data *pdata, 
     
    3535extern struct ag71xx_platform_data ar71xx_eth0_data; 
    3636extern struct ag71xx_platform_data ar71xx_eth1_data; 
     37extern struct platform_device ar71xx_eth0_device; 
     38extern struct platform_device ar71xx_eth1_device; 
    3739void ar71xx_add_device_eth(unsigned int id) __init; 
    3840 
     41extern struct platform_device ar71xx_mdio_device; 
    3942void ar71xx_add_device_mdio(u32 phy_mask) __init; 
    4043 
     
    4346void ar71xx_add_device_wdt(void) __init; 
    4447 
    45 void ar71xx_add_device_dsa(unsigned int id, 
    46                            struct dsa_platform_data *d) __init; 
    47  
    4848#endif /* __AR71XX_DEVICES_H */ 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c

    r18942 r18943  
    1616#include "machtype.h" 
    1717#include "devices.h" 
     18#include "dev-dsa.h" 
    1819#include "dev-m25p80.h" 
    1920#include "dev-gpio-buttons.h" 
  • trunk/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c

    r18942 r18943  
    1616#include "machtype.h" 
    1717#include "devices.h" 
     18#include "dev-dsa.h" 
    1819#include "dev-m25p80.h" 
    1920#include "dev-ar913x-wmac.h" 
Note: See TracChangeset for help on using the changeset viewer.