this is not a platform specific patch
[openwrt.git] / target / linux / ixp4xx / patches-2.6.35 / 192-cambria_gpio_device.patch
1 --- a/arch/arm/mach-ixp4xx/cambria-setup.c
2 +++ b/arch/arm/mach-ixp4xx/cambria-setup.c
3 @@ -214,6 +214,20 @@ static struct platform_device cambria_gp
4 .dev.platform_data = &cambria_gpio_leds_data,
5 };
6
7 +static struct resource cambria_gpio_resources[] = {
8 + {
9 + .name = "gpio",
10 + .flags = 0,
11 + },
12 +};
13 +
14 +static struct platform_device cambria_gpio = {
15 + .name = "GPIODEV",
16 + .id = -1,
17 + .num_resources = ARRAY_SIZE(cambria_gpio_resources),
18 + .resource = cambria_gpio_resources,
19 +};
20 +
21 static struct latch_led cambria_latch_leds[] = {
22 {
23 .name = "ledA", /* green led */
24 @@ -335,6 +349,11 @@ static void __init cambria_gw2350_setup(
25 cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53FF0000, 0x0fff);
26 cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
27
28 + cambria_gpio_resources[0].start = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) |\
29 + (1 << 5) | (1 << 8) | (1 << 9) | (1 << 12);
30 + cambria_gpio_resources[0].end = cambria_gpio_resources[0].start;
31 +
32 + platform_device_register(&cambria_gpio);
33 platform_device_register(&cambria_optional_uart);
34 platform_device_register(&cambria_npec_device);
35 platform_device_register(&cambria_npea_device);
36 @@ -358,6 +377,10 @@ static void __init cambria_gw2358_setup(
37 cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff);
38 cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
39
40 + cambria_gpio_resources[0].start = (1 << 14);
41 + cambria_gpio_resources[0].end = cambria_gpio_resources[0].start;
42 +
43 + platform_device_register(&cambria_gpio);
44 platform_device_register(&cambria_optional_uart);
45
46 platform_device_register(&cambria_npec_device);
This page took 0.055938 seconds and 5 git commands to generate.