diff options
author | Ira W. Snyder <iws@ovro.caltech.edu> | 2012-09-11 18:58:15 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-09-21 06:54:52 -0400 |
commit | e21093ef6fb4cbecdf926102286dbe280ae965db (patch) | |
tree | a26a8e0d97c2c5839902c2fa691d4d456a3d254d /drivers | |
parent | c0d680e577ff171e7b37dbdb1b1bf5451e851f04 (diff) |
can: janz-ican3: fix support for older hardware revisions
The Revision 1.0 Janz CMOD-IO Carrier Board does not have support for
the reset registers. To support older hardware, the code is changed to
use the hardware reset register on the Janz VMOD-ICAN3 hardware itself.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/janz-ican3.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c index 98ee43819911..7edadee487ba 100644 --- a/drivers/net/can/janz-ican3.c +++ b/drivers/net/can/janz-ican3.c | |||
@@ -1391,7 +1391,6 @@ static irqreturn_t ican3_irq(int irq, void *dev_id) | |||
1391 | */ | 1391 | */ |
1392 | static int ican3_reset_module(struct ican3_dev *mod) | 1392 | static int ican3_reset_module(struct ican3_dev *mod) |
1393 | { | 1393 | { |
1394 | u8 val = 1 << mod->num; | ||
1395 | unsigned long start; | 1394 | unsigned long start; |
1396 | u8 runold, runnew; | 1395 | u8 runold, runnew; |
1397 | 1396 | ||
@@ -1405,8 +1404,7 @@ static int ican3_reset_module(struct ican3_dev *mod) | |||
1405 | runold = ioread8(mod->dpm + TARGET_RUNNING); | 1404 | runold = ioread8(mod->dpm + TARGET_RUNNING); |
1406 | 1405 | ||
1407 | /* reset the module */ | 1406 | /* reset the module */ |
1408 | iowrite8(val, &mod->ctrl->reset_assert); | 1407 | iowrite8(0x00, &mod->dpmctrl->hwreset); |
1409 | iowrite8(val, &mod->ctrl->reset_deassert); | ||
1410 | 1408 | ||
1411 | /* wait until the module has finished resetting and is running */ | 1409 | /* wait until the module has finished resetting and is running */ |
1412 | start = jiffies; | 1410 | start = jiffies; |