All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 11/14] staging: fsl-mc: add quirk handling for dpseci objects < 4.0
@ 2016-04-11 16:50 Stuart Yoder
  2016-04-20 11:41 ` Horia Ioan Geanta Neag
  0 siblings, 1 reply; 3+ messages in thread
From: Stuart Yoder @ 2016-04-11 16:50 UTC (permalink / raw)
  To: gregkh, german.rivera
  Cc: devel, linux-kernel, agraf, arnd, leoyang.li, Horia Geanta, Stuart Yoder

From: Horia Geanta <horia.geanta@nxp.com>

dpseci objects < 4.0 are not coherent-- in spite of the fact
that the MC reports them to be coherent in certain versions.
Add a special case to set the no shareability flag for dpseci
objects < 4.0.

Signed-off-by: Horia Geanta <horia.geanta@nxp.com>
(Stuart: reworded commit message, updated comment in patch)
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
---
 drivers/staging/fsl-mc/bus/dprc-driver.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 53c6e98..7fc4717 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -312,6 +312,15 @@ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev,
 				continue;
 			}
 
+			/*
+			 * add a quirk for all versions of dpsec < 4.0...none
+			 * are coherent regardless of what the MC reports.
+			 */
+			if ((strcmp(obj_desc->type, "dpseci") == 0) &&
+			    (obj_desc->ver_major < 4))
+				obj_desc->flags |=
+					DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY;
+
 			irq_count += obj_desc->irq_count;
 			dev_dbg(&mc_bus_dev->dev,
 				"Discovered object: type %s, id %d\n",
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 11/14] staging: fsl-mc: add quirk handling for dpseci objects < 4.0
  2016-04-11 16:50 [PATCH 11/14] staging: fsl-mc: add quirk handling for dpseci objects < 4.0 Stuart Yoder
@ 2016-04-20 11:41 ` Horia Ioan Geanta Neag
  2016-04-20 15:28   ` Stuart Yoder
  0 siblings, 1 reply; 3+ messages in thread
From: Horia Ioan Geanta Neag @ 2016-04-20 11:41 UTC (permalink / raw)
  To: Stuart Yoder, Jose Rivera
  Cc: gregkh, devel, linux-kernel, agraf, arnd, Yang-Leo Li

On 4/11/2016 7:50 PM, Stuart Yoder wrote:
> From: Horia Geanta <horia.geanta@nxp.com>
> 
> dpseci objects < 4.0 are not coherent-- in spite of the fact
> that the MC reports them to be coherent in certain versions.
> Add a special case to set the no shareability flag for dpseci
> objects < 4.0.
> 
> Signed-off-by: Horia Geanta <horia.geanta@nxp.com>
> (Stuart: reworded commit message, updated comment in patch)
> Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>

Do we really need this?
First upstream dpsec driver will be for dpsec >= v4.0.

Thanks,
Horia

> ---
>  drivers/staging/fsl-mc/bus/dprc-driver.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
> index 53c6e98..7fc4717 100644
> --- a/drivers/staging/fsl-mc/bus/dprc-driver.c
> +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
> @@ -312,6 +312,15 @@ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev,
>  				continue;
>  			}
>  
> +			/*
> +			 * add a quirk for all versions of dpsec < 4.0...none
> +			 * are coherent regardless of what the MC reports.
> +			 */
> +			if ((strcmp(obj_desc->type, "dpseci") == 0) &&
> +			    (obj_desc->ver_major < 4))
> +				obj_desc->flags |=
> +					DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY;
> +
>  			irq_count += obj_desc->irq_count;
>  			dev_dbg(&mc_bus_dev->dev,
>  				"Discovered object: type %s, id %d\n",
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH 11/14] staging: fsl-mc: add quirk handling for dpseci objects < 4.0
  2016-04-20 11:41 ` Horia Ioan Geanta Neag
@ 2016-04-20 15:28   ` Stuart Yoder
  0 siblings, 0 replies; 3+ messages in thread
From: Stuart Yoder @ 2016-04-20 15:28 UTC (permalink / raw)
  To: Horia Ioan Geanta Neag, Jose Rivera
  Cc: gregkh, devel, linux-kernel, agraf, arnd, Yang-Leo Li



> -----Original Message-----
> From: Horia Ioan Geanta Neag
> Sent: Wednesday, April 20, 2016 6:42 AM
> To: Stuart Yoder <stuart.yoder@nxp.com>; Jose Rivera <german.rivera@nxp.com>
> Cc: gregkh@linuxfoundation.org; devel@driverdev.osuosl.org; linux-kernel@vger.kernel.org;
> agraf@suse.de; arnd@arndb.de; Yang-Leo Li <leoyang.li@nxp.com>
> Subject: Re: [PATCH 11/14] staging: fsl-mc: add quirk handling for dpseci objects < 4.0
> 
> On 4/11/2016 7:50 PM, Stuart Yoder wrote:
> > From: Horia Geanta <horia.geanta@nxp.com>
> >
> > dpseci objects < 4.0 are not coherent-- in spite of the fact
> > that the MC reports them to be coherent in certain versions.
> > Add a special case to set the no shareability flag for dpseci
> > objects < 4.0.
> >
> > Signed-off-by: Horia Geanta <horia.geanta@nxp.com>
> > (Stuart: reworded commit message, updated comment in patch)
> > Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
> 
> Do we really need this?
> First upstream dpsec driver will be for dpsec >= v4.0.

This has nothing to do with the dpsec driver, it's just trying
to be complete with potential MC firmware versions that
might be encountered.  There is supported MC firmware
(and example non-upstream Linux drivers) in customer hands
with dpsec < 4.0, and we are handling that case even if
encountering it is not likely (e.g. what if someone develops
their own driver?).

So let's keep this quirk for now.

Stuart

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-20 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-11 16:50 [PATCH 11/14] staging: fsl-mc: add quirk handling for dpseci objects < 4.0 Stuart Yoder
2016-04-20 11:41 ` Horia Ioan Geanta Neag
2016-04-20 15:28   ` Stuart Yoder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.