2008-06-26 16:59:15 +03:00
|
|
|
--- a/arch/arm/mach-ixp4xx/cambria-setup.c
|
|
|
|
+++ b/arch/arm/mach-ixp4xx/cambria-setup.c
|
|
|
|
@@ -36,6 +36,7 @@
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach/flash.h>
|
|
|
|
+#include <linux/irq.h>
|
|
|
|
|
|
|
|
struct cambria_board_info {
|
|
|
|
unsigned char *model;
|
|
|
|
@@ -105,6 +106,43 @@
|
|
|
|
.resource = &cambria_uart_resource,
|
|
|
|
};
|
|
|
|
|
|
|
|
+static struct resource cambria_optional_uart_resources[] = {
|
|
|
|
+ {
|
|
|
|
+ .start = 0x52000000,
|
|
|
|
+ .end = 0x52000fff,
|
|
|
|
+ .flags = IORESOURCE_MEM
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .start = 0x53000000,
|
|
|
|
+ .end = 0x53000fff,
|
|
|
|
+ .flags = IORESOURCE_MEM
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct plat_serial8250_port cambria_optional_uart_data[] = {
|
|
|
|
+ {
|
2008-07-31 12:55:28 +03:00
|
|
|
+ .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_BUGGY_UART,
|
2008-06-26 16:59:15 +03:00
|
|
|
+ .iotype = UPIO_MEM,
|
|
|
|
+ .regshift = 0,
|
|
|
|
+ .uartclk = 1843200,
|
|
|
|
+ },
|
|
|
|
+ {
|
2008-07-31 12:55:28 +03:00
|
|
|
+ .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_BUGGY_UART,
|
2008-06-26 16:59:15 +03:00
|
|
|
+ .iotype = UPIO_MEM,
|
|
|
|
+ .regshift = 0,
|
|
|
|
+ .uartclk = 1843200,
|
|
|
|
+ },
|
|
|
|
+ { },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device cambria_optional_uart = {
|
|
|
|
+ .name = "serial8250",
|
|
|
|
+ .id = PLAT8250_DEV_PLATFORM1,
|
|
|
|
+ .dev.platform_data = cambria_optional_uart_data,
|
|
|
|
+ .num_resources = 2,
|
|
|
|
+ .resource = cambria_optional_uart_resources,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
static struct resource cambria_pata_resources[] = {
|
|
|
|
{
|
|
|
|
.flags = IORESOURCE_MEM
|
|
|
|
@@ -287,6 +325,19 @@
|
|
|
|
#ifdef CONFIG_SENSORS_EEPROM
|
|
|
|
static void __init cambria_gw2350_setup(void)
|
|
|
|
{
|
|
|
|
+ *IXP4XX_EXP_CS2 = 0xbfff0003;
|
2008-10-09 21:24:25 +03:00
|
|
|
+ set_irq_type(IRQ_IXP4XX_GPIO3, IRQT_RISING);
|
|
|
|
+ cambria_optional_uart_data[0].mapbase = 0x52FF0000;
|
|
|
|
+ cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(0x52FF0000, 0x0fff);
|
2008-06-26 16:59:15 +03:00
|
|
|
+ cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3;
|
|
|
|
+
|
|
|
|
+ *IXP4XX_EXP_CS3 = 0xbfff0003;
|
2008-10-09 21:24:25 +03:00
|
|
|
+ set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_RISING);
|
|
|
|
+ cambria_optional_uart_data[1].mapbase = 0x53FF0000;
|
|
|
|
+ cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53FF0000, 0x0fff);
|
2008-06-26 16:59:15 +03:00
|
|
|
+ cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
|
|
|
|
+
|
|
|
|
+ platform_device_register(&cambria_optional_uart);
|
|
|
|
platform_device_register(&cambria_npec_device);
|
|
|
|
platform_device_register(&cambria_npea_device);
|
|
|
|
|
2008-10-09 21:24:25 +03:00
|
|
|
@@ -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;
|
|
|
|
}
|
2008-06-26 16:59:15 +03:00
|
|
|
|
|
|
|
static void __init cambria_gw2358_setup(void)
|
|
|
|
{
|
|
|
|
+ *IXP4XX_EXP_CS3 = 0xbfff0003;
|
2008-10-09 21:24:25 +03:00
|
|
|
+ set_irq_type(IRQ_IXP4XX_GPIO3, IRQT_RISING);
|
2008-06-26 16:59:15 +03:00
|
|
|
+ cambria_optional_uart_data[0].mapbase = 0x53FC0000;
|
|
|
|
+ cambria_optional_uart_data[0].membase = (void __iomem *)ioremap(0x53FC0000, 0x0fff);
|
|
|
|
+ cambria_optional_uart_data[0].irq = IRQ_IXP4XX_GPIO3;
|
|
|
|
+
|
2008-10-09 21:24:25 +03:00
|
|
|
+ set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_RISING);
|
2008-06-26 16:59:15 +03:00
|
|
|
+ cambria_optional_uart_data[1].mapbase = 0x53F80000;
|
|
|
|
+ cambria_optional_uart_data[1].membase = (void __iomem *)ioremap(0x53F80000, 0x0fff);
|
|
|
|
+ cambria_optional_uart_data[1].irq = IRQ_IXP4XX_GPIO4;
|
|
|
|
+
|
|
|
|
+ platform_device_register(&cambria_optional_uart);
|
|
|
|
+
|
|
|
|
platform_device_register(&cambria_npec_device);
|
|
|
|
platform_device_register(&cambria_npea_device);
|
|
|
|
|