* [PATCH 0/2] janz: fix support for Janz CMOD-IO revision 1.0 hardware
@ 2012-09-11 22:58 Ira W. Snyder
2012-09-11 22:58 ` [PATCH 1/2] mfd/janz-cmodio: fix MODULBus number sysfs entry Ira W. Snyder
2012-09-11 22:58 ` [PATCH 2/2] can: janz-ican3: fix support for older hardware revisions Ira W. Snyder
0 siblings, 2 replies; 7+ messages in thread
From: Ira W. Snyder @ 2012-09-11 22:58 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-can, sameo, Ira W. Snyder
From: "Ira W. Snyder" <iws@ovro.caltech.edu>
The Janz CMOD-IO Carrier Board hardware, revision 1.0 has several quirks
that do not effect newer revisions of the hardware. This series fixes both
quirks so that the old hardware works correctly.
The janz-cmodio MFD driver did not mask out the unused bits from the
modulbus_number sysfs file. On CMOD-IO revision 1.0, the upper bits have
random data. By masking out the bits, the correct number is presented to
userspace.
The janz-ican3 driver used the reset_assert and reset_deassert registers.
These registers do not exist on CMOD-IO revision 1.0. To work around the
problem, the hardware reset registers on the ican3 hardware itself are
used.
These are trivial fixes that fix support for some hardware which is currently
broken. It would be nice to get these into the current kernel release.
Ira W. Snyder (2):
mfd/janz-cmodio: fix MODULBus number sysfs entry
can: janz-ican3: fix support for older hardware revisions
drivers/mfd/janz-cmodio.c | 2 +-
drivers/net/can/janz-ican3.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
--
1.7.8.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] mfd/janz-cmodio: fix MODULBus number sysfs entry
2012-09-11 22:58 [PATCH 0/2] janz: fix support for Janz CMOD-IO revision 1.0 hardware Ira W. Snyder
@ 2012-09-11 22:58 ` Ira W. Snyder
2012-09-13 11:56 ` Marc Kleine-Budde
2012-09-11 22:58 ` [PATCH 2/2] can: janz-ican3: fix support for older hardware revisions Ira W. Snyder
1 sibling, 1 reply; 7+ messages in thread
From: Ira W. Snyder @ 2012-09-11 22:58 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-can, sameo, Ira W. Snyder
From: "Ira W. Snyder" <iws@ovro.caltech.edu>
Revision 1.0 of the Janz CMOD-IO Carrier Board does not contain zeroes
in the top 4 bits of the modulbus_num (int_enable) register. Mask off
the unused bits so that the correct value is displayed in sysfs.
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
---
drivers/mfd/janz-cmodio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c
index 2ea9998..32d0efd 100644
--- a/drivers/mfd/janz-cmodio.c
+++ b/drivers/mfd/janz-cmodio.c
@@ -216,7 +216,7 @@ static int __devinit cmodio_pci_probe(struct pci_dev *dev,
}
/* Read the hex switch on the carrier board */
- priv->hex = ioread8(&priv->ctrl->int_enable);
+ priv->hex = ioread8(&priv->ctrl->int_enable) & 0x0f;
/* Add the MODULbus number (hex switch value) to the device's sysfs */
ret = sysfs_create_group(&dev->dev.kobj, &cmodio_sysfs_attr_group);
--
1.7.8.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] can: janz-ican3: fix support for older hardware revisions
2012-09-11 22:58 [PATCH 0/2] janz: fix support for Janz CMOD-IO revision 1.0 hardware Ira W. Snyder
2012-09-11 22:58 ` [PATCH 1/2] mfd/janz-cmodio: fix MODULBus number sysfs entry Ira W. Snyder
@ 2012-09-11 22:58 ` Ira W. Snyder
2012-09-13 11:57 ` Marc Kleine-Budde
1 sibling, 1 reply; 7+ messages in thread
From: Ira W. Snyder @ 2012-09-11 22:58 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-can, sameo, Ira W. Snyder
From: "Ira W. Snyder" <iws@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 <iws@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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] mfd/janz-cmodio: fix MODULBus number sysfs entry
2012-09-11 22:58 ` [PATCH 1/2] mfd/janz-cmodio: fix MODULBus number sysfs entry Ira W. Snyder
@ 2012-09-13 11:56 ` Marc Kleine-Budde
2012-09-13 12:52 ` Samuel Ortiz
0 siblings, 1 reply; 7+ messages in thread
From: Marc Kleine-Budde @ 2012-09-13 11:56 UTC (permalink / raw)
To: Ira W. Snyder; +Cc: linux-kernel, linux-can, sameo
[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]
On 09/12/2012 12:58 AM, Ira W. Snyder wrote:
> From: "Ira W. Snyder" <iws@ovro.caltech.edu>
>
> Revision 1.0 of the Janz CMOD-IO Carrier Board does not contain zeroes
> in the top 4 bits of the modulbus_num (int_enable) register. Mask off
> the unused bits so that the correct value is displayed in sysfs.
>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Who will take care of this patch?
Marc
> ---
> drivers/mfd/janz-cmodio.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/janz-cmodio.c b/drivers/mfd/janz-cmodio.c
> index 2ea9998..32d0efd 100644
> --- a/drivers/mfd/janz-cmodio.c
> +++ b/drivers/mfd/janz-cmodio.c
> @@ -216,7 +216,7 @@ static int __devinit cmodio_pci_probe(struct pci_dev *dev,
> }
>
> /* Read the hex switch on the carrier board */
> - priv->hex = ioread8(&priv->ctrl->int_enable);
> + priv->hex = ioread8(&priv->ctrl->int_enable) & 0x0f;
>
> /* Add the MODULbus number (hex switch value) to the device's sysfs */
> ret = sysfs_create_group(&dev->dev.kobj, &cmodio_sysfs_attr_group);
>
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] can: janz-ican3: fix support for older hardware revisions
2012-09-11 22:58 ` [PATCH 2/2] can: janz-ican3: fix support for older hardware revisions Ira W. Snyder
@ 2012-09-13 11:57 ` Marc Kleine-Budde
0 siblings, 0 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2012-09-13 11:57 UTC (permalink / raw)
To: Ira W. Snyder; +Cc: linux-kernel, linux-can, sameo
[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]
On 09/12/2012 12:58 AM, Ira W. Snyder wrote:
> From: "Ira W. Snyder" <iws@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 <iws@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-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] mfd/janz-cmodio: fix MODULBus number sysfs entry
2012-09-13 11:56 ` Marc Kleine-Budde
@ 2012-09-13 12:52 ` Samuel Ortiz
2012-09-13 12:57 ` Marc Kleine-Budde
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Ortiz @ 2012-09-13 12:52 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: Ira W. Snyder, linux-kernel, linux-can
On Thu, Sep 13, 2012 at 01:56:32PM +0200, Marc Kleine-Budde wrote:
> On 09/12/2012 12:58 AM, Ira W. Snyder wrote:
> > From: "Ira W. Snyder" <iws@ovro.caltech.edu>
> >
> > Revision 1.0 of the Janz CMOD-IO Carrier Board does not contain zeroes
> > in the top 4 bits of the modulbus_num (int_enable) register. Mask off
> > the unused bits so that the correct value is displayed in sysfs.
> >
> > Cc: Samuel Ortiz <sameo@linux.intel.com>
> > Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
>
> Who will take care of this patch?
I will.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] mfd/janz-cmodio: fix MODULBus number sysfs entry
2012-09-13 12:52 ` Samuel Ortiz
@ 2012-09-13 12:57 ` Marc Kleine-Budde
0 siblings, 0 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2012-09-13 12:57 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: Ira W. Snyder, linux-kernel, linux-can
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
On 09/13/2012 02:52 PM, Samuel Ortiz wrote:
> On Thu, Sep 13, 2012 at 01:56:32PM +0200, Marc Kleine-Budde wrote:
>> On 09/12/2012 12:58 AM, Ira W. Snyder wrote:
>>> From: "Ira W. Snyder" <iws@ovro.caltech.edu>
>>>
>>> Revision 1.0 of the Janz CMOD-IO Carrier Board does not contain zeroes
>>> in the top 4 bits of the modulbus_num (int_enable) register. Mask off
>>> the unused bits so that the correct value is displayed in sysfs.
>>>
>>> Cc: Samuel Ortiz <sameo@linux.intel.com>
>>> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
>>
>> Who will take care of this patch?
> I will.
Tnx.
I'm taking the other one.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-13 12:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 22:58 [PATCH 0/2] janz: fix support for Janz CMOD-IO revision 1.0 hardware Ira W. Snyder
2012-09-11 22:58 ` [PATCH 1/2] mfd/janz-cmodio: fix MODULBus number sysfs entry Ira W. Snyder
2012-09-13 11:56 ` Marc Kleine-Budde
2012-09-13 12:52 ` Samuel Ortiz
2012-09-13 12:57 ` Marc Kleine-Budde
2012-09-11 22:58 ` [PATCH 2/2] can: janz-ican3: fix support for older hardware revisions Ira W. Snyder
2012-09-13 11:57 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).