diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-08-20 13:03:41 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-09-21 11:57:51 +0900 |
commit | 8786c952c1682a132e99b736beae4523e409b13d (patch) | |
tree | fec83f758cf197fb4515675ceb8c023ecd60dc20 /arch/sh/boards/renesas | |
parent | 2eb0303c2cd536d7f15c7f3bafc848b850a447f0 (diff) | |
download | op-kernel-dev-8786c952c1682a132e99b736beae4523e409b13d.zip op-kernel-dev-8786c952c1682a132e99b736beae4523e409b13d.tar.gz |
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/renesas')
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/setup.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index adb529d..1062346 100644 --- a/arch/sh/boards/renesas/r7780rp/setup.c +++ b/arch/sh/boards/renesas/r7780rp/setup.c @@ -19,6 +19,7 @@ #include <asm/machvec.h> #include <asm/r7780rp.h> #include <asm/clock.h> +#include <asm/heartbeat.h> #include <asm/io.h> static struct resource r8a66597_usb_host_resources[] = { @@ -108,16 +109,23 @@ static struct platform_device cf_ide_device = { }, }; -static unsigned char heartbeat_bit_pos[] = { 2, 1, 0, 3, 6, 5, 4, 7 }; - static struct resource heartbeat_resources[] = { [0] = { .start = PA_OBLED, - .end = PA_OBLED + ARRAY_SIZE(heartbeat_bit_pos) - 1, + .end = PA_OBLED + 8 - 1, .flags = IORESOURCE_MEM, }, }; +#ifndef CONFIG_SH_R7785RP +static unsigned char heartbeat_bit_pos[] = { 2, 1, 0, 3, 6, 5, 4, 7 }; + +static struct heartbeat_data heartbeat_data = { + .bit_pos = heartbeat_bit_pos, + .nr_bits = ARRAY_SIZE(heartbeat_bit_pos), +}; +#endif + static struct platform_device heartbeat_device = { .name = "heartbeat", .id = -1, @@ -125,7 +133,7 @@ static struct platform_device heartbeat_device = { /* R7785RP has a slightly more sensible FPGA.. */ #ifndef CONFIG_SH_R7785RP .dev = { - .platform_data = heartbeat_bit_pos, + .platform_data = heartbeat_data, }, #endif .num_resources = ARRAY_SIZE(heartbeat_resources), |