2008-06-26 21:59:15 +08:00
|
|
|
--- a/arch/arm/mach-ixp4xx/cambria-setup.c
|
|
|
|
+++ b/arch/arm/mach-ixp4xx/cambria-setup.c
|
2008-11-07 04:55:33 +08:00
|
|
|
@@ -214,6 +214,21 @@ static struct platform_device cambria_gp
|
2008-06-26 21:59:15 +08:00
|
|
|
.dev.platform_data = &cambria_gpio_leds_data,
|
|
|
|
};
|
|
|
|
|
|
|
|
+static struct resource cambria_gpio_resources[] = {
|
|
|
|
+ {
|
|
|
|
+ .name = "gpio",
|
|
|
|
+ .flags = 0,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device cambria_gpio = {
|
|
|
|
+ .name = "GPIODEV",
|
|
|
|
+ .id = -1,
|
|
|
|
+ .num_resources = ARRAY_SIZE(cambria_gpio_resources),
|
|
|
|
+ .resource = cambria_gpio_resources,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
static struct latch_led cambria_latch_leds[] = {
|
|
|
|
{
|
2008-11-07 04:55:33 +08:00
|
|
|
@@ -337,6 +352,11 @@ static void __init cambria_gw2350_setup(
|
2008-10-10 02:24:25 +08:00
|
|
|
cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53FF0000, 0x0fff);
|
2008-06-26 21:59:15 +08:00
|
|
|
cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
|
|
|
|
|
|
|
|
+ cambria_gpio_resources[0].start = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) |\
|
|
|
|
+ (1 << 5) | (1 << 8) | (1 << 9) | (1 << 12);
|
|
|
|
+ cambria_gpio_resources[0].end = cambria_gpio_resources[0].start;
|
|
|
|
+
|
|
|
|
+ platform_device_register(&cambria_gpio);
|
|
|
|
platform_device_register(&cambria_optional_uart);
|
|
|
|
platform_device_register(&cambria_npec_device);
|
|
|
|
platform_device_register(&cambria_npea_device);
|
2008-11-07 04:55:33 +08:00
|
|
|
@@ -363,6 +383,10 @@ static void __init cambria_gw2358_setup(
|
2008-06-26 21:59:15 +08:00
|
|
|
cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff);
|
|
|
|
cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
|
|
|
|
|
|
|
|
+ cambria_gpio_resources[0].start = (1 << 14);
|
|
|
|
+ cambria_gpio_resources[0].end = cambria_gpio_resources[0].start;
|
|
|
|
+
|
|
|
|
+ platform_device_register(&cambria_gpio);
|
|
|
|
platform_device_register(&cambria_optional_uart);
|
|
|
|
|
2008-08-22 23:37:19 +08:00
|
|
|
platform_device_register(&cambria_npec_device);
|