diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-02-14 00:49:04 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-02-14 00:49:04 -0500 |
commit | 71074d3a2c70aa8a213222fef5014bfd9b3daf1f (patch) | |
tree | a8676aff8f72826910ede93a69f0afcb67ded2ea /arch/sh/boards/renesas/r7780rp/setup.c | |
parent | db2e1fa3f0eefbbe04e90d6e4d290ee176b28248 (diff) |
sh: Fixup r7780rp pata_platform for devres conversion.
Tidy up the R7780RP I/O mapping routines and switch the
pata_platform resources to IORESOURCE_MEM types, killing off
the useless port->addr conversion.
This fixes up R7780RP to boot after the recent devres conversion.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/renesas/r7780rp/setup.c')
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/setup.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index c40f85cc3e5e..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,6 +12,7 @@ | |||
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> |
@@ -45,14 +46,14 @@ static struct platform_device m66596_usb_host_device = { | |||
45 | 46 | ||
46 | static struct resource cf_ide_resources[] = { | 47 | static struct resource cf_ide_resources[] = { |
47 | [0] = { | 48 | [0] = { |
48 | .start = 0x1f0, | 49 | .start = PA_AREA5_IO + 0x1000, |
49 | .end = 0x1f0 + 8, | 50 | .end = PA_AREA5_IO + 0x1000 + 0x08 - 1, |
50 | .flags = IORESOURCE_IO, | 51 | .flags = IORESOURCE_MEM, |
51 | }, | 52 | }, |
52 | [1] = { | 53 | [1] = { |
53 | .start = 0x1f0 + 0x206, | 54 | .start = PA_AREA5_IO + 0x80c, |
54 | .end = 0x1f0 + 8 + 0x206 + 8, | 55 | .end = PA_AREA5_IO + 0x80c + 0x16 - 1, |
55 | .flags = IORESOURCE_IO, | 56 | .flags = IORESOURCE_MEM, |
56 | }, | 57 | }, |
57 | [2] = { | 58 | [2] = { |
58 | #ifdef CONFIG_SH_R7780MP | 59 | #ifdef CONFIG_SH_R7780MP |
@@ -64,11 +65,18 @@ static struct resource cf_ide_resources[] = { | |||
64 | }, | 65 | }, |
65 | }; | 66 | }; |
66 | 67 | ||
68 | static struct pata_platform_info pata_info = { | ||
69 | .ioport_shift = 1, | ||
70 | }; | ||
71 | |||
67 | static struct platform_device cf_ide_device = { | 72 | static struct platform_device cf_ide_device = { |
68 | .name = "pata_platform", | 73 | .name = "pata_platform", |
69 | .id = -1, | 74 | .id = -1, |
70 | .num_resources = ARRAY_SIZE(cf_ide_resources), | 75 | .num_resources = ARRAY_SIZE(cf_ide_resources), |
71 | .resource = cf_ide_resources, | 76 | .resource = cf_ide_resources, |
77 | .dev = { | ||
78 | .platform_data = &pata_info, | ||
79 | }, | ||
72 | }; | 80 | }; |
73 | 81 | ||
74 | static unsigned char heartbeat_bit_pos[] = { 2, 1, 0, 3, 6, 5, 4, 7 }; | 82 | static unsigned char heartbeat_bit_pos[] = { 2, 1, 0, 3, 6, 5, 4, 7 }; |