diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2007-06-03 11:39:25 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2007-06-03 11:48:54 -0400 |
commit | 63e6e17ead8f918889c63cc361de58a3f71f6115 (patch) | |
tree | 80d6dde29a9947e7b991f9ea0834938058d7db0a /drivers | |
parent | b10958d338d62a4157005b335799d1466567d59d (diff) |
[WATCHDOG] Mixcom Watchdog - get rid of port offset's
Get rid of the port offset's used for the
mixcom and flashcom watchdog devices.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/watchdog/mixcomwd.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c index df5fc769fcc3..b614a5f6e331 100644 --- a/drivers/char/watchdog/mixcomwd.c +++ b/drivers/char/watchdog/mixcomwd.c | |||
@@ -54,12 +54,19 @@ | |||
54 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
55 | #include <asm/io.h> | 55 | #include <asm/io.h> |
56 | 56 | ||
57 | static int mixcomwd_ioports[] = { 0x180, 0x280, 0x380, 0x000 }; | 57 | /* |
58 | 58 | * We have two types of cards that can be probed: | |
59 | #define MIXCOM_WATCHDOG_OFFSET 0xc10 | 59 | * 1) The Mixcom cards: these cards can be found at addresses |
60 | * 0x180, 0x280, 0x380 with an additional offset of 0xc10. | ||
61 | * (Or 0xd90, 0xe90, 0xf90). | ||
62 | * 2) The FlashCOM cards: these cards can be set up at | ||
63 | * 0x300 -> 0x378, in 0x8 jumps with an offset of 0x04. | ||
64 | * (Or 0x304 -> 0x37c in 0x8 jumps). | ||
65 | * Each card has it's own ID. | ||
66 | */ | ||
60 | #define MIXCOM_ID 0x11 | 67 | #define MIXCOM_ID 0x11 |
61 | #define FLASHCOM_WATCHDOG_OFFSET 0x4 | ||
62 | #define FLASHCOM_ID 0x18 | 68 | #define FLASHCOM_ID 0x18 |
69 | static int mixcomwd_ioports[] = { 0xd90, 0xe90, 0xf90, 0x000 }; | ||
63 | 70 | ||
64 | static void mixcomwd_timerfun(unsigned long d); | 71 | static void mixcomwd_timerfun(unsigned long d); |
65 | 72 | ||
@@ -214,7 +221,6 @@ static int __init mixcomwd_checkcard(int port) | |||
214 | { | 221 | { |
215 | int id; | 222 | int id; |
216 | 223 | ||
217 | port += MIXCOM_WATCHDOG_OFFSET; | ||
218 | if (!request_region(port, 1, "MixCOM watchdog")) { | 224 | if (!request_region(port, 1, "MixCOM watchdog")) { |
219 | return 0; | 225 | return 0; |
220 | } | 226 | } |
@@ -231,7 +237,6 @@ static int __init flashcom_checkcard(int port) | |||
231 | { | 237 | { |
232 | int id; | 238 | int id; |
233 | 239 | ||
234 | port += FLASHCOM_WATCHDOG_OFFSET; | ||
235 | if (!request_region(port, 1, "MixCOM watchdog")) { | 240 | if (!request_region(port, 1, "MixCOM watchdog")) { |
236 | return 0; | 241 | return 0; |
237 | } | 242 | } |
@@ -257,8 +262,8 @@ static int __init mixcomwd_init(void) | |||
257 | } | 262 | } |
258 | } | 263 | } |
259 | 264 | ||
260 | /* The FlashCOM card can be set up at 0x300 -> 0x378, in 0x8 jumps */ | 265 | /* The FlashCOM card can be set up at 0x304 -> 0x37c, in 0x8 jumps */ |
261 | for (i = 0x300; !found && i < 0x380; i+=0x8) { | 266 | for (i = 0x304; !found && i < 0x380; i+=0x8) { |
262 | watchdog_port = flashcom_checkcard(i); | 267 | watchdog_port = flashcom_checkcard(i); |
263 | if (watchdog_port) { | 268 | if (watchdog_port) { |
264 | found = 1; | 269 | found = 1; |