Skip to content

Commit

Permalink
sh: Fix up heartbeat build and resource size.
Browse files Browse the repository at this point in the history
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 <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Sep 21, 2007
1 parent b8996e4 commit a1fd306
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion arch/sh/boards/mpc1211/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static int put_smb_blk(unsigned char *p, int address, int command, int no)
static struct resource heartbeat_resources[] = {
[0] = {
.start = 0xa2000000,
.end = 0xa2000000 + 8 - 1,
.end = 0xa2000000,
.flags = IORESOURCE_MEM,
},
};
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/boards/renesas/r7780rp/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static struct platform_device cf_ide_device = {
static struct resource heartbeat_resources[] = {
[0] = {
.start = PA_OBLED,
.end = PA_OBLED + 8 - 1,
.end = PA_OBLED,
.flags = IORESOURCE_MEM,
},
};
Expand All @@ -133,7 +133,7 @@ static struct platform_device heartbeat_device = {
/* R7785RP has a slightly more sensible FPGA.. */
#ifndef CONFIG_SH_R7785RP
.dev = {
.platform_data = heartbeat_data,
.platform_data = &heartbeat_data,
},
#endif
.num_resources = ARRAY_SIZE(heartbeat_resources),
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/renesas/rts7751r2d/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static struct platform_device cf_ide_device = {
static struct resource heartbeat_resources[] = {
[0] = {
.start = PA_OUTPORT,
.end = PA_OUTPORT + 8 - 1,
.end = PA_OUTPORT,
.flags = IORESOURCE_MEM,
},
};
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/renesas/x3proto/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
static struct resource heartbeat_resources[] = {
[0] = {
.start = 0xb8140020,
.end = 0xb8140020 + 8 - 1,
.end = 0xb8140020,
.flags = IORESOURCE_MEM,
},
};
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/boards/se/7206/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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,
},
};
Expand All @@ -55,7 +55,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,
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/se/7343/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static struct platform_device smc91x_device = {
static struct resource heartbeat_resources[] = {
[0] = {
.start = PA_LED,
.end = PA_LED + 8 - 1,
.end = PA_LED,
.flags = IORESOURCE_MEM,
},
};
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/boards/se/770x/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,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,
},
};
Expand All @@ -108,7 +108,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,
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/se/7722/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
static struct resource heartbeat_resources[] = {
[0] = {
.start = PA_LED,
.end = PA_LED + 8 - 1,
.end = PA_LED,
.flags = IORESOURCE_MEM,
},
};
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/boards/se/7751/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/se/7780/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
static struct resource heartbeat_resources[] = {
[0] = {
.start = PA_LED,
.end = PA_LED + 8 - 1,
.end = PA_LED,
.flags = IORESOURCE_MEM,
},
};
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/sh03/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void __init sh03_setup(char **cmdline_p)
static struct resource heartbeat_resources[] = {
[0] = {
.start = 0xa0800000,
.end = 0xa0800000 + 8 - 1,
.end = 0xa0800000,
.flags = IORESOURCE_MEM,
},
};
Expand Down

0 comments on commit a1fd306

Please sign in to comment.