Skip to content

Commit

Permalink
[Blackfin] arch: Added support for 8250-class UARTs in HV Sistemas H8…
Browse files Browse the repository at this point in the history
…606 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>
  • Loading branch information
Javier Herrero authored and Bryan Wu committed Dec 21, 2007
1 parent d5c4b5e commit fb96c56
Showing 1 changed file with 49 additions and 2 deletions.
51 changes: 49 additions & 2 deletions arch/blackfin/mach-bf533/boards/H8606.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#endif
#include <linux/pata_platform.h>
#include <linux/irq.h>

#include <asm/dma.h>
#include <asm/bfin5xx_spi.h>
#include <asm/reboot.h>
Expand Down Expand Up @@ -303,7 +304,49 @@ static struct platform_device bfin_uart_device = {
};
#endif

static struct platform_device *stamp_devices[] __initdata = {
#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)

#include <linux/serial_8250.h>
#include <linux/serial.h>

/*
* Configuration for two 16550 UARTS in FPGA at addresses 0x20200000 and 0x202000010.
* running at half system clock, both with interrupt output or-ed to PF8. Change to
* suit different FPGA configuration, or to suit real 16550 UARTS connected to the bus
*/

static struct plat_serial8250_port serial8250_platform_data [] = {
{
.membase = 0x20200000,
.mapbase = 0x20200000,
.irq = IRQ_PF8,
.flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE,
.iotype = UPIO_MEM,
.regshift = 1,
.uartclk = 66666667,
}, {
.membase = 0x20200010,
.mapbase = 0x20200010,
.irq = IRQ_PF8,
.flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE,
.iotype = UPIO_MEM,
.regshift = 1,
.uartclk = 66666667,
}, {
}
};

static struct platform_device serial8250_device = {
.id = PLAT8250_DEV_PLATFORM,
.name = "serial8250",
.dev = {
.platform_data = serial8250_platform_data,
},
};

#endif

static struct platform_device *h8606_devices[] __initdata = {
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
&rtc_device,
#endif
Expand All @@ -327,13 +370,17 @@ static struct platform_device *stamp_devices[] __initdata = {
#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
&bfin_uart_device,
#endif

#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
&serial8250_device,
#endif
};

static int __init H8606_init(void)
{
printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n");
printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif
Expand Down

0 comments on commit fb96c56

Please sign in to comment.