aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/patches-2.6.25/192-cambria_gpio_device.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2008-05-30 17:01:48 +0000
committerImre Kaloz <kaloz@openwrt.org>2008-05-30 17:01:48 +0000
commit2259476f060ea4b9ca9cffa82ad052a690606fab (patch)
tree1a94e9ffecc4221cd7c4e54e234fbb1c6a1a467a /target/linux/ixp4xx/patches-2.6.25/192-cambria_gpio_device.patch
parent08fa2c3febd98aa73d8c39ed4d2f06bc42e8b770 (diff)
downloadupstream-2259476f060ea4b9ca9cffa82ad052a690606fab.tar.gz
upstream-2259476f060ea4b9ca9cffa82ad052a690606fab.tar.bz2
upstream-2259476f060ea4b9ca9cffa82ad052a690606fab.zip
import Gateworks CF optimizations, add support for additional features for the Cambria -- thanks Chris
SVN-Revision: 11301
Diffstat (limited to 'target/linux/ixp4xx/patches-2.6.25/192-cambria_gpio_device.patch')
-rw-r--r--target/linux/ixp4xx/patches-2.6.25/192-cambria_gpio_device.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.25/192-cambria_gpio_device.patch b/target/linux/ixp4xx/patches-2.6.25/192-cambria_gpio_device.patch
new file mode 100644
index 0000000000..c79a03fa4c
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.25/192-cambria_gpio_device.patch
@@ -0,0 +1,47 @@
+--- a/arch/arm/mach-ixp4xx/cambria-setup.c
++++ b/arch/arm/mach-ixp4xx/cambria-setup.c
+@@ -214,6 +214,21 @@
+ .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[] = {
+ {
+@@ -337,6 +352,11 @@
+ cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(IXP4XX_EXP_BUS_BASE(3), 0x0fff);
+ 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);
+@@ -361,6 +381,10 @@
+ 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);
+
+ cambria_npec_data.phy = 2;