[ixp4xx] refresh kernel patches
[openwrt/svn-archive/archive.git] / target / linux / ixp4xx / patches / 410-pronghorn_metro_setup_mac.patch
1 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/pronghornmetro-setup.c
2 ===================================================================
3 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/pronghornmetro-setup.c
4 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/pronghornmetro-setup.c
5 @@ -76,9 +76,57 @@ static struct platform_device pronghornm
6 .resource = &pronghornmetro_uart_resource,
7 };
8
9 +static struct resource res_mac0 = {
10 + .start = IXP4XX_EthB_BASE_PHYS,
11 + .end = IXP4XX_EthB_BASE_PHYS + 0x1ff,
12 + .flags = IORESOURCE_MEM,
13 +};
14 +
15 +static struct resource res_mac1 = {
16 + .start = IXP4XX_EthC_BASE_PHYS,
17 + .end = IXP4XX_EthC_BASE_PHYS + 0x1ff,
18 + .flags = IORESOURCE_MEM,
19 +};
20 +
21 +static struct mac_plat_info plat_mac0 = {
22 + .npe_id = 1,
23 + .phy_id = 0,
24 + .eth_id = 0,
25 + .rxq_id = 27,
26 + .txq_id = 24,
27 + .rxdoneq_id = 4,
28 +};
29 +
30 +static struct mac_plat_info plat_mac1 = {
31 + .npe_id = 2,
32 + .phy_id = 1,
33 + .eth_id = 1,
34 + .rxq_id = 28,
35 + .txq_id = 25,
36 + .rxdoneq_id = 5,
37 +};
38 +
39 +static struct platform_device mac0 = {
40 + .name = "ixp4xx_mac",
41 + .id = 0,
42 + .dev.platform_data = &plat_mac0,
43 + .num_resources = 1,
44 + .resource = &res_mac0,
45 +};
46 +
47 +static struct platform_device mac1 = {
48 + .name = "ixp4xx_mac",
49 + .id = 1,
50 + .dev.platform_data = &plat_mac1,
51 + .num_resources = 1,
52 + .resource = &res_mac1,
53 +};
54 +
55 static struct platform_device *pronghornmetro_devices[] __initdata = {
56 &pronghornmetro_flash,
57 &pronghornmetro_uart,
58 + &mac0,
59 + &mac1,
60 };
61
62 static void __init pronghornmetro_init(void)