1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-26 00:26:47 +02:00

fixup GPS on the cambria - thanks Chris

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12935 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
kaloz 2008-10-09 18:24:25 +00:00
parent 3286421e36
commit c8a5598162
4 changed files with 36 additions and 24 deletions

View File

@ -57,33 +57,39 @@
static void __init cambria_gw2350_setup(void) static void __init cambria_gw2350_setup(void)
{ {
+ *IXP4XX_EXP_CS2 = 0xbfff0003; + *IXP4XX_EXP_CS2 = 0xbfff0003;
+ set_irq_type(IRQ_IXP4XX_GPIO3, IRQT_BOTHEDGE); + set_irq_type(IRQ_IXP4XX_GPIO3, IRQT_RISING);
+ cambria_optional_uart_data[0].mapbase = IXP4XX_EXP_BUS_BASE(2); + cambria_optional_uart_data[0].mapbase = 0x52FF0000;
+ cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(IXP4XX_EXP_BUS_BASE(2), 0x0fff); + cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(0x52FF0000, 0x0fff);
+ cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3; + cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3;
+ +
+ *IXP4XX_EXP_CS3 = 0xbfff0003; + *IXP4XX_EXP_CS3 = 0xbfff0003;
+ set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_BOTHEDGE); + set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_RISING);
+ cambria_optional_uart_data[1].mapbase = IXP4XX_EXP_BUS_BASE(3); + cambria_optional_uart_data[1].mapbase = 0x53FF0000;
+ cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(IXP4XX_EXP_BUS_BASE(3), 0x0fff); + cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53FF0000, 0x0fff);
+ cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4; + cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
+ +
+ platform_device_register(&cambria_optional_uart); + platform_device_register(&cambria_optional_uart);
platform_device_register(&cambria_npec_device); platform_device_register(&cambria_npec_device);
platform_device_register(&cambria_npea_device); platform_device_register(&cambria_npea_device);
@@ -298,6 +349,20 @@ @@ -294,10 +345,26 @@
platform_device_register(&cambria_usb1_device);
platform_device_register(&cambria_gpio_leds_device);
+
+ *IXP4XX_EXP_CS2 = 0xBFFF3C43;
+ *IXP4XX_EXP_CS3 = 0xBFFF3C43;
}
static void __init cambria_gw2358_setup(void) static void __init cambria_gw2358_setup(void)
{ {
+ *IXP4XX_EXP_CS3 = 0xbfff0003; + *IXP4XX_EXP_CS3 = 0xbfff0003;
+ set_irq_type(IRQ_IXP4XX_GPIO3, IRQT_BOTHEDGE); + set_irq_type(IRQ_IXP4XX_GPIO3, IRQT_RISING);
+ cambria_optional_uart_data[0].mapbase = 0x53FC0000; + cambria_optional_uart_data[0].mapbase = 0x53FC0000;
+ cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(0x53FC0000, 0x0fff); + cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(0x53FC0000, 0x0fff);
+ cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3; + cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3;
+ +
+ *IXP4XX_EXP_CS3 = 0xbfff0003; + set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_RISING);
+ set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_BOTHEDGE);
+ cambria_optional_uart_data[1].mapbase = 0x53F80000; + cambria_optional_uart_data[1].mapbase = 0x53F80000;
+ cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff); + cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff);
+ cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4; + cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;

View File

@ -23,7 +23,7 @@
static struct latch_led cambria_latch_leds[] = { static struct latch_led cambria_latch_leds[] = {
{ {
@@ -337,6 +352,11 @@ @@ -337,6 +352,11 @@
cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(IXP4XX_EXP_BUS_BASE(3), 0x0fff); cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53FF0000, 0x0fff);
cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4; cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
+ cambria_gpio_resources[0].start = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) |\ + cambria_gpio_resources[0].start = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) |\
@ -34,7 +34,7 @@
platform_device_register(&cambria_optional_uart); platform_device_register(&cambria_optional_uart);
platform_device_register(&cambria_npec_device); platform_device_register(&cambria_npec_device);
platform_device_register(&cambria_npea_device); platform_device_register(&cambria_npea_device);
@@ -361,6 +381,10 @@ @@ -363,6 +383,10 @@
cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff); cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff);
cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4; cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;

View File

@ -57,33 +57,39 @@
static void __init cambria_gw2350_setup(void) static void __init cambria_gw2350_setup(void)
{ {
+ *IXP4XX_EXP_CS2 = 0xbfff0003; + *IXP4XX_EXP_CS2 = 0xbfff0003;
+ set_irq_type(IRQ_IXP4XX_GPIO3, IRQ_TYPE_EDGE_BOTH); + set_irq_type(IRQ_IXP4XX_GPIO3, IRQ_TYPE_EDGE_RISING);
+ cambria_optional_uart_data[0].mapbase = IXP4XX_EXP_BUS_BASE(2); + cambria_optional_uart_data[0].mapbase = 0x52FF0000;
+ cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(IXP4XX_EXP_BUS_BASE(2), 0x0fff); + cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(0x52FF0000, 0x0fff);
+ cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3; + cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3;
+ +
+ *IXP4XX_EXP_CS3 = 0xbfff0003; + *IXP4XX_EXP_CS3 = 0xbfff0003;
+ set_irq_type(IRQ_IXP4XX_GPIO4, IRQ_TYPE_EDGE_BOTH); + set_irq_type(IRQ_IXP4XX_GPIO4, IRQ_TYPE_EDGE_RISING);
+ cambria_optional_uart_data[1].mapbase = IXP4XX_EXP_BUS_BASE(3); + cambria_optional_uart_data[1].mapbase = 0x53FF0000;
+ cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(IXP4XX_EXP_BUS_BASE(3), 0x0fff); + cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53FF0000, 0x0fff);
+ cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4; + cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
+ +
+ platform_device_register(&cambria_optional_uart); + platform_device_register(&cambria_optional_uart);
platform_device_register(&cambria_npec_device); platform_device_register(&cambria_npec_device);
platform_device_register(&cambria_npea_device); platform_device_register(&cambria_npea_device);
@@ -298,6 +349,20 @@ @@ -294,10 +345,26 @@
platform_device_register(&cambria_usb1_device);
platform_device_register(&cambria_gpio_leds_device);
+
+ *IXP4XX_EXP_CS2 = 0xBFFF3C43;
+ *IXP4XX_EXP_CS3 = 0xBFFF3C43;
}
static void __init cambria_gw2358_setup(void) static void __init cambria_gw2358_setup(void)
{ {
+ *IXP4XX_EXP_CS3 = 0xbfff0003; + *IXP4XX_EXP_CS3 = 0xbfff0003;
+ set_irq_type(IRQ_IXP4XX_GPIO3, IRQ_TYPE_EDGE_BOTH); + set_irq_type(IRQ_IXP4XX_GPIO3, IRQ_TYPE_EDGE_RISING);
+ cambria_optional_uart_data[0].mapbase = 0x53FC0000; + cambria_optional_uart_data[0].mapbase = 0x53FC0000;
+ cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(0x53FC0000, 0x0fff); + cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(0x53FC0000, 0x0fff);
+ cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3; + cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3;
+ +
+ *IXP4XX_EXP_CS3 = 0xbfff0003; + set_irq_type(IRQ_IXP4XX_GPIO4, IRQ_TYPE_EDGE_RISING);
+ set_irq_type(IRQ_IXP4XX_GPIO4, IRQ_TYPE_EDGE_BOTH);
+ cambria_optional_uart_data[1].mapbase = 0x53F80000; + cambria_optional_uart_data[1].mapbase = 0x53F80000;
+ cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff); + cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff);
+ cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4; + cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;

View File

@ -23,7 +23,7 @@
static struct latch_led cambria_latch_leds[] = { static struct latch_led cambria_latch_leds[] = {
{ {
@@ -337,6 +352,11 @@ @@ -337,6 +352,11 @@
cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(IXP4XX_EXP_BUS_BASE(3), 0x0fff); cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53FF0000, 0x0fff);
cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4; cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
+ cambria_gpio_resources[0].start = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) |\ + cambria_gpio_resources[0].start = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) |\
@ -34,7 +34,7 @@
platform_device_register(&cambria_optional_uart); platform_device_register(&cambria_optional_uart);
platform_device_register(&cambria_npec_device); platform_device_register(&cambria_npec_device);
platform_device_register(&cambria_npea_device); platform_device_register(&cambria_npea_device);
@@ -361,6 +381,10 @@ @@ -363,6 +383,10 @@
cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff); cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff);
cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4; cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;