[ixp4xx] refresh kernel patches
[openwrt.git] / target / linux / ixp4xx / patches / 430-pronghorn_metro_cf.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 @@ -77,6 +77,35 @@ static struct platform_device pronghornm
6         .resource       = &pronghornmetro_uart_resource,
7  };
8  
9 +static struct resource pronghornmetro_pata_resources[] = {
10 +       {
11 +               .flags  = IORESOURCE_MEM
12 +       },
13 +       {
14 +               .flags  = IORESOURCE_MEM,
15 +       },
16 +       {
17 +               .name   = "intrq",
18 +               .start  = IRQ_IXP4XX_GPIO0,
19 +               .end    = IRQ_IXP4XX_GPIO0,
20 +               .flags  = IORESOURCE_IRQ,
21 +       },
22 +};
23 +
24 +static struct ixp4xx_pata_data pronghornmetro_pata_data = {
25 +       .cs0_bits       = 0xbfff0043,
26 +       .cs1_bits       = 0xbfff0043,
27 +};
28 +
29 +static struct platform_device pronghornmetro_pata = {
30 +       .name                   = "pata_ixp4xx_cf",
31 +       .id                     = 0,
32 +       .dev.platform_data      = &pronghornmetro_pata_data,
33 +       .num_resources          = ARRAY_SIZE(pronghornmetro_pata_resources),
34 +       .resource               = pronghornmetro_pata_resources,
35 +};
36 +
37 +
38  static struct resource res_mac0 = {
39         .start          = IXP4XX_EthB_BASE_PHYS,
40         .end            = IXP4XX_EthB_BASE_PHYS + 0x1ff,
41 @@ -165,6 +194,17 @@ static void __init pronghornmetro_init(v
42  
43         platform_add_devices(pronghornmetro_devices, ARRAY_SIZE(pronghornmetro_devices));
44  
45 +       pronghornmetro_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
46 +       pronghornmetro_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
47 +
48 +       pronghornmetro_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2);
49 +       pronghornmetro_pata_resources[1].end = IXP4XX_EXP_BUS_END(2);
50 +
51 +       pronghornmetro_pata_data.cs0_cfg = IXP4XX_EXP_CS1;
52 +       pronghornmetro_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
53 +
54 +       platform_device_register(&pronghornmetro_pata);
55 +
56         register_mtd_user(&pronghornmetro_flash_notifier);
57  }
58