From 8786c952c1682a132e99b736beae4523e409b13d Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 20 Aug 2007 13:03:41 +0900 Subject: 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 --- arch/sh/boards/se/7751/setup.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'arch/sh/boards/se/7751/setup.c') diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c index 7873d07..5ed1968 100644 --- a/arch/sh/boards/se/7751/setup.c +++ b/arch/sh/boards/se/7751/setup.c @@ -13,9 +13,15 @@ #include #include #include +#include static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 }; +static struct heartbeat_data heartbeat_data = { + .bit_pos = heartbeat_bit_pos, + .nr_bits = ARRAY_SIZE(heartbeat_bit_pos), +}; + static struct resource heartbeat_resources[] = { [0] = { .start = PA_LED, @@ -28,7 +34,7 @@ static struct platform_device heartbeat_device = { .name = "heartbeat", .id = -1, .dev = { - .platform_data = heartbeat_bit_pos, + .platform_data = heartbeat_data, }, .num_resources = ARRAY_SIZE(heartbeat_resources), .resource = heartbeat_resources, -- cgit v1.1 From a1fd306b887f06d648f45a2c722e9036dced9590 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Thu, 23 Aug 2007 15:11:44 +0900 Subject: sh: Fix up heartbeat build and resource size. We were abusing the resource size for the number of bits, this has been reworked using proper platform data, so this can be tidied up now. Boards in general only have a 1-byte wide resource, which the ioremap_nocache() case already handles. Signed-off-by: Paul Mundt --- arch/sh/boards/se/7751/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/sh/boards/se/7751/setup.c') diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c index 5ed1968..b007def 100644 --- a/arch/sh/boards/se/7751/setup.c +++ b/arch/sh/boards/se/7751/setup.c @@ -25,7 +25,7 @@ static struct heartbeat_data heartbeat_data = { static struct resource heartbeat_resources[] = { [0] = { .start = PA_LED, - .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1, + .end = PA_LED, .flags = IORESOURCE_MEM, }, }; @@ -34,7 +34,7 @@ static struct platform_device heartbeat_device = { .name = "heartbeat", .id = -1, .dev = { - .platform_data = heartbeat_data, + .platform_data = &heartbeat_data, }, .num_resources = ARRAY_SIZE(heartbeat_resources), .resource = heartbeat_resources, -- cgit v1.1 From aa0e77dc21d73057208b8683114b400c898cf53a Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 11 Sep 2007 12:35:09 +0900 Subject: sh: Fix up se7751 build. Trivial compile fix. Signed-off-by: Paul Mundt --- arch/sh/boards/se/7751/setup.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/sh/boards/se/7751/setup.c') diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c index b007def..deefbfd 100644 --- a/arch/sh/boards/se/7751/setup.c +++ b/arch/sh/boards/se/7751/setup.c @@ -41,7 +41,6 @@ static struct platform_device heartbeat_device = { }; static struct platform_device *se7751_devices[] __initdata = { - &smc91x_device, &heartbeat_device, }; -- cgit v1.1