[PATCH v2] fsl-rio: add support for mapping inbound windows
Scott Wood
scottwood at freescale.com
Wed Jun 25 10:40:57 EST 2014
On Mon, 2014-06-23 at 16:11 +0200, Martijn de Gouw wrote:
> From: Martijn de Gouw <martijn.de.gouw at prodrive.nl>
>
> Add support for mapping and unmapping of inbound rapidio windows.
>
> Signed-off-by: Martijn de Gouw <martijn.de.gouw at prodrive-technologies.com>
> ---
> arch/powerpc/sysdev/fsl_rio.c | 92 +++++++++++++++++++++++++++++++++++++++++
> arch/powerpc/sysdev/fsl_rio.h | 12 ++++++
> 2 files changed, 104 insertions(+)
Could you describe a bit more why this is needed?
Liu Gang, can you review this?
> +int fsl_map_inb_mem(struct rio_mport *mport, dma_addr_t lstart,
> + u64 rstart, u32 size, u32 flags)
> +{
> + struct rio_priv *priv = mport->priv;
> + u32 base_size;
> + unsigned int base_size_log;
> + u64 win_start, win_end;
> + u32 riwar;
> + int i;
> +
> + base_size_log = __ilog2(size) + ((size & (size - 1)) != 0);
Why __ilog2() and not ilog2()?
> @@ -598,6 +687,8 @@ int fsl_rio_setup(struct platform_device *dev)
> RIO_ATMU_REGS_PORT2_OFFSET));
>
> priv->maint_atmu_regs = priv->atmu_regs + 1;
> + priv->inb_atmu_regs = (struct rio_inb_atmu_regs *)
> + (priv->regs_win + RIO_INB_ATMU_REGS_OFFSET);
__iomem
-Scott
More information about the Linuxppc-dev
mailing list