Re: [PATCH v2 07/11] soc/fsl/qbman: Rework ioremap() calls for ARM/PPC

From: Scott Wood
Date: Sun Apr 23 2017 - 21:48:00 EST


On Wed, 2017-04-19 at 16:48 -0400, Roy Pledge wrote:
> Rework ioremap() for PPC and ARM. The PPC devices require a
> non-coherent mapping while ARM will work with a non-cachable/write
> combine mapping.
>
> Signed-off-by: Roy Pledge <roy.pledge@xxxxxxx>
> ---
> Âdrivers/soc/fsl/qbman/bman_portal.c | 16 +++++++++++++---
> Âdrivers/soc/fsl/qbman/qman_portal.c | 16 +++++++++++++---
> Â2 files changed, 26 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/soc/fsl/qbman/bman_portal.c
> b/drivers/soc/fsl/qbman/bman_portal.c
> index 8354d4d..a661f30 100644
> --- a/drivers/soc/fsl/qbman/bman_portal.c
> +++ b/drivers/soc/fsl/qbman/bman_portal.c
> @@ -125,7 +125,18 @@ static int bman_portal_probe(struct platform_device
> *pdev)
> Â }
> Â pcfg->irq = irq;
> Â
> - va = ioremap_prot(addr_phys[0]->start, resource_size(addr_phys[0]),
> 0);
> +#ifdef CONFIG_PPC
> + /* PPC requires a cacheable/non-coherent mapping of the portal */
> + va = ioremap_prot(addr_phys[0]->start, resource_size(addr_phys[0]),
> + ÂÂ(pgprot_val(PAGE_KERNEL) & ~_PAGE_COHERENT));
> +#else
> + /*
> + Â* For ARM we can use write combine mapping.ÂÂA cacheable/non
> shareable
> + Â* mapping will perform better but equires additional platform
> + Â* support which is not currently available
> + Â*/

s/equires/requires/

Would be nice to describe the platform support that is required.

-Scott