diff options
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/wnr854t-setup.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/wrt350n-v2-setup.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-orion/common.c | 26 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/common.h | 3 |
9 files changed, 16 insertions, 41 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 058994e99570..04910764c385 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@ -105,9 +105,9 @@ void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data) /***************************************************************************** * Ethernet switch ****************************************************************************/ -void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) +void __init orion5x_eth_switch_init(struct dsa_platform_data *d) { - orion_ge00_switch_init(d, irq); + orion_ge00_switch_init(d); } diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index cd0389c6e822..8a4115bd441d 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h @@ -41,7 +41,7 @@ void orion5x_setup_wins(void); void orion5x_ehci0_init(void); void orion5x_ehci1_init(void); void orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data); -void orion5x_eth_switch_init(struct dsa_platform_data *d, int irq); +void orion5x_eth_switch_init(struct dsa_platform_data *d); void orion5x_i2c_init(void); void orion5x_sata_init(struct mv_sata_platform_data *sata_data); void orion5x_spi_init(void); diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index c742e7b40b0d..dccadf68ea2b 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c @@ -101,7 +101,7 @@ static struct dsa_chip_data rd88f5181l_fxo_switch_chip_data = { .port_names[7] = "lan3", }; -static struct dsa_platform_data rd88f5181l_fxo_switch_plat_data = { +static struct dsa_platform_data __initdata rd88f5181l_fxo_switch_plat_data = { .nr_chips = 1, .chip = &rd88f5181l_fxo_switch_chip_data, }; @@ -120,7 +120,7 @@ static void __init rd88f5181l_fxo_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&rd88f5181l_fxo_eth_data); - orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index 7e977b794b0c..affe5ec825de 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c @@ -102,7 +102,7 @@ static struct dsa_chip_data rd88f5181l_ge_switch_chip_data = { .port_names[7] = "lan3", }; -static struct dsa_platform_data rd88f5181l_ge_switch_plat_data = { +static struct dsa_platform_data __initdata rd88f5181l_ge_switch_plat_data = { .nr_chips = 1, .chip = &rd88f5181l_ge_switch_chip_data, }; @@ -125,8 +125,7 @@ static void __init rd88f5181l_ge_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&rd88f5181l_ge_eth_data); - orion5x_eth_switch_init(&rd88f5181l_ge_switch_plat_data, - gpio_to_irq(8)); + orion5x_eth_switch_init(&rd88f5181l_ge_switch_plat_data); orion5x_i2c_init(); orion5x_uart0_init(); diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index 4bf80dd5478c..f2db56dc818c 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c @@ -40,7 +40,7 @@ static struct dsa_chip_data rd88f6183ap_ge_switch_chip_data = { .port_names[5] = "cpu", }; -static struct dsa_platform_data rd88f6183ap_ge_switch_plat_data = { +static struct dsa_platform_data __initdata rd88f6183ap_ge_switch_plat_data = { .nr_chips = 1, .chip = &rd88f6183ap_ge_switch_chip_data, }; @@ -90,8 +90,7 @@ static void __init rd88f6183ap_ge_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&rd88f6183ap_ge_eth_data); - orion5x_eth_switch_init(&rd88f6183ap_ge_switch_plat_data, - gpio_to_irq(3)); + orion5x_eth_switch_init(&rd88f6183ap_ge_switch_plat_data); spi_register_board_info(rd88f6183ap_ge_spi_slave_info, ARRAY_SIZE(rd88f6183ap_ge_spi_slave_info)); orion5x_spi_init(); diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 4e1e5c8f6111..4dbcdbe1de7c 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c @@ -106,7 +106,7 @@ static struct dsa_chip_data wnr854t_switch_chip_data = { .port_names[7] = "lan2", }; -static struct dsa_platform_data wnr854t_switch_plat_data = { +static struct dsa_platform_data __initdata wnr854t_switch_plat_data = { .nr_chips = 1, .chip = &wnr854t_switch_chip_data, }; @@ -124,7 +124,7 @@ static void __init wnr854t_init(void) * Configure peripherals. */ orion5x_eth_init(&wnr854t_eth_data); - orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&wnr854t_switch_plat_data); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 61e9027ef224..a6a8c4648d74 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c @@ -191,7 +191,7 @@ static struct dsa_chip_data wrt350n_v2_switch_chip_data = { .port_names[7] = "lan4", }; -static struct dsa_platform_data wrt350n_v2_switch_plat_data = { +static struct dsa_platform_data __initdata wrt350n_v2_switch_plat_data = { .nr_chips = 1, .chip = &wrt350n_v2_switch_chip_data, }; @@ -210,7 +210,7 @@ static void __init wrt350n_v2_init(void) */ orion5x_ehci0_init(); orion5x_eth_init(&wrt350n_v2_eth_data); - orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ); + orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data); orion5x_uart0_init(); mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 7b9b70785a54..272f49b2c68f 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -470,37 +470,15 @@ void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, /***************************************************************************** * Ethernet switch ****************************************************************************/ -static struct resource orion_switch_resources[] = { - { - .start = 0, - .end = 0, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device orion_switch_device = { - .name = "dsa", - .id = 0, - .num_resources = 0, - .resource = orion_switch_resources, -}; - -void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq) +void __init orion_ge00_switch_init(struct dsa_platform_data *d) { int i; - if (irq != NO_IRQ) { - orion_switch_resources[0].start = irq; - orion_switch_resources[0].end = irq; - orion_switch_device.num_resources = 1; - } - d->netdev = &orion_ge00.dev; for (i = 0; i < d->nr_chips; i++) d->chip[i].host_dev = &orion_ge_mvmdio.dev; - orion_switch_device.dev.platform_data = d; - platform_device_register(&orion_switch_device); + platform_device_register_data(NULL, "dsa", 0, d, sizeof(d)); } /***************************************************************************** diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index 8519727faa5e..9347f3c58a6d 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h @@ -57,8 +57,7 @@ void __init orion_ge11_init(struct mv643xx_eth_platform_data *eth_data, unsigned long mapbase, unsigned long irq); -void __init orion_ge00_switch_init(struct dsa_platform_data *d, - int irq); +void __init orion_ge00_switch_init(struct dsa_platform_data *d); void __init orion_i2c_init(unsigned long mapbase, unsigned long irq, |