diff options
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/stamp.c')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 100 |
1 files changed, 90 insertions, 10 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index ac9b52e0087c..9842288c4f1c 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -1157,30 +1157,105 @@ static struct platform_device bfin_lq035q1_device = { | |||
1157 | #endif | 1157 | #endif |
1158 | 1158 | ||
1159 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 1159 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
1160 | static struct resource bfin_uart_resources[] = { | ||
1161 | #ifdef CONFIG_SERIAL_BFIN_UART0 | 1160 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
1161 | static struct resource bfin_uart0_resources[] = { | ||
1162 | { | 1162 | { |
1163 | .start = 0xFFC00400, | 1163 | .start = UART0_THR, |
1164 | .end = 0xFFC004FF, | 1164 | .end = UART0_GCTL+2, |
1165 | .flags = IORESOURCE_MEM, | 1165 | .flags = IORESOURCE_MEM, |
1166 | }, | 1166 | }, |
1167 | { | ||
1168 | .start = IRQ_UART0_RX, | ||
1169 | .end = IRQ_UART0_RX+1, | ||
1170 | .flags = IORESOURCE_IRQ, | ||
1171 | }, | ||
1172 | { | ||
1173 | .start = IRQ_UART0_ERROR, | ||
1174 | .end = IRQ_UART0_ERROR, | ||
1175 | .flags = IORESOURCE_IRQ, | ||
1176 | }, | ||
1177 | { | ||
1178 | .start = CH_UART0_TX, | ||
1179 | .end = CH_UART0_TX, | ||
1180 | .flags = IORESOURCE_DMA, | ||
1181 | }, | ||
1182 | { | ||
1183 | .start = CH_UART0_RX, | ||
1184 | .end = CH_UART0_RX, | ||
1185 | .flags = IORESOURCE_DMA, | ||
1186 | }, | ||
1187 | #ifdef CONFIG_BFIN_UART0_CTSRTS | ||
1188 | { /* CTS pin */ | ||
1189 | .start = GPIO_PG7, | ||
1190 | .end = GPIO_PG7, | ||
1191 | .flags = IORESOURCE_IO, | ||
1192 | }, | ||
1193 | { /* RTS pin */ | ||
1194 | .start = GPIO_PG6, | ||
1195 | .end = GPIO_PG6, | ||
1196 | .flags = IORESOURCE_IO, | ||
1197 | }, | ||
1198 | #endif | ||
1199 | }; | ||
1200 | |||
1201 | unsigned short bfin_uart0_peripherals[] = { | ||
1202 | P_UART0_TX, P_UART0_RX, 0 | ||
1203 | }; | ||
1204 | |||
1205 | static struct platform_device bfin_uart0_device = { | ||
1206 | .name = "bfin-uart", | ||
1207 | .id = 0, | ||
1208 | .num_resources = ARRAY_SIZE(bfin_uart0_resources), | ||
1209 | .resource = bfin_uart0_resources, | ||
1210 | .dev = { | ||
1211 | .platform_data = &bfin_uart0_peripherals, /* Passed to driver */ | ||
1212 | }, | ||
1213 | }; | ||
1167 | #endif | 1214 | #endif |
1168 | #ifdef CONFIG_SERIAL_BFIN_UART1 | 1215 | #ifdef CONFIG_SERIAL_BFIN_UART1 |
1216 | static struct resource bfin_uart1_resources[] = { | ||
1169 | { | 1217 | { |
1170 | .start = 0xFFC02000, | 1218 | .start = UART1_THR, |
1171 | .end = 0xFFC020FF, | 1219 | .end = UART1_GCTL+2, |
1172 | .flags = IORESOURCE_MEM, | 1220 | .flags = IORESOURCE_MEM, |
1173 | }, | 1221 | }, |
1174 | #endif | 1222 | { |
1223 | .start = IRQ_UART1_RX, | ||
1224 | .end = IRQ_UART1_RX+1, | ||
1225 | .flags = IORESOURCE_IRQ, | ||
1226 | }, | ||
1227 | { | ||
1228 | .start = IRQ_UART1_ERROR, | ||
1229 | .end = IRQ_UART1_ERROR, | ||
1230 | .flags = IORESOURCE_IRQ, | ||
1231 | }, | ||
1232 | { | ||
1233 | .start = CH_UART1_TX, | ||
1234 | .end = CH_UART1_TX, | ||
1235 | .flags = IORESOURCE_DMA, | ||
1236 | }, | ||
1237 | { | ||
1238 | .start = CH_UART1_RX, | ||
1239 | .end = CH_UART1_RX, | ||
1240 | .flags = IORESOURCE_DMA, | ||
1241 | }, | ||
1242 | }; | ||
1243 | |||
1244 | unsigned short bfin_uart1_peripherals[] = { | ||
1245 | P_UART1_TX, P_UART1_RX, 0 | ||
1175 | }; | 1246 | }; |
1176 | 1247 | ||
1177 | static struct platform_device bfin_uart_device = { | 1248 | static struct platform_device bfin_uart1_device = { |
1178 | .name = "bfin-uart", | 1249 | .name = "bfin-uart", |
1179 | .id = 1, | 1250 | .id = 1, |
1180 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | 1251 | .num_resources = ARRAY_SIZE(bfin_uart1_resources), |
1181 | .resource = bfin_uart_resources, | 1252 | .resource = bfin_uart1_resources, |
1253 | .dev = { | ||
1254 | .platform_data = &bfin_uart1_peripherals, /* Passed to driver */ | ||
1255 | }, | ||
1182 | }; | 1256 | }; |
1183 | #endif | 1257 | #endif |
1258 | #endif | ||
1184 | 1259 | ||
1185 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 1260 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |
1186 | #ifdef CONFIG_BFIN_SIR0 | 1261 | #ifdef CONFIG_BFIN_SIR0 |
@@ -1771,7 +1846,12 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1771 | #endif | 1846 | #endif |
1772 | 1847 | ||
1773 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 1848 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
1774 | &bfin_uart_device, | 1849 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
1850 | &bfin_uart0_device, | ||
1851 | #endif | ||
1852 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1853 | &bfin_uart1_device, | ||
1854 | #endif | ||
1775 | #endif | 1855 | #endif |
1776 | 1856 | ||
1777 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | 1857 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) |