lkml.org 
[lkml]   [2010]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectI/O operations order fix for SBC-FITPC2 watchdog
sbc_fitpc2_wdt: fixed I/O operations order

There are fitpc2 compatible boards that hang with existent i/o
operations order. Solution is to switch between writing to data
and command ports.

Signed-off-by: Denis Turischev <denis@compulab.co.il>
---
drivers/watchdog/sbc_fitpc2_wdt.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/sbc_fitpc2_wdt.c b/drivers/watchdog/sbc_fitpc2_wdt.c
index 8d44c9b..226f0f2 100644
--- a/drivers/watchdog/sbc_fitpc2_wdt.c
+++ b/drivers/watchdog/sbc_fitpc2_wdt.c
@@ -45,10 +45,10 @@ static DEFINE_SPINLOCK(wdt_lock);

static void wdt_send_data(unsigned char command, unsigned char data)
{
- outb(command, COMMAND_PORT);
- msleep(100);
outb(data, DATA_PORT);
msleep(200);
+ outb(command, COMMAND_PORT);
+ msleep(100);
}

static void wdt_enable(void)

\
 
 \ /
  Last update: 2010-04-22 18:53    [W:0.744 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site