|
@@ -357,3 +357,152 @@ static struct platform_device cm_flash_device = {
|
|
|
.id = 0,
|
|
|
.dev = {
|
|
|
.platform_data = &cm_flash_data,
|
|
|
+ },
|
|
|
+ .num_resources = ARRAY_SIZE(cm_flash_resource),
|
|
|
+ .resource = cm_flash_resource,
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_UART0
|
|
|
+static struct resource bfin_uart0_resources[] = {
|
|
|
+ {
|
|
|
+ .start = UART0_THR,
|
|
|
+ .end = UART0_GCTL+2,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = IRQ_UART0_TX,
|
|
|
+ .end = IRQ_UART0_TX,
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = IRQ_UART0_RX,
|
|
|
+ .end = IRQ_UART0_RX,
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = IRQ_UART0_ERROR,
|
|
|
+ .end = IRQ_UART0_ERROR,
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = CH_UART0_TX,
|
|
|
+ .end = CH_UART0_TX,
|
|
|
+ .flags = IORESOURCE_DMA,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = CH_UART0_RX,
|
|
|
+ .end = CH_UART0_RX,
|
|
|
+ .flags = IORESOURCE_DMA,
|
|
|
+ },
|
|
|
+#ifdef CONFIG_BFIN_UART0_CTSRTS
|
|
|
+ {
|
|
|
+ /*
|
|
|
+ * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
|
|
|
+ */
|
|
|
+ .start = -1,
|
|
|
+ .end = -1,
|
|
|
+ .flags = IORESOURCE_IO,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ /*
|
|
|
+ * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
|
|
|
+ */
|
|
|
+ .start = -1,
|
|
|
+ .end = -1,
|
|
|
+ .flags = IORESOURCE_IO,
|
|
|
+ },
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+static unsigned short bfin_uart0_peripherals[] = {
|
|
|
+ P_UART0_TX, P_UART0_RX, 0
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device bfin_uart0_device = {
|
|
|
+ .name = "bfin-uart",
|
|
|
+ .id = 0,
|
|
|
+ .num_resources = ARRAY_SIZE(bfin_uart0_resources),
|
|
|
+ .resource = bfin_uart0_resources,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
|
|
|
+ },
|
|
|
+};
|
|
|
+#endif
|
|
|
+#ifdef CONFIG_SERIAL_BFIN_UART1
|
|
|
+static struct resource bfin_uart1_resources[] = {
|
|
|
+ {
|
|
|
+ .start = UART1_THR,
|
|
|
+ .end = UART1_GCTL+2,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = IRQ_UART1_TX,
|
|
|
+ .end = IRQ_UART1_TX,
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = IRQ_UART1_RX,
|
|
|
+ .end = IRQ_UART1_RX,
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = IRQ_UART1_ERROR,
|
|
|
+ .end = IRQ_UART1_ERROR,
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = CH_UART1_TX,
|
|
|
+ .end = CH_UART1_TX,
|
|
|
+ .flags = IORESOURCE_DMA,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .start = CH_UART1_RX,
|
|
|
+ .end = CH_UART1_RX,
|
|
|
+ .flags = IORESOURCE_DMA,
|
|
|
+ },
|
|
|
+#ifdef CONFIG_BFIN_UART1_CTSRTS
|
|
|
+ {
|
|
|
+ /*
|
|
|
+ * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
|
|
|
+ */
|
|
|
+ .start = -1,
|
|
|
+ .end = -1,
|
|
|
+ .flags = IORESOURCE_IO,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ /*
|
|
|
+ * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
|
|
|
+ */
|
|
|
+ .start = -1,
|
|
|
+ .end = -1,
|
|
|
+ .flags = IORESOURCE_IO,
|
|
|
+ },
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+static unsigned short bfin_uart1_peripherals[] = {
|
|
|
+ P_UART1_TX, P_UART1_RX, 0
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device bfin_uart1_device = {
|
|
|
+ .name = "bfin-uart",
|
|
|
+ .id = 1,
|
|
|
+ .num_resources = ARRAY_SIZE(bfin_uart1_resources),
|
|
|
+ .resource = bfin_uart1_resources,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &bfin_uart1_peripherals, /* Passed to driver */
|
|
|
+ },
|
|
|
+};
|
|
|
+#endif
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
|
|
+#ifdef CONFIG_BFIN_SIR0
|
|
|
+static struct resource bfin_sir0_resources[] = {
|
|
|
+ {
|
|
|
+ .start = 0xFFC00400,
|
|
|
+ .end = 0xFFC004FF,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|