fixup avila networking, add support for the loft
[openwrt.git] / target / linux / ixp4xx-2.6 / patches / 720-avila_setup_mac.patch
1 ---
2  arch/arm/mach-ixp4xx/avila-setup.c |   50 ++++++++++++++++++++++++++++++++++++-
3  1 file changed, 49 insertions(+), 1 deletion(-)
4
5 Index: linux-2.6.19/arch/arm/mach-ixp4xx/avila-setup.c
6 ===================================================================
7 --- linux-2.6.19.orig/arch/arm/mach-ixp4xx/avila-setup.c
8 +++ linux-2.6.19/arch/arm/mach-ixp4xx/avila-setup.c
9 @@ -104,10 +104,60 @@ static struct platform_device avila_uart
10         .resource               = avila_uart_resources
11  };
12  
13 +/* MACs */
14 +static struct resource res_mac0 = {
15 +       .start          = IXP4XX_EthB_BASE_PHYS,
16 +       .end            = IXP4XX_EthB_BASE_PHYS + 0x1ff,
17 +       .flags          = IORESOURCE_MEM,
18 +};
19 +
20 +static struct resource res_mac1 = {
21 +       .start          = IXP4XX_EthC_BASE_PHYS,
22 +       .end            = IXP4XX_EthC_BASE_PHYS + 0x1ff,
23 +       .flags          = IORESOURCE_MEM,
24 +};
25 +
26 +static struct mac_plat_info plat_mac0 = {
27 +       .npe_id         = 1,
28 +       .phy_id         = 0,
29 +       .eth_id         = 0,
30 +       .rxq_id         = 27,
31 +       .txq_id         = 24,
32 +       .rxdoneq_id     = 4,
33 +};
34 +
35 +static struct mac_plat_info plat_mac1 = {
36 +       .npe_id         = 2,
37 +       .phy_id         = 1,
38 +       .eth_id         = 1,
39 +       .rxq_id         = 28,
40 +       .txq_id         = 25,
41 +       .rxdoneq_id     = 5,
42 +};
43 +
44 +static struct platform_device mac0 = {
45 +       .name           = "ixp4xx_mac",
46 +       .id             = 0,
47 +       .dev.platform_data = &plat_mac0,
48 +       .num_resources  = 1,
49 +       .resource       = &res_mac0,
50 +};
51 +
52 +static struct platform_device mac1 = {
53 +       .name           = "ixp4xx_mac",
54 +       .id             = 1,
55 +       .dev.platform_data = &plat_mac1,
56 +       .num_resources  = 1,
57 +       .resource       = &res_mac1,
58 +};
59 +
60  static struct platform_device *avila_devices[] __initdata = {
61         &avila_i2c_controller,
62         &avila_flash,
63 -       &avila_uart
64 +       &avila_uart,
65 +       &mac0,
66 +       &mac1,
67 +
68  };
69  
70  static void __init avila_init(void)