aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/sbc_fitpc2_wdt.c
diff options
context:
space:
mode:
authorDenis Turischev <denis@compulab.co.il>2010-01-21 09:10:07 -0500
committerWim Van Sebroeck <wim@iguana.be>2010-01-25 14:48:49 -0500
commitef39a1bf3c4fbdea085c618be424cc88b803f248 (patch)
tree44be93747836260b3fb2778cfe5830c2c467abe1 /drivers/watchdog/sbc_fitpc2_wdt.c
parente605d554ec17be55741b066387ae9f341777f52c (diff)
[WATCHDOG] sbc_fitpc2_wdt: fix I/O space access technique.
The mdelay function was used between I/O access commands, that causes peak in CPU usage. Fix it by substitution mdelay to msleep. Expand usage on fitPC2 compatible boards according to DMI identification. Signed-off-by: Denis Turischev <denis@compulab.co.il> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/sbc_fitpc2_wdt.c')
-rw-r--r--drivers/watchdog/sbc_fitpc2_wdt.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c
index 91430a89107c..e6763d2a567b 100644
--- a/drivers/watchdog/sbc_fitpc2_wdt.c
+++ b/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -46,9 +46,9 @@ static DEFINE_SPINLOCK(wdt_lock);
46static void wdt_send_data(unsigned char command, unsigned char data) 46static void wdt_send_data(unsigned char command, unsigned char data)
47{ 47{
48 outb(command, COMMAND_PORT); 48 outb(command, COMMAND_PORT);
49 mdelay(100); 49 msleep(100);
50 outb(data, DATA_PORT); 50 outb(data, DATA_PORT);
51 mdelay(200); 51 msleep(200);
52} 52}
53 53
54static void wdt_enable(void) 54static void wdt_enable(void)
@@ -202,11 +202,10 @@ static int __init fitpc2_wdt_init(void)
202{ 202{
203 int err; 203 int err;
204 204
205 if (strcmp("SBC-FITPC2", dmi_get_system_info(DMI_BOARD_NAME))) { 205 if (!strstr(dmi_get_system_info(DMI_BOARD_NAME), "SBC-FITPC2"))
206 pr_info("board name is: %s. Should be SBC-FITPC2\n",
207 dmi_get_system_info(DMI_BOARD_NAME));
208 return -ENODEV; 206 return -ENODEV;
209 } 207
208 pr_info("%s found\n", dmi_get_system_info(DMI_BOARD_NAME));
210 209
211 if (!request_region(COMMAND_PORT, 1, WATCHDOG_NAME)) { 210 if (!request_region(COMMAND_PORT, 1, WATCHDOG_NAME)) {
212 pr_err("I/O address 0x%04x already in use\n", COMMAND_PORT); 211 pr_err("I/O address 0x%04x already in use\n", COMMAND_PORT);