summaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-se/7343
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-12-04 18:00:11 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-12-22 18:43:51 +0900
commit6aacba72dbdadc1445244e366ecf0263a160409e (patch)
tree4a47e49f2f392b09d64384d2642d41c134c7d8cb /arch/sh/boards/mach-se/7343
parent5727003b5d23eb852c057d25459bba27cbf754c3 (diff)
sh: add st16c2550 devices to se7343
Add 8250 platform data to setup the ST16C2550C chip on se7343. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-se/7343')
-rw-r--r--arch/sh/boards/mach-se/7343/setup.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-se/7343/setup.c b/arch/sh/boards/mach-se/7343/setup.c
index 9308660cff5..69dac91c2a6 100644
--- a/arch/sh/boards/mach-se/7343/setup.c
+++ b/arch/sh/boards/mach-se/7343/setup.c
@@ -1,6 +1,8 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
+#include <linux/serial_8250.h>
+#include <linux/serial_reg.h>
#include <asm/machvec.h>
#include <mach-se/mach/se7343.h>
#include <asm/heartbeat.h>
@@ -94,10 +96,41 @@ static struct platform_device nor_flash_device = {
.resource = nor_flash_resources,
};
+#define ST16C2550C_FLAGS (UPF_BOOT_AUTOCONF | UPF_IOREMAP)
+
+static struct plat_serial8250_port serial_platform_data[] = {
+ [0] = {
+ .iotype = UPIO_MEM,
+ .mapbase = 0x16000000,
+ .regshift = 1,
+ .flags = ST16C2550C_FLAGS,
+ .irq = UARTA_IRQ,
+ .uartclk = 7372800,
+ },
+ [1] = {
+ .iotype = UPIO_MEM,
+ .mapbase = 0x17000000,
+ .regshift = 1,
+ .flags = ST16C2550C_FLAGS,
+ .irq = UARTB_IRQ,
+ .uartclk = 7372800,
+ },
+ { },
+};
+
+static struct platform_device uart_device = {
+ .name = "serial8250",
+ .id = PLAT8250_DEV_PLATFORM,
+ .dev = {
+ .platform_data = serial_platform_data,
+ },
+};
+
static struct platform_device *sh7343se_platform_devices[] __initdata = {
&smc91x_device,
&heartbeat_device,
&nor_flash_device,
+ &uart_device,
};
static int __init sh7343se_devices_setup(void)