Commit e21093ef authored by Ira W. Snyder's avatar Ira W. Snyder Committed by Marc Kleine-Budde

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: default avatarIra W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent c0d680e5
...@@ -1391,7 +1391,6 @@ static irqreturn_t ican3_irq(int irq, void *dev_id) ...@@ -1391,7 +1391,6 @@ static irqreturn_t ican3_irq(int irq, void *dev_id)
*/ */
static int ican3_reset_module(struct ican3_dev *mod) static int ican3_reset_module(struct ican3_dev *mod)
{ {
u8 val = 1 << mod->num;
unsigned long start; unsigned long start;
u8 runold, runnew; u8 runold, runnew;
...@@ -1405,8 +1404,7 @@ static int ican3_reset_module(struct ican3_dev *mod) ...@@ -1405,8 +1404,7 @@ static int ican3_reset_module(struct ican3_dev *mod)
runold = ioread8(mod->dpm + TARGET_RUNNING); runold = ioread8(mod->dpm + TARGET_RUNNING);
/* reset the module */ /* reset the module */
iowrite8(val, &mod->ctrl->reset_assert); iowrite8(0x00, &mod->dpmctrl->hwreset);
iowrite8(val, &mod->ctrl->reset_deassert);
/* wait until the module has finished resetting and is running */ /* wait until the module has finished resetting and is running */
start = jiffies; start = jiffies;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment