Re: [PATCH 2/2] can: janz-ican3: fix support for older hardware revisions

2012-09-13 Thread Marc Kleine-Budde
On 09/12/2012 12:58 AM, Ira W. Snyder wrote:
> From: "Ira W. Snyder" 
> 
> 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.
> 
> Signed-off-by: Ira W. Snyder 

Applied to linux-can.

Tnx,
Marc
> ---
>  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 98ee438..7edadee 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)
>   */
>  static int ican3_reset_module(struct ican3_dev *mod)
>  {
> - u8 val = 1 << mod->num;
>   unsigned long start;
>   u8 runold, runnew;
>  
> @@ -1405,8 +1404,7 @@ static int ican3_reset_module(struct ican3_dev *mod)
>   runold = ioread8(mod->dpm + TARGET_RUNNING);
>  
>   /* reset the module */
> - iowrite8(val, >ctrl->reset_assert);
> - iowrite8(val, >ctrl->reset_deassert);
> + iowrite8(0x00, >dpmctrl->hwreset);
>  
>   /* wait until the module has finished resetting and is running */
>   start = jiffies;
> 


-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature


Re: [PATCH 2/2] can: janz-ican3: fix support for older hardware revisions

2012-09-13 Thread Marc Kleine-Budde
On 09/12/2012 12:58 AM, Ira W. Snyder wrote:
 From: Ira W. Snyder i...@ovro.caltech.edu
 
 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.
 
 Signed-off-by: Ira W. Snyder i...@ovro.caltech.edu

Applied to linux-can.

Tnx,
Marc
 ---
  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 98ee438..7edadee 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)
   */
  static int ican3_reset_module(struct ican3_dev *mod)
  {
 - u8 val = 1  mod-num;
   unsigned long start;
   u8 runold, runnew;
  
 @@ -1405,8 +1404,7 @@ static int ican3_reset_module(struct ican3_dev *mod)
   runold = ioread8(mod-dpm + TARGET_RUNNING);
  
   /* reset the module */
 - iowrite8(val, mod-ctrl-reset_assert);
 - iowrite8(val, mod-ctrl-reset_deassert);
 + iowrite8(0x00, mod-dpmctrl-hwreset);
  
   /* wait until the module has finished resetting and is running */
   start = jiffies;
 


-- 
Pengutronix e.K.  | Marc Kleine-Budde   |
Industrial Linux Solutions| Phone: +49-231-2826-924 |
Vertretung West/Dortmund  | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



signature.asc
Description: OpenPGP digital signature


[PATCH 2/2] can: janz-ican3: fix support for older hardware revisions

2012-09-11 Thread Ira W. Snyder
From: "Ira W. Snyder" 

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.

Signed-off-by: Ira W. Snyder 
---
 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 98ee438..7edadee 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)
  */
 static int ican3_reset_module(struct ican3_dev *mod)
 {
-   u8 val = 1 << mod->num;
unsigned long start;
u8 runold, runnew;
 
@@ -1405,8 +1404,7 @@ static int ican3_reset_module(struct ican3_dev *mod)
runold = ioread8(mod->dpm + TARGET_RUNNING);
 
/* reset the module */
-   iowrite8(val, >ctrl->reset_assert);
-   iowrite8(val, >ctrl->reset_deassert);
+   iowrite8(0x00, >dpmctrl->hwreset);
 
/* wait until the module has finished resetting and is running */
start = jiffies;
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] can: janz-ican3: fix support for older hardware revisions

2012-09-11 Thread Ira W. Snyder
From: Ira W. Snyder i...@ovro.caltech.edu

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.

Signed-off-by: Ira W. Snyder i...@ovro.caltech.edu
---
 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 98ee438..7edadee 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)
  */
 static int ican3_reset_module(struct ican3_dev *mod)
 {
-   u8 val = 1  mod-num;
unsigned long start;
u8 runold, runnew;
 
@@ -1405,8 +1404,7 @@ static int ican3_reset_module(struct ican3_dev *mod)
runold = ioread8(mod-dpm + TARGET_RUNNING);
 
/* reset the module */
-   iowrite8(val, mod-ctrl-reset_assert);
-   iowrite8(val, mod-ctrl-reset_deassert);
+   iowrite8(0x00, mod-dpmctrl-hwreset);
 
/* wait until the module has finished resetting and is running */
start = jiffies;
-- 
1.7.8.6

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/