aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/se/7722/setup.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-08-20 00:03:41 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-09-20 22:57:51 -0400
commit8786c952c1682a132e99b736beae4523e409b13d (patch)
treefec83f758cf197fb4515675ceb8c023ecd60dc20 /arch/sh/boards/se/7722/setup.c
parent2eb0303c2cd536d7f15c7f3bafc848b850a447f0 (diff)
sh: heartbeat driver update.
Add some flags for the heartbeat driver, and kill off some duplication in the bit positions for the boards that don't have special cases. This also allows for variable access widths and inversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/se/7722/setup.c')
-rw-r--r--arch/sh/boards/se/7722/setup.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index 495fc7e2b60f..8f1c8a617bb5 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -18,12 +18,10 @@
18#include <asm/io.h> 18#include <asm/io.h>
19 19
20/* Heartbeat */ 20/* Heartbeat */
21static unsigned char heartbeat_bit_pos[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
22
23static struct resource heartbeat_resources[] = { 21static struct resource heartbeat_resources[] = {
24 [0] = { 22 [0] = {
25 .start = PA_LED, 23 .start = PA_LED,
26 .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1, 24 .end = PA_LED + 8 - 1,
27 .flags = IORESOURCE_MEM, 25 .flags = IORESOURCE_MEM,
28 }, 26 },
29}; 27};
@@ -31,9 +29,6 @@ static struct resource heartbeat_resources[] = {
31static struct platform_device heartbeat_device = { 29static struct platform_device heartbeat_device = {
32 .name = "heartbeat", 30 .name = "heartbeat",
33 .id = -1, 31 .id = -1,
34 .dev = {
35 .platform_data = heartbeat_bit_pos,
36 },
37 .num_resources = ARRAY_SIZE(heartbeat_resources), 32 .num_resources = ARRAY_SIZE(heartbeat_resources),
38 .resource = heartbeat_resources, 33 .resource = heartbeat_resources,
39}; 34};
@@ -109,7 +104,7 @@ static void __init se7722_setup(char **cmdline_p)
109 ctrl_outl(0x00051001, MSTPCR0); 104 ctrl_outl(0x00051001, MSTPCR0);
110 ctrl_outl(0x00000000, MSTPCR1); 105 ctrl_outl(0x00000000, MSTPCR1);
111 /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC */ 106 /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC */
112 ctrl_outl(0xffffbfC0, MSTPCR2); 107 ctrl_outl(0xffffbfC0, MSTPCR2);
113 108
114 ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */ 109 ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */
115 ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */ 110 ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */