aboutsummaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-bf533/boards/H8606.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-28 08:15:24 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-28 08:15:24 +1100
commit91525300baf162e83e923b09ca286f9205e21522 (patch)
tree115f50c0f270eb1bb032dc520e018d9aa65b957c /arch/blackfin/mach-bf533/boards/H8606.c
parent991dee591a99d035796a8c194eb1796cc020e142 (diff)
parent9c5e710bc1431f41ccdd0c294fa355aa0d45d2d7 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (54 commits) MAINTIANERS: just use Mike gmail e-mail for contact and pawn the serial driver off onto Sonic [Blackfin] arch: remove old I2C BF54x porting. [Blackfin] arch: Add the semtimedop syscall. Upstream uClibc doesn't compile without it. [Blackfin] arch: fix bug kernel boot message: memory information is not reasonable [Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver [Blackfin] arch: Fix bug - kernel build with Debug option enabled fails to boot up [Blackfin] arch: Fix bug Only RTC interrupt can wake up deeper sleep core. [Blackfin] arch: Add proper SW System Reset delay sequence [Blackfin] arch: Update copyright date [Blackfin] arch: GPIO API cleanup and anomaly update [Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_GPIO API interface [Blackfin] arch: Initial checkin of the memory protection support. [Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option [Blackfin] arch: Add some comments - fix semicolons [Blackfin] arch: move all code related to CPLB handling into a new subdirectory under kernel/ [Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted [Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533 and EZKIT-BF561 boards [Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel [Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on [Blackfin] arch: update to latest anomaly sheets ...
Diffstat (limited to 'arch/blackfin/mach-bf533/boards/H8606.c')
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c83
1 files changed, 81 insertions, 2 deletions
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 6bcf4047f89..a72c7a620fa 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -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>
@@ -303,7 +304,77 @@ 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
+
+#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE)
+
+/*
+ * Configuration for one OpenCores keyboard controller in FPGA at address 0x20200030,
+ * interrupt output wired to PF9. Change to suit different FPGA configuration
+ */
+
+static struct resource opencores_kbd_resources[] = {
+ [0] = {
+ .start = 0x20200030,
+ .end = 0x20300030 + 2,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_PF9,
+ .end = IRQ_PF9,
+ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+ },
+};
+
+static struct platform_device opencores_kbd_device = {
+ .id = -1,
+ .name = "opencores-kbd",
+ .resource = opencores_kbd_resources,
+ .num_resources = ARRAY_SIZE(opencores_kbd_resources),
+};
+#endif
+
+static struct platform_device *h8606_devices[] __initdata = {
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
&rtc_device,
#endif
@@ -327,13 +398,21 @@ 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
+
+#if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE)
+ &opencores_kbd_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