aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-02-06 10:38:24 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-02-14 00:22:08 -0500
commit70f784ec1ddacf8e17da2663f842efac029da796 (patch)
tree882a454fd01edcb27e1aacba57d301333f61e932 /arch/sh/boards
parent5d0e146493a3306b931338ac030bc7a8de40c066 (diff)
sh: migor board support
This patch adds basic support for the Migo-R board. Only simple stuff provided by the cpu specific sh7722 code is in place now, like serial console port, timers and usb gadget. There is also partial support for the smc91c111 ethernet controller - unfortunately some driver header file also needs patching (not included here) to make the driver get IRQ sense information from the platform data. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/renesas/migor/Makefile1
-rw-r--r--arch/sh/boards/renesas/migor/setup.c61
2 files changed, 62 insertions, 0 deletions
diff --git a/arch/sh/boards/renesas/migor/Makefile b/arch/sh/boards/renesas/migor/Makefile
new file mode 100644
index 000000000000..77037567633b
--- /dev/null
+++ b/arch/sh/boards/renesas/migor/Makefile
@@ -0,0 +1 @@
obj-y := setup.o
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c
new file mode 100644
index 000000000000..21ab8c8fb590
--- /dev/null
+++ b/arch/sh/boards/renesas/migor/setup.c
@@ -0,0 +1,61 @@
1/*
2 * Renesas System Solutions Asia Pte. Ltd - Migo-R
3 *
4 * Copyright (C) 2008 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10#include <linux/init.h>
11#include <linux/platform_device.h>
12#include <linux/interrupt.h>
13#include <asm/machvec.h>
14#include <asm/io.h>
15
16/* Address IRQ Size Bus Description
17 * 0x00000000 64MB 16 NOR Flash (SP29PL256N)
18 * 0x0c000000 64MB 64 SDRAM (2xK4M563233G)
19 * 0x10000000 IRQ0 16 Ethernet (SMC91C111)
20 * 0x14000000 IRQ4 16 USB 2.0 Host Controller (M66596)
21 * 0x18000000 8GB 8 NAND Flash (K9K8G08U0A)
22 */
23
24static struct resource smc91x_eth_resources[] = {
25 [0] = {
26 .name = "smc91x-regs" ,
27 .start = P2SEGADDR(0x10000300),
28 .end = P2SEGADDR(0x1000030f),
29 .flags = IORESOURCE_MEM,
30 },
31 [1] = {
32 .start = 32, /* IRQ0 */
33 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
34 },
35};
36
37static struct platform_device smc91x_eth_device = {
38 .name = "smc91x",
39 .num_resources = ARRAY_SIZE(smc91x_eth_resources),
40 .resource = smc91x_eth_resources,
41};
42
43static struct platform_device *migor_devices[] __initdata = {
44 &smc91x_eth_device,
45};
46
47static int __init migor_devices_setup(void)
48{
49 return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices));
50}
51__initcall(migor_devices_setup);
52
53static void __init migor_setup(char **cmdline_p)
54{
55 ctrl_outw(0x1000, 0xa4050110); /* Enable IRQ0 in PJCR */
56}
57
58static struct sh_machine_vector mv_migor __initmv = {
59 .mv_name = "Migo-R",
60 .mv_setup = migor_setup,
61};