aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/renesas/r7780rp/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/renesas/r7780rp/setup.c')
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c49
1 files changed, 37 insertions, 12 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 9f89c8de9db9..0d74db9f1792 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -2,7 +2,7 @@
2 * arch/sh/boards/renesas/r7780rp/setup.c 2 * arch/sh/boards/renesas/r7780rp/setup.c
3 * 3 *
4 * Copyright (C) 2002 Atom Create Engineering Co., Ltd. 4 * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
5 * Copyright (C) 2005, 2006 Paul Mundt 5 * Copyright (C) 2005 - 2007 Paul Mundt
6 * 6 *
7 * Renesas Solutions Highlander R7780RP-1 Support. 7 * Renesas Solutions Highlander R7780RP-1 Support.
8 * 8 *
@@ -12,12 +12,12 @@
12 */ 12 */
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/pata_platform.h>
15#include <asm/machvec.h> 16#include <asm/machvec.h>
16#include <asm/r7780rp.h> 17#include <asm/r7780rp.h>
17#include <asm/clock.h> 18#include <asm/clock.h>
18#include <asm/io.h> 19#include <asm/io.h>
19 20
20extern void heartbeat_r7780rp(void);
21extern void init_r7780rp_IRQ(void); 21extern void init_r7780rp_IRQ(void);
22 22
23static struct resource m66596_usb_host_resources[] = { 23static struct resource m66596_usb_host_resources[] = {
@@ -46,14 +46,14 @@ static struct platform_device m66596_usb_host_device = {
46 46
47static struct resource cf_ide_resources[] = { 47static struct resource cf_ide_resources[] = {
48 [0] = { 48 [0] = {
49 .start = 0x1f0, 49 .start = PA_AREA5_IO + 0x1000,
50 .end = 0x1f0 + 8, 50 .end = PA_AREA5_IO + 0x1000 + 0x08 - 1,
51 .flags = IORESOURCE_IO, 51 .flags = IORESOURCE_MEM,
52 }, 52 },
53 [1] = { 53 [1] = {
54 .start = 0x1f0 + 0x206, 54 .start = PA_AREA5_IO + 0x80c,
55 .end = 0x1f0 + 8 + 0x206 + 8, 55 .end = PA_AREA5_IO + 0x80c + 0x16 - 1,
56 .flags = IORESOURCE_IO, 56 .flags = IORESOURCE_MEM,
57 }, 57 },
58 [2] = { 58 [2] = {
59#ifdef CONFIG_SH_R7780MP 59#ifdef CONFIG_SH_R7780MP
@@ -65,16 +65,44 @@ static struct resource cf_ide_resources[] = {
65 }, 65 },
66}; 66};
67 67
68static struct pata_platform_info pata_info = {
69 .ioport_shift = 1,
70};
71
68static struct platform_device cf_ide_device = { 72static struct platform_device cf_ide_device = {
69 .name = "pata_platform", 73 .name = "pata_platform",
70 .id = -1, 74 .id = -1,
71 .num_resources = ARRAY_SIZE(cf_ide_resources), 75 .num_resources = ARRAY_SIZE(cf_ide_resources),
72 .resource = cf_ide_resources, 76 .resource = cf_ide_resources,
77 .dev = {
78 .platform_data = &pata_info,
79 },
80};
81
82static unsigned char heartbeat_bit_pos[] = { 2, 1, 0, 3, 6, 5, 4, 7 };
83
84static struct resource heartbeat_resources[] = {
85 [0] = {
86 .start = PA_OBLED,
87 .end = PA_OBLED + ARRAY_SIZE(heartbeat_bit_pos) - 1,
88 .flags = IORESOURCE_MEM,
89 },
90};
91
92static struct platform_device heartbeat_device = {
93 .name = "heartbeat",
94 .id = -1,
95 .dev = {
96 .platform_data = heartbeat_bit_pos,
97 },
98 .num_resources = ARRAY_SIZE(heartbeat_resources),
99 .resource = heartbeat_resources,
73}; 100};
74 101
75static struct platform_device *r7780rp_devices[] __initdata = { 102static struct platform_device *r7780rp_devices[] __initdata = {
76 &m66596_usb_host_device, 103 &m66596_usb_host_device,
77 &cf_ide_device, 104 &cf_ide_device,
105 &heartbeat_device,
78}; 106};
79 107
80static int __init r7780rp_devices_setup(void) 108static int __init r7780rp_devices_setup(void)
@@ -148,7 +176,7 @@ static void __init r7780rp_setup(char **cmdline_p)
148#ifndef CONFIG_SH_R7780MP 176#ifndef CONFIG_SH_R7780MP
149 ctrl_outw(0x0001, PA_SDPOW); /* SD Power ON */ 177 ctrl_outw(0x0001, PA_SDPOW); /* SD Power ON */
150#endif 178#endif
151 ctrl_outw(ctrl_inw(PA_IVDRCTL) | 0x0100, PA_IVDRCTL); /* Si13112 */ 179 ctrl_outw(ctrl_inw(PA_IVDRCTL) | 0x01, PA_IVDRCTL); /* Si13112 */
152 180
153 pm_power_off = r7780rp_power_off; 181 pm_power_off = r7780rp_power_off;
154} 182}
@@ -185,8 +213,5 @@ struct sh_machine_vector mv_r7780rp __initmv = {
185 213
186 .mv_ioport_map = r7780rp_ioport_map, 214 .mv_ioport_map = r7780rp_ioport_map,
187 .mv_init_irq = init_r7780rp_IRQ, 215 .mv_init_irq = init_r7780rp_IRQ,
188#ifdef CONFIG_HEARTBEAT
189 .mv_heartbeat = heartbeat_r7780rp,
190#endif
191}; 216};
192ALIAS_MV(r7780rp) 217ALIAS_MV(r7780rp)