Thread (3 messages) 3 messages, 3 authors, 2014-06-25

Re: [PATCH v2] fsl-rio: add support for mapping inbound windows

From: Scott Wood <hidden>
Date: 2014-06-25 00:41:35

On Mon, 2014-06-23 at 16:11 +0200, Martijn de Gouw wrote:
From: Martijn de Gouw <redacted>

Add support for mapping and unmapping of inbound rapidio windows.

Signed-off-by: Martijn de Gouw <redacted>
---
 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()?
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help