aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/board-urquell.c
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2009-03-05 03:37:12 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-03-05 03:37:12 -0500
commit929ef1a1f566087e4b362e3a56c50bf9db30e3c5 (patch)
tree835bb6b3c0bfd1f50c8bafb8d088ea4f96561782 /arch/sh/boards/board-urquell.c
parent5ac072e110ff358a9ebc318a1b54f0182b799f72 (diff)
sh: urquell: Add smc91x support and update defconfig accordingly.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/board-urquell.c')
-rw-r--r--arch/sh/boards/board-urquell.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/sh/boards/board-urquell.c b/arch/sh/boards/board-urquell.c
index d5caeabf46e0..17036ce20086 100644
--- a/arch/sh/boards/board-urquell.c
+++ b/arch/sh/boards/board-urquell.c
@@ -11,6 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/fb.h> 13#include <linux/fb.h>
14#include <linux/smc91x.h>
14#include <linux/mtd/physmap.h> 15#include <linux/mtd/physmap.h>
15#include <linux/delay.h> 16#include <linux/delay.h>
16#include <linux/gpio.h> 17#include <linux/gpio.h>
@@ -42,6 +43,32 @@ static struct platform_device heartbeat_device = {
42 .resource = heartbeat_resources, 43 .resource = heartbeat_resources,
43}; 44};
44 45
46static struct smc91x_platdata smc91x_info = {
47 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
48};
49
50static struct resource smc91x_eth_resources[] = {
51 [0] = {
52 .name = "SMC91C111" ,
53 .start = 0x05800300,
54 .end = 0x0580030f,
55 .flags = IORESOURCE_MEM,
56 },
57 [1] = {
58 .start = 11,
59 .flags = IORESOURCE_IRQ,
60 },
61};
62
63static struct platform_device smc91x_eth_device = {
64 .name = "smc91x",
65 .num_resources = ARRAY_SIZE(smc91x_eth_resources),
66 .resource = smc91x_eth_resources,
67 .dev = {
68 .platform_data = &smc91x_info,
69 },
70};
71
45static struct mtd_partition nor_flash_partitions[] = { 72static struct mtd_partition nor_flash_partitions[] = {
46 { 73 {
47 .name = "loader", 74 .name = "loader",
@@ -92,6 +119,7 @@ static struct platform_device nor_flash_device = {
92 119
93static struct platform_device *urquell_devices[] __initdata = { 120static struct platform_device *urquell_devices[] __initdata = {
94 &heartbeat_device, 121 &heartbeat_device,
122 &smc91x_eth_device,
95 &nor_flash_device, 123 &nor_flash_device,
96}; 124};
97 125
@@ -111,6 +139,11 @@ static void urquell_power_off(void)
111 __raw_writew(0xa5a5, UBOARDREG(SRSTR)); 139 __raw_writew(0xa5a5, UBOARDREG(SRSTR));
112} 140}
113 141
142static void __init urquell_init_irq(void)
143{
144 plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK);
145}
146
114/* Initialize the board */ 147/* Initialize the board */
115static void __init urquell_setup(char **cmdline_p) 148static void __init urquell_setup(char **cmdline_p)
116{ 149{
@@ -125,4 +158,5 @@ static void __init urquell_setup(char **cmdline_p)
125static struct sh_machine_vector mv_urquell __initmv = { 158static struct sh_machine_vector mv_urquell __initmv = {
126 .mv_name = "Urquell", 159 .mv_name = "Urquell",
127 .mv_setup = urquell_setup, 160 .mv_setup = urquell_setup,
161 .mv_init_irq = urquell_init_irq,
128}; 162};