add GW2375 support
authorImre Kaloz <kaloz@openwrt.org>
Wed, 12 Mar 2014 13:39:06 +0000 (13:39 +0000)
committerImre Kaloz <kaloz@openwrt.org>
Wed, 12 Mar 2014 13:39:06 +0000 (13:39 +0000)
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
SVN-Revision: 39893

target/linux/ixp4xx/patches-3.10/300-avila_support.patch

index b1ca379332c4ab40fbfdd7897f2c3a0661a3778e..e214d96b923a49b8b680edb487a1737b89659138 100644 (file)
                .name   = "intrq",
                .start  = IRQ_IXP4XX_GPIO12,
                .end    = IRQ_IXP4XX_GPIO12,
-@@ -133,21 +210,210 @@ static struct platform_device avila_pata
+@@ -133,21 +210,237 @@ static struct platform_device avila_pata
        .resource               = avila_pata_resources,
  };
  
 +      platform_device_register(&avila_npec_device);
 +
 +      platform_device_register(&avila_gpio_leds_device);
-       avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
-       avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
-@@ -159,8 +425,339 @@ static void __init avila_init(void)
-       avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
-       platform_device_register(&avila_pata);
++
++      avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
++      avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
++
++      avila_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2);
++      avila_pata_resources[1].end = IXP4XX_EXP_BUS_END(2);
++
++      avila_pata_data.cs0_cfg = IXP4XX_EXP_CS1;
++      avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
++
++      platform_device_register(&avila_pata);
 +}
 +
 +static void __init avila_gw2347_setup(void)
 +      platform_device_register(&avila_npec_device);
 +
 +      platform_device_register(&avila_gpio_leds_device);
-+
-+      avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
-+      avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
-+
-+      avila_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2);
-+      avila_pata_resources[1].end = IXP4XX_EXP_BUS_END(2);
-+
-+      avila_pata_data.cs0_cfg = IXP4XX_EXP_CS1;
-+      avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
-+
-+      platform_device_register(&avila_pata);
+       avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
+       avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
+@@ -159,8 +452,335 @@ static void __init avila_init(void)
+       avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
+       platform_device_register(&avila_pata);
 +}
 +
 +static void __init avila_gw2353_setup(void)
 +      setup_audio_devices();
 +}
 +
++static void __init avila_gw2375_setup(void)
++{
++      avila_npeb_data.phy = 1;
++      platform_device_register(&avila_npeb_device);
++
++      avila_npec_data.phy = 2;
++      platform_device_register(&avila_npec_device);
++
++      *IXP4XX_EXP_CS2 = 0xBFFF3C43;
++      irq_set_irq_type(IRQ_IXP4XX_GPIO10, IRQ_TYPE_EDGE_RISING);
++      avila_optional_uart_data[0].mapbase = 0x52000000;
++      avila_optional_uart_data[0].membase = (void __iomem *)ioremap(0x52000000, 0x0fff);
++      avila_optional_uart_data[0].irq   = IRQ_IXP4XX_GPIO10;
++
++      avila_optional_uart.num_resources = 1;
++
++      platform_device_register(&avila_optional_uart);
++
++      setup_audio_devices();
++}
 +
 +
 +static struct avila_board_info avila_boards[] __initdata = {
 +      }, {
 +              .model          = "GW2373",
 +              .setup          = avila_gw2369_setup,
++      }, {
++              .model          = "GW2375",
++              .setup          = avila_gw2375_setup,
 +      }
 +};
 +