aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorJavier Herrero <jherrero@hvsistemas.es>2007-12-21 05:26:44 -0500
committerBryan Wu <bryan.wu@analog.com>2007-12-21 05:26:44 -0500
commitfb96c56de33def1484614c6a3d0fbef76595ce2f (patch)
treedcc6c97d85d50bbf77908155dee567bb4663a63c /arch/blackfin
parentd5c4b5e3b2682a9aac07a43a8a79d3b692b22567 (diff)
[Blackfin] arch: Added support for 8250-class UARTs in HV Sistemas H8606 board, modification in 8250.c driver for correct compilation with Blackfin
Signed-off-by: Javier Herrero <jherrero@hvsistemas.es> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c51
1 files changed, 49 insertions, 2 deletions
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 6bcf4047f89c..675fd1c62805 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -40,6 +40,7 @@
40#endif 40#endif
41#include <linux/pata_platform.h> 41#include <linux/pata_platform.h>
42#include <linux/irq.h> 42#include <linux/irq.h>
43
43#include <asm/dma.h> 44#include <asm/dma.h>
44#include <asm/bfin5xx_spi.h> 45#include <asm/bfin5xx_spi.h>
45#include <asm/reboot.h> 46#include <asm/reboot.h>
@@ -303,7 +304,49 @@ static struct platform_device bfin_uart_device = {
303}; 304};
304#endif 305#endif
305 306
306static struct platform_device *stamp_devices[] __initdata = { 307#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
308
309#include <linux/serial_8250.h>
310#include <linux/serial.h>
311
312/*
313 * Configuration for two 16550 UARTS in FPGA at addresses 0x20200000 and 0x202000010.
314 * running at half system clock, both with interrupt output or-ed to PF8. Change to
315 * suit different FPGA configuration, or to suit real 16550 UARTS connected to the bus
316 */
317
318static struct plat_serial8250_port serial8250_platform_data [] = {
319 {
320 .membase = 0x20200000,
321 .mapbase = 0x20200000,
322 .irq = IRQ_PF8,
323 .flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE,
324 .iotype = UPIO_MEM,
325 .regshift = 1,
326 .uartclk = 66666667,
327 }, {
328 .membase = 0x20200010,
329 .mapbase = 0x20200010,
330 .irq = IRQ_PF8,
331 .flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE,
332 .iotype = UPIO_MEM,
333 .regshift = 1,
334 .uartclk = 66666667,
335 }, {
336 }
337};
338
339static struct platform_device serial8250_device = {
340 .id = PLAT8250_DEV_PLATFORM,
341 .name = "serial8250",
342 .dev = {
343 .platform_data = serial8250_platform_data,
344 },
345};
346
347#endif
348
349static struct platform_device *h8606_devices[] __initdata = {
307#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 350#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
308 &rtc_device, 351 &rtc_device,
309#endif 352#endif
@@ -327,13 +370,17 @@ static struct platform_device *stamp_devices[] __initdata = {
327#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 370#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
328 &bfin_uart_device, 371 &bfin_uart_device,
329#endif 372#endif
373
374#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
375 &serial8250_device,
376#endif
330}; 377};
331 378
332static int __init H8606_init(void) 379static int __init H8606_init(void)
333{ 380{
334 printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); 381 printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n");
335 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 382 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
336 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 383 platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices));
337#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 384#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
338 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 385 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
339#endif 386#endif