Re: [PATCH/RFC 1/2] arm64: mm: Silently allow devices lacking IOMMU group

2017-01-25 Thread Magnus Damm
Hi Robin, On Mon, Jan 23, 2017 at 9:34 PM, Robin Murphy wrote: > Hi Magnus, > > On 23/01/17 12:12, Magnus Damm wrote: >> From: Magnus Damm >> >> Consider failure of iommu_get_domain_for_dev() as non-critical and >> get rid of the warning printout. This allows I

Re: [PATCH/RFC 2/2] iommu/ipmmu-vmsa: Opt-in slave devices based on ES version

2017-01-24 Thread Magnus Damm
Hi Geert, On Mon, Jan 23, 2017 at 9:50 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Mon, Jan 23, 2017 at 1:12 PM, Magnus Damm wrote: >> From: Magnus Damm >> >> Match on r8a7795 ES2 and enable a certain DMA controller. >> In other cases the IPMMU driver r

[PATCH/RFC 2/2] iommu/ipmmu-vmsa: Opt-in slave devices based on ES version

2017-01-23 Thread Magnus Damm
From: Magnus Damm Match on r8a7795 ES2 and enable a certain DMA controller. In other cases the IPMMU driver remains disabled. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 24 1 file changed, 24 insertions(+) --- 0001/drivers/iommu/ipmmu-vmsa.c

[PATCH/RFC 1/2] arm64: mm: Silently allow devices lacking IOMMU group

2017-01-23 Thread Magnus Damm
From: Magnus Damm Consider failure of iommu_get_domain_for_dev() as non-critical and get rid of the warning printout. This allows IOMMU properties to be included in the DTB even though the kernel is configured with CONFIG_IOMMU_API=n or in case a particular IOMMU driver refuses to enable IOMMU

[PATCH/RFC 0/2] iommu/ipmmu-vmsa: IPMMU slave device whitelist

2017-01-23 Thread Magnus Damm
erged upstream based on SoC data sheet ahead of time followed by enablement in the IPMMU driver code once the appropriate SoC ES version has been released and the hardware has been tested. Signed-off-by: Magnus Damm --- Developed on top of renesas-drivers-2017-01-10-v4.10-rc3 arch/arm64/m

[PATCH/RFC] iommu/ipmmu-vmsa: Initial R-Car Gen3 VA64 mode support

2017-01-23 Thread Magnus Damm
From: Magnus Damm Here's a prototype that enables IMCTR_VA64 support for the IPMMU driver on R-Car Gen3 platforms. I've tested it lightly on r8a7796 Salvator-X with local second serial port code and SYS-DMAC support via DMA Engine. My goal has been to enable 40 bits or more of IOVA

[PATCH v2 1/3] iommu/ipmmu-vmsa: Add r8a7796 DT binding

2017-01-23 Thread Magnus Damm
From: Magnus Damm Update the IPMMU DT binding documentation to include the r8a7796 compat string for R-Car M3-W. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Acked-by: Rob Herring Acked-by: Simon Horman Acked-by: Geert Uytterhoeven --- Previously posted separately as [PATCH v3

[PATCH v2 3/3] iommu/ipmmu-vmsa: Hook up r8a7796 DT matching code

2017-01-23 Thread Magnus Damm
From: Magnus Damm Support the r8a7796 IPMMU by sharing feature flags between r8a7795 and r8a7796. Also update IOMMU_OF_DECLARE to hook up the updated compat string. Signed-off-by: Magnus Damm --- Changes since V1: - None drivers/iommu/ipmmu-vmsa.c |9 +++-- 1 file changed, 7

[PATCH v2 0/3] iommu/ipmmu-vmsa: r8a7796 support V2

2017-01-23 Thread Magnus Damm
I would like to fast-track merge of patch #1 to fix DT interface. Signed-off-by: Magnus Damm --- Developed on top of renesas-drivers-2017-01-10-v4.10-rc3 with locally reverted "[PATCH 0/3] iommu/ipmmu-vmsa: Initial r8a7796 support" More detailed patch stack dependency is v4.10-r

[PATCH v2 2/3] iommu/ipmmu-vmsa: Increase maximum micro-TLBS to 48

2017-01-23 Thread Magnus Damm
From: Magnus Damm Bump up the maximum numbers of micro-TLBS to 48. Each IPMMU device instance get micro-TLB assignment via the "iommus" property in DT. Older SoCs tend to use a maximum number of 32 micro-TLBs per IPMMU instance however newer SoCs such as r8a7796 make use of up to 48

[PATCH v2 02/02] arm64: dts: r8a7795: Hook up SYS-DMAC to IPMMU

2016-12-18 Thread Magnus Damm
From: Magnus Damm Hook up r8a7795 DMAC nodes to IPMMU-MP1, IPMMU-DS0 and IPMMU-DS1. Signed-off-by: Magnus Damm --- Changes from V1: - None arch/arm64/boot/dts/renesas/r8a7795.dtsi | 40 ++ 1 file changed, 40 insertions(+) --- 0002/arch/arm64/boot/dts/renesas

[PATCH v2 01/02] arm64: dts: r8a7795: Add IPMMU device nodes

2016-12-18 Thread Magnus Damm
From: Magnus Damm Add r8a7795 IPMMU nodes and keep all disabled by default. Signed-off-by: Magnus Damm --- Changes from V1: - None arch/arm64/boot/dts/renesas/r8a7795.dtsi | 113 ++ 1 file changed, 113 insertions(+) --- 0001/arch/arm64/boot/dts/renesas

[PATCH v2 00/02] arm64: dts: r8a7795: IPMMU upstream integration V2

2016-12-18 Thread Magnus Damm
}_resource() Compared to the earlier V1 series the last two patches have been dropped due to lacking software support. I hope these patches now can be queued up for upstream merge, ideally aiming at v4.11-rc. Signed-off-by: Magnus Damm --- Developed on top of renesas-devel-20161212-v4.9 No

Re: [PATCH] ARM: dts: r8a7791: link DU to VSPDs

2016-12-15 Thread Magnus Damm
Hi Sergei, On Thu, Dec 15, 2016 at 7:07 AM, Sergei Shtylyov wrote: > Add the "vsps" property to the DU device node in order to link this node to > the VSPD nodes. > > Signed-off-by: Sergei Shtylyov > > --- > This patch is against the 'renesas-devel-20161212-v4.9' of Simon Horman's > 'renesas.git

Re: [PATCH/RFC 5/5] dmaengine: rcar-dmac: Widen DMA mask to 40 bits

2016-11-25 Thread Magnus Damm
Hi Geert, On Fri, Nov 25, 2016 at 6:00 PM, Geert Uytterhoeven wrote: > On Mon, Oct 31, 2016 at 6:08 PM, Geert Uytterhoeven > wrote: >> By default, the DMA mask covers only the low 32-bit address space, which >> causes SWIOTLB on arm64 to fall back to a bounce buffer for DMA >> transfers involvin

Re: [PATCH 3/4] arm64: dts: renesas: r8a7796: Add DU device to DT

2016-11-25 Thread Magnus Damm
Hi Geert, On Mon, Nov 21, 2016 at 8:09 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Thu, Nov 17, 2016 at 9:51 AM, Magnus Damm wrote: >> On Thu, Nov 17, 2016 at 5:31 PM, Geert Uytterhoeven >> wrote: >>> On Thu, Nov 17, 2016 at 3:28 AM, Magnus Damm wrote: &g

Re: ALSA analog audio loopback test tool (atest)

2016-11-25 Thread Magnus Damm
Hi Ulrich, On Thu, Nov 17, 2016 at 6:27 PM, Ulrich Hecht wrote: > On Thu, Nov 17, 2016 at 6:05 AM, Magnus Damm wrote: >> Thanks for your efforts! Quick question, the dependency on zlib seems >> to come from using adler32() for checksum comparison. In the code you >> seem

[PATCH v3] iommu/ipmmu-vmsa: Add r8a7796 DT binding

2016-11-23 Thread Magnus Damm
From: Magnus Damm Update the IPMMU DT binding documentation to include the r8a7796 compat string for R-Car M3-W. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Acked-by: Rob Herring Acked-by: Simon Horman --- This particular patch seems ready to merge IMO. How to proceed? Changes

Re: [PATCH 3/4] arm64: dts: renesas: r8a7796: Add DU device to DT

2016-11-17 Thread Magnus Damm
Hi Geert, On Thu, Nov 17, 2016 at 5:31 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Thu, Nov 17, 2016 at 3:28 AM, Magnus Damm wrote: >> First of all, we might have slightly different view of the hardware, >> so this might need some further discussions. Also, this t

Re: ALSA analog audio loopback test tool (atest)

2016-11-16 Thread Magnus Damm
Hi Ulrich, On Tue, Nov 15, 2016 at 8:56 PM, Ulrich Hecht wrote: > Hi! > > I have just pushed atest (https://github.com/uli/atest). It's a tool > to automatically verify operation of analog audio hardware remotely > (i.e. without being able to listen to the output) using a loopback > cable between

Re: [PATCH 3/4] arm64: dts: renesas: r8a7796: Add DU device to DT

2016-11-16 Thread Magnus Damm
Hi Laurent, On Wed, Nov 16, 2016 at 4:12 AM, Laurent Pinchart wrote: > Hello Magnus, > > On Thursday 27 Oct 2016 18:40:31 Laurent Pinchart wrote: >> On Thursday 27 Oct 2016 16:25:35 Magnus Damm wrote: >> > On Thu, Oct 27, 2016 at 4:13 PM, Simon Horman wrote: >> &g

Re: [PATCH v4 00/14] ARM: dts: r8a779x: use demuxer for I2C

2016-11-10 Thread Magnus Damm
Hi Wolfram, On Thu, Nov 10, 2016 at 4:57 PM, Wolfram Sang wrote: > >> I think postponing merge of patches is one thing but I don't think >> dropping them forever is a long term solution. I think we should have > > Just to make sure because you wrote 'them': I talked about one patch of > the serie

Re: [PATCH v4 00/14] ARM: dts: r8a779x: use demuxer for I2C

2016-11-09 Thread Magnus Damm
Hi Wolfram, On Thu, Nov 10, 2016 at 2:28 AM, Wolfram Sang wrote: > >> ARM: dts: lager: use demuxer for IIC3/I2C3 > > I think the sanest solution is to drop this patch forever. The WARN from > the regulator core is sparse in describing the problem yet it is > correct: The regulator is needed, by t

Re: [PATCH 0/3] r8a7796 SYS-DMAC integration

2016-10-28 Thread Magnus Damm
Hi Simon, On Fri, Oct 28, 2016 at 10:50 PM, Simon Horman wrote: > On Fri, Oct 28, 2016 at 06:12:37PM +0900, Magnus Damm wrote: >> Hi Ulrich, Simon, everyone, >> >> On Thu, Sep 15, 2016 at 1:45 AM, Ulrich Hecht >> wrote: >> > Hi! >> > >> > Th

Re: [PATCH 0/3] r8a7796 SYS-DMAC integration

2016-10-28 Thread Magnus Damm
Hi Ulrich, Simon, everyone, On Thu, Sep 15, 2016 at 1:45 AM, Ulrich Hecht wrote: > Hi! > > This enables the three DMA controllers. Identical to the setup on r8a7795. > Based on renesas-drivers-2016-09-13-v4.8-rc6. > > CU > Uli > > > Ulrich Hecht (3): > clk: renesas: r8a7796: Add SYS-DMAC clocks

Re: [PATCH 02/04] arm64: dts: r8a7795: Hook up SYS-DMAC to IPMMU

2016-10-27 Thread Magnus Damm
Hi Geert, On Thu, Oct 27, 2016 at 7:42 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Thu, Oct 27, 2016 at 12:29 PM, Magnus Damm wrote: >> From: Magnus Damm >> >> Hook up r8a7795 DMAC nodes to IPMMU-MP1, IPMMU-DS0 and IPMMU-DS1. >> >> Signed-off-by: Ma

[PATCH 02/04] arm64: dts: r8a7795: Hook up SYS-DMAC to IPMMU

2016-10-27 Thread Magnus Damm
From: Magnus Damm Hook up r8a7795 DMAC nodes to IPMMU-MP1, IPMMU-DS0 and IPMMU-DS1. Signed-off-by: Magnus Damm --- This patch can be merged any time, but it is however not recommended to enable IPMMU-MP1, IPMMU-DS0 or IPMMU-DS1 until various dependencies have been resolved: 1) DMA-Engine

[PATCH 03/04] arm64: dts: r8a7795: Point FCP devices to IPMMU

2016-10-27 Thread Magnus Damm
From: Magnus Damm Hook in the FCP devices to allow use of the VSP and DU together with the IPMMU. Signed-off-by: Magnus Damm --- The patch can be merged as is, but it is recommended not to enable IPMMU-VI until the DU driver gets updated in mainline with the following patch series and

[PATCH 00/04] arm64: dts: r8a7795: Initial IPMMU upstream integration

2016-10-27 Thread Magnus Damm
v4.10-rc. Signed-off-by: Magnus Damm --- Developed on top of renesas-devel-20161024-v4.9-rc2 No special run time or compile time dependencies. The first two patches earlier posted as [PATCH/RFC 00/05] arm64: dts: r8a7795: salvator-x: IPMMU test code V2 arch/arm64/boot/dts/renesas/r8a7795

[PATCH 04/04] arm64: dts: r8a7795: Connect Ethernet AVB to IPMMU

2016-10-27 Thread Magnus Damm
From: Magnus Damm Add IPMMU-DS0 to the Ethernet-AVB device node. Signed-off-by: Magnus Damm --- arch/arm64/boot/dts/renesas/r8a7795.dtsi |1 + 1 file changed, 1 insertion(+) --- 0006/arch/arm64/boot/dts/renesas/r8a7795.dtsi +++ work/arch/arm64/boot/dts/renesas/r8a7795.dtsi 2016-10

[PATCH/RFC] v4l: vsp1: Use FCP device for DisplayList and VB2 queue

2016-10-27 Thread Magnus Damm
From: Magnus Damm Incrementally fix up parts of the code not yet covered by the IOMMU patches by Laurent: [PATCH 0/6] R-Car DU: Fix IOMMU operation when connected to VSP This patch simply uses the recently introduced function rcar_fcp_get_device() on the VSP device to retrieve the FCP device

[PATCH/RFC] arm64: dts: r8a7796: Add IPMMU device nodes

2016-10-27 Thread Magnus Damm
From: Magnus Damm Add r8a7796 IPMMU nodes and keep all disabled by default. Signed-off-by: Magnus Damm --- Depends on the following DT binding that has been acked by Laurent but is not yet upstream or queued up in -next: [PATCH v2] iommu/ipmmu-vmsa: Add r8a7796 DT binding arch/arm64

[PATCH 01/04] arm64: dts: r8a7795: Add IPMMU device nodes

2016-10-27 Thread Magnus Damm
From: Magnus Damm Add r8a7795 IPMMU nodes and keep all disabled by default. Signed-off-by: Magnus Damm --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 113 ++ 1 file changed, 113 insertions(+) --- 0001/arch/arm64/boot/dts/renesas/r8a7795.dtsi +++ work/arch/arm64

[PATCH v2] iommu/ipmmu-vmsa: Add r8a7796 DT binding

2016-10-27 Thread Magnus Damm
From: Magnus Damm Update the IPMMU DT binding documentation to include the r8a7796 compat string for R-Car M3-W. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart --- Changes since V1: - Added Acked-by from Laurent - thanks! Now broken out, however earlier V1 posted as part of

Re: [PATCH] ARM: shmobile: select errata 798181 for SoCs with CA15 cores

2016-10-27 Thread Magnus Damm
Hi Geert and Simon, On Thu, Oct 27, 2016 at 4:33 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Thu, Oct 27, 2016 at 9:28 AM, Magnus Damm wrote: >> On Thu, Oct 27, 2016 at 4:00 PM, Simon Horman >> wrote: >>> Select ARM errata 798181 on SoCs cores affected CA1

Re: [PATCH] arm64: defconfig: Enable DRM DU and V4L2 FCP + VSP modules

2016-10-27 Thread Magnus Damm
Hi Simon, On Thu, Oct 27, 2016 at 4:15 PM, Simon Horman wrote: > On Thu, Oct 27, 2016 at 09:08:01AM +0200, Simon Horman wrote: >> On Wed, Oct 26, 2016 at 02:24:22PM +0900, Magnus Damm wrote: >> > From: Magnus Damm >> > >> > Extend the ARM64 defconfig t

Re: [PATCH] ARM: shmobile: select errata 798181 for SoCs with CA15 cores

2016-10-27 Thread Magnus Damm
Hi Simon, On Thu, Oct 27, 2016 at 4:00 PM, Simon Horman wrote: > Select ARM errata 798181 on SoCs cores affected CA15 cores. > > Signed-off-by: Simon Horman > --- > arch/arm/mach-shmobile/Kconfig | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/mach-shmobile/Kconfig b/arc

Re: [PATCH 3/4] arm64: dts: renesas: r8a7796: Add DU device to DT

2016-10-27 Thread Magnus Damm
Hi Simon, On Thu, Oct 27, 2016 at 4:13 PM, Simon Horman wrote: > On Thu, Oct 27, 2016 at 03:52:44PM +0900, Magnus Damm wrote: >> Hi Simon, everyone, >> >> On Thu, Oct 20, 2016 at 5:56 PM, Simon Horman wrote: >> > On Tue, Oct 18, 2016 at 12:19:26PM +0300, Laurent

Re: [PATCH 3/4] arm64: dts: renesas: r8a7796: Add DU device to DT

2016-10-27 Thread Magnus Damm
Hi Geert, On Thu, Oct 27, 2016 at 4:04 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Thu, Oct 27, 2016 at 8:52 AM, Magnus Damm wrote: >> In particular, not so much the DU device (this patch) but more the VSP >> instances. The reason for that is that VSP devices can o

Re: [PATCH 3/4] arm64: dts: renesas: r8a7796: Add DU device to DT

2016-10-26 Thread Magnus Damm
Hi Simon, everyone, On Thu, Oct 20, 2016 at 5:56 PM, Simon Horman wrote: > On Tue, Oct 18, 2016 at 12:19:26PM +0300, Laurent Pinchart wrote: >> Hi Simon, >> >> On Tuesday 18 Oct 2016 11:05:32 Geert Uytterhoeven wrote: >> > On Mon, Oct 17, 2016 at 11:34 PM, Laurent Pinchart wrote: >> > > Add the D

Re: [PATCH] drm: rcar-du: Fix R-Car Gen3 crash when VSP is disabled

2016-10-26 Thread Magnus Damm
Hi Geert, On Wed, Oct 26, 2016 at 4:31 PM, Geert Uytterhoeven wrote: > On Wed, Oct 26, 2016 at 5:31 AM, Magnus Damm wrote: >> From: Magnus Damm >> >> For the DU to operate on R-Car Gen3 hardware a combination of DU >> and VSP devices are required. Since the DU driv

[PATCH] arm64: defconfig: Enable DRM DU and V4L2 FCP + VSP modules

2016-10-25 Thread Magnus Damm
From: Magnus Damm Extend the ARM64 defconfig to enable the DU DRM device as module together with required dependencies of V4L2 FCP and VSP modules. This enables VGA output on the r8a7795 Salvator-X board. Signed-off-by: Magnus Damm --- Written against next-20161026 arch/arm64/configs

[PATCH] drm: rcar-du: Fix R-Car Gen3 crash when VSP is disabled

2016-10-25 Thread Magnus Damm
From: Magnus Damm For the DU to operate on R-Car Gen3 hardware a combination of DU and VSP devices are required. Since the DU driver also supports earlier generations hardware the VSP portion is enabled via Kconfig. The arm64 defconfig is as of v4.9-rc1 having the DU driver enabled as a module

[PATCH v6 07/07] iommu/ipmmu-vmsa: Drop LPAE Kconfig dependency

2016-10-19 Thread Magnus Damm
From: Magnus Damm Neither the ARM page table code enabled by IOMMU_IO_PGTABLE_LPAE nor the IPMMU_VMSA driver actually depends on ARM_LPAE, so get rid of the dependency. Tested with ipmmu-vmsa on r8a7794 ALT and a kernel config using: # CONFIG_ARM_LPAE is not set Signed-off-by: Magnus Damm

[PATCH v6 03/07] iommu/ipmmu-vmsa: Break out utlb parsing code

2016-10-19 Thread Magnus Damm
From: Magnus Damm Break out the utlb parsing code and dev_data allocation into a separate function. This is preparation for future code sharing. Signed-off-by: Magnus Damm Reviewed-by: Joerg Roedel --- Changes since V5: - None Changes since V4: - Dropped hunk with fix to apply on top of

[PATCH v6 05/07] iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

2016-10-19 Thread Magnus Damm
From: Magnus Damm Introduce an alternative set of iommu_ops suitable for 64-bit ARM as well as 32-bit ARM when CONFIG_IOMMU_DMA=y. Also adjust the Kconfig to depend on ARM or IOMMU_DMA. Signed-off-by: Magnus Damm --- Changes since V5: - Made domain allocation/free code more consistent

[PATCH v6 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access

2016-10-19 Thread Magnus Damm
From: Magnus Damm Not all architectures have an iommu member in their archdata, so use #ifdefs support build wit COMPILE_TEST on any architecture. Signed-off-by: Magnus Damm Reviewed-by: Joerg Roedel --- Changes since V5: - None Changes since V4: - None Changes since V3: - New patch

[PATCH v6 04/07] iommu/ipmmu-vmsa: Break out domain allocation code

2016-10-19 Thread Magnus Damm
From: Magnus Damm Break out the domain allocation code into a separate function. This is preparation for future code sharing. Signed-off-by: Magnus Damm Reviewed-by: Joerg Roedel --- Changes since V5: - None Changes since V4: - None Changes since V3: - None Changes since V2

Re: [PATCH v5 05/07] iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

2016-10-19 Thread Magnus Damm
Hi Joerg, On Thu, Sep 22, 2016 at 11:45 PM, Joerg Roedel wrote: > On Tue, Sep 20, 2016 at 10:44:46PM +0900, Magnus Damm wrote: >> +#ifdef CONFIG_IOMMU_DMA >> + >> +static struct iommu_domain *ipmmu_domain_alloc_dma(unsigned type) >> +{ >> + struct iommu_do

[PATCH v6 00/07] iommu/ipmmu-vmsa: IPMMU multi-arch update V6

2016-10-19 Thread Magnus Damm
from initial series - Updated bitmap code locking and also used lighter bitop functions - Updated the Kconfig bits to apply on top of ARCH_RENESAS Signed-off-by: Magnus Damm --- Built on top next-20161019: drivers/iommu/Kconfig |2 drivers/iommu/ipmmu-vmsa.c | 311

[PATCH v6 01/07] iommu/ipmmu-vmsa: Remove platform data handling

2016-10-19 Thread Magnus Damm
From: Magnus Damm The IPMMU driver is using DT these days, and platform data is no longer used by the driver. Remove unused code. Signed-off-by: Magnus Damm Reviewed-by: Laurent Pinchart Reviewed-by: Joerg Roedel --- Changes since V5: - None Changes since V4: - None Changes since V3

[PATCH v6 02/07] iommu/ipmmu-vmsa: Rework interrupt code and use bitmap for context

2016-10-19 Thread Magnus Damm
From: Magnus Damm Introduce a bitmap for context handing and convert the interrupt routine to handle all registered contexts. At this point the number of contexts are still limited. Also remove the use of the ARM specific mapping variable from ipmmu_irq() to allow compile on ARM64. Signed-off

Re: [PATCH] clocksource: sh_cmt: Document r8a779[34] SoC specific bindings

2016-09-30 Thread Magnus Damm
Hi Geert, On Fri, Sep 30, 2016 at 4:20 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Fri, Sep 30, 2016 at 9:07 AM, Magnus Damm wrote: >> On Fri, Sep 23, 2016 at 6:03 PM, Simon Horman wrote: >>> On Fri, Sep 23, 2016 at 10:35:06AM +0200, Geert Uytterhoeven wrote: &g

Re: [PATCH/RFT 0/4] ARM: shmobile: R-Car Gen2: Allow booting secondary CPU cores in debug mode

2016-09-30 Thread Magnus Damm
Hi Geert, On Fri, Sep 30, 2016 at 4:09 PM, Geert Uytterhoeven wrote: > Hi Magnus, > > On Fri, Sep 30, 2016 at 9:04 AM, Magnus Damm wrote: >> On Tue, Sep 27, 2016 at 9:37 PM, Geert Uytterhoeven >> wrote: >>> On Mon, Aug 22, 2016 at 4:44 PM, Geert Uytterhoeven >

Re: [PATCH] clocksource: sh_cmt: Document r8a779[34] SoC specific bindings

2016-09-30 Thread Magnus Damm
On Fri, Sep 23, 2016 at 6:03 PM, Simon Horman wrote: > On Fri, Sep 23, 2016 at 10:35:06AM +0200, Geert Uytterhoeven wrote: >> Hi Simon, Magnus, >> >> On Fri, Sep 23, 2016 at 10:20 AM, Simon Horman >> wrote: >> > This documents the SoC specific binding for the r8a779[34] SoCs. >> > This is in keep

Re: [PATCH/RFT 0/4] ARM: shmobile: R-Car Gen2: Allow booting secondary CPU cores in debug mode

2016-09-30 Thread Magnus Damm
Hi Geert, On Tue, Sep 27, 2016 at 9:37 PM, Geert Uytterhoeven wrote: > Hi Simon, Magnus, > > On Mon, Aug 22, 2016 at 4:44 PM, Geert Uytterhoeven > wrote: >> This patch series is an attempt to allow booting secondary CPU cores on >> R-Car Gen2 when hardware debug mode is enabled. In this mode, re

Re: [PATCH/RFC] iommu/ipmmu-vmsa: IPMMU SYS-DMAC iova mapping workaround

2016-09-26 Thread Magnus Damm
Hi Niklas, On Tue, Sep 27, 2016 at 3:20 PM, Niklas Söderlund wrote: > Hi Magnus, > > On 2016-09-20 20:54:33 +0900, Magnus Damm wrote: >> From: Magnus Damm >> >> Here's some prototype code that works around the lack of software >> support for mapping I/O de

Re: [PATCH/RFC] iommu/ipmmu-vmsa: Update ->add_device() return value

2016-09-20 Thread Magnus Damm
Hi Robin, Thanks for your feedback!! On Tue, Sep 20, 2016 at 10:18 PM, Robin Murphy wrote: > Hi Magnus, > > On 20/09/16 13:41, Magnus Damm wrote: >> From: Magnus Damm >> >> Update the IPMMU driver to return -ENODEV when adding devices >> not hook

[PATCH v5 01/07] iommu/ipmmu-vmsa: Remove platform data handling

2016-09-20 Thread Magnus Damm
From: Magnus Damm The IPMMU driver is using DT these days, and platform data is no longer used by the driver. Remove unused code. Signed-off-by: Magnus Damm Reviewed-by: Laurent Pinchart --- Changes since V4: - None Changes since V3: - None Changes since V2: - None Changes since V1

[PATCH v5 04/07] iommu/ipmmu-vmsa: Break out domain allocation code

2016-09-20 Thread Magnus Damm
From: Magnus Damm Break out the domain allocation code into a separate function. This is preparation for future code sharing. Signed-off-by: Magnus Damm --- Changes since V4: - None Changes since V3: - None Changes since V2: - Included this new patch as-is from the following series

[PATCH v5 03/07] iommu/ipmmu-vmsa: Break out utlb parsing code

2016-09-20 Thread Magnus Damm
From: Magnus Damm Break out the utlb parsing code and dev_data allocation into a separate function. This is preparation for future code sharing. Signed-off-by: Magnus Damm --- Changes since V4: - Dropped hunk with fix to apply on top of: b1e2afc iommu/ipmmu-vmsa: Fix wrong error handle

[PATCH v5 02/07] iommu/ipmmu-vmsa: Rework interrupt code and use bitmap for context

2016-09-20 Thread Magnus Damm
From: Magnus Damm Introduce a bitmap for context handing and convert the interrupt routine to handle all registered contexts. At this point the number of contexts are still limited. Also remove the use of the ARM specific mapping variable from ipmmu_irq() to allow compile on ARM64. Signed-off

[PATCH v5 00/07] iommu/ipmmu-vmsa: IPMMU multi-arch update V5

2016-09-20 Thread Magnus Damm
reworked to include patch 3 of the V1 of this series Changes since V1: - Got rid of patch 2 and 3 from initial series - Updated bitmap code locking and also used lighter bitop functions - Updated the Kconfig bits to apply on top of ARCH_RENESAS Signed-off-by: Magnus Damm --- Built on top

[PATCH v5 07/07] iommu/ipmmu-vmsa: Drop LPAE Kconfig dependency

2016-09-20 Thread Magnus Damm
From: Magnus Damm Neither the ARM page table code enabled by IOMMU_IO_PGTABLE_LPAE nor the IPMMU_VMSA driver actually depends on ARM_LPAE, so get rid of the dependency. Tested with ipmmu-vmsa on r8a7794 ALT and a kernel config using: # CONFIG_ARM_LPAE is not set Signed-off-by: Magnus Damm

[PATCH v5 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access

2016-09-20 Thread Magnus Damm
From: Magnus Damm Not all architectures have an iommu member in their archdata, so use #ifdefs support build wit COMPILE_TEST on any architecture. Signed-off-by: Magnus Damm --- Changes since V4: - None Changes since V3: - New patch drivers/iommu/ipmmu-vmsa.c | 37

[PATCH v5 05/07] iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

2016-09-20 Thread Magnus Damm
From: Magnus Damm Introduce an alternative set of iommu_ops suitable for 64-bit ARM as well as 32-bit ARM when CONFIG_IOMMU_DMA=y. Also adjust the Kconfig to depend on ARM or IOMMU_DMA. Signed-off-by: Magnus Damm --- Changes since V4: - Added Kconfig hunk to depend on ARM or IOMMU_DMA

[PATCH/RFC] iommu/ipmmu-vmsa: Update ->add_device() return value

2016-09-20 Thread Magnus Damm
From: Magnus Damm Update the IPMMU driver to return -ENODEV when adding devices not hooked up a particular IPMMU instance. Currently the ->add_device() callback implementation in the IPMMU driver returns -ENODEV for devices with no "iommus" property, however the function ipmmu_fin

[PATCH/RFC] ARM: dts: r8a7790: IPMMU-DS SYS-DMAC prototype

2016-09-20 Thread Magnus Damm
From: Magnus Damm Hook up the SYS-DMAC devices to IPMMU-DS on r8a7790 and enable that particular IPMMU instance. Depending on kernel version LPAE may need to be enabled before the IPMMU driver becomes available. Useful to test the IPMMU with the devices hooked up to the SYS-DMAC via the DMA

[PATCH/RFC] ARM: dts: r8a7790: IPMMU-MX DU prototype

2016-09-20 Thread Magnus Damm
From: Magnus Damm These two hunks of code enable the r8a7790 IPMMU-MX instance together with the DU device on r8a7790. Depending on kernel version LPAE may need to be enabled before the IPMMU driver becomes available. Useful to test the IPMMU with the DU via the VGA port on r8a7790 Lager

[PATCH/RFC] iommu/ipmmu-vmsa: IPMMU SYS-DMAC iova mapping workaround

2016-09-20 Thread Magnus Damm
From: Magnus Damm Here's some prototype code that works around the lack of software support for mapping I/O devices to the SYS-DMAC hardware via the DMA Engine framework when using IOMMU. The code itself is one big layering violation that goes through the DT and unconditionally maps I/O de

Re: [PATCH 0/6] R-Car DU: Fix IOMMU operation when connected to VSP

2016-09-07 Thread Magnus Damm
Hi Laurent, Thanks for your help with this. Good to see that the DU driver is getting closer to work with the IPMMU hardware! Please see below for some feedback from me. On Fri, Aug 19, 2016 at 5:39 PM, Laurent Pinchart wrote: > Hello, > > This patch series fixes the rcar-du-drm driver to suppor

Re: [PATCH 2/2] mmc: host: sh_mobile_sdhi: don't populate unneeded functions

2016-09-01 Thread Magnus Damm
On Wed, Aug 24, 2016 at 6:34 PM, Wolfram Sang wrote: > Populating card_busy caused a side-effect on a chip variant we don't > have documentation for (r8a73a4). So, enable it and voltage switching > only on devices known to support those features. > > Signed-off-by: Wolfram Sang > --- > drivers/m

Re: [PATCH/PROTO 0/9] R-Car H3 MSIOF Parent Clock Control Prototype

2016-08-24 Thread Magnus Damm
Hi Geert, On Sat, Aug 13, 2016 at 1:38 AM, Geert Uytterhoeven wrote: > Hi all, > > On R-Car H3, the various MSIOF instances (used for SPI) have a common > parent clock. This mso clock is a programmable "DIV6" clock (divider > 1 - 64). Its rate lies in the range 12.5 to 800 MHz, or 6.25 to

Re: [PATCH/RTF 7/7] arm64: dts: r8a7796: salvator-x: enable SDHI0 & 3

2016-08-24 Thread Magnus Damm
Hi Geert, On Thu, Aug 18, 2016 at 12:52 AM, Geert Uytterhoeven wrote: > On Wed, Aug 17, 2016 at 1:31 PM, Simon Horman > wrote: >> Enable the exposed SD card slots in the DT of the r8a7796/salvator-x. >> >> Based on work for the r8a7795/salvator-x by Ai Kyuse. >> >> Cc: Ai Kyuse >> Signed-off-by

Re: renesas-drivers-2016-08-23-v4.8-rc3

2016-08-24 Thread Magnus Damm
Hi Morimoto-san, everyone, On Wed, Aug 24, 2016 at 9:58 AM, Kuninori Morimoto wrote: > > Hi Geert, Simon, Wolfram > >> I have pushed renesas-drivers-2016-08-23-v4.8-rc3 to >> https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git >> >> This tree is meant to ease development of pla

Re: [PATCH 3/3] iommu/ipmmu-vmsa: Hook up r8a7796 DT matching code

2016-06-08 Thread Magnus Damm
Hi Laurent, On Wed, Jun 8, 2016 at 5:48 PM, Laurent Pinchart wrote: > Hi Geert, > > On Wednesday 08 Jun 2016 09:04:17 Geert Uytterhoeven wrote: >> On Wed, Jun 8, 2016 at 2:18 AM, Laurent Pinchart wrote: >> >> --- 0031/drivers/iommu/ipmmu-vmsa.c >> >> +++ work/drivers/iommu/ipmmu-vmsa.c 2016-06-

Re: [PATCH 3/3] iommu/ipmmu-vmsa: Hook up r8a7796 DT matching code

2016-06-08 Thread Magnus Damm
Hi Geert, On Wed, Jun 8, 2016 at 4:04 PM, Geert Uytterhoeven wrote: > Hi Laurent, > > On Wed, Jun 8, 2016 at 2:18 AM, Laurent Pinchart > wrote: >>> --- 0031/drivers/iommu/ipmmu-vmsa.c >>> +++ work/drivers/iommu/ipmmu-vmsa.c 2016-06-06 11:19:40.210607110 +0900 >>> @@ -1074,7 +1074,7 @@ static c

Re: [PATCH 3/3] iommu/ipmmu-vmsa: Hook up r8a7796 DT matching code

2016-06-08 Thread Magnus Damm
Hi Laurent, On Wed, Jun 8, 2016 at 9:18 AM, Laurent Pinchart wrote: > Hi Magnus, > > Thank you for the patch. > > On Tuesday 07 Jun 2016 12:39:45 Magnus Damm wrote: >> From: Magnus Damm >> >> Support the r8a7796 IPMMU by sharing feature flags between &g

[PATCH v4 02/07] iommu/ipmmu-vmsa: Rework interrupt code and use bitmap for context

2016-06-08 Thread Magnus Damm
From: Magnus Damm Introduce a bitmap for context handing and convert the interrupt routine to handle all registered contexts. At this point the number of contexts are still limited. Also remove the use of the ARM specific mapping variable from ipmmu_irq() to allow compile on ARM64. Signed-off

[PATCH v4 01/07] iommu/ipmmu-vmsa: Remove platform data handling

2016-06-08 Thread Magnus Damm
From: Magnus Damm The IPMMU driver is using DT these days, and platform data is no longer used by the driver. Remove unused code. Signed-off-by: Magnus Damm Reviewed-by: Laurent Pinchart --- Changes since V3: - None Changes since V2: - None Changes since V1: - Added Reviewed-by from

[PATCH v4 00/07] iommu/ipmmu-vmsa: IPMMU multi-arch update V4

2016-06-08 Thread Magnus Damm
to include patch 3 of the V1 of this series Changes since V1: - Got rid of patch 2 and 3 from initial series - Updated bitmap code locking and also used lighter bitop functions - Updated the Kconfig bits to apply on top of ARCH_RENESAS Signed-off-by: Magnus Damm --- drivers/iommu/Kconfig

[PATCH v4 03/07] iommu/ipmmu-vmsa: Break out utlb parsing code

2016-06-08 Thread Magnus Damm
From: Magnus Damm Break out the utlb parsing code and dev_data allocation into a separate function. This is preparation for future code sharing. Signed-off-by: Magnus Damm --- Changes since V3: - Initialize "mmu" to NULL, check before accessing - Removed group para

[PATCH v4 05/07] iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

2016-06-08 Thread Magnus Damm
From: Magnus Damm Introduce an alternative set of iommu_ops suitable for 64-bit ARM as well as 32-bit ARM when CONFIG_IOMMU_DMA=y. Signed-off-by: Magnus Damm --- Changes since V3: - Removed group parameter from ipmmu_init_platform_device() Changes since V2: - Included this new patch from

[PATCH v4 07/07] iommu/ipmmu-vmsa: Drop LPAE Kconfig dependency

2016-06-08 Thread Magnus Damm
From: Magnus Damm Neither the ARM page table code enabled by IOMMU_IO_PGTABLE_LPAE nor the IPMMU_VMSA driver actually depends on ARM_LPAE, so get rid of the dependency. Tested with ipmmu-vmsa on r8a7794 ALT and a kernel config using: # CONFIG_ARM_LPAE is not set Signed-off-by: Magnus Damm

[PATCH v4 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access

2016-06-08 Thread Magnus Damm
From: Magnus Damm Not all architectures have an iommu member in their archdata, so use #ifdefs support build wit COMPILE_TEST on any architecture. Signed-off-by: Magnus Damm --- Changes since V3: - New patch drivers/iommu/ipmmu-vmsa.c | 37 +++-- 1 file

[PATCH v4 04/07] iommu/ipmmu-vmsa: Break out domain allocation code

2016-06-08 Thread Magnus Damm
From: Magnus Damm Break out the domain allocation code into a separate function. This is preparation for future code sharing. Signed-off-by: Magnus Damm --- Changes since V3: - None Changes since V2: - Included this new patch as-is from the following series: [PATCH 00/04] iommu/ipmmu

[PATCH 3/3] iommu/ipmmu-vmsa: Hook up r8a7796 DT matching code

2016-06-06 Thread Magnus Damm
From: Magnus Damm Support the r8a7796 IPMMU by sharing feature flags between r8a7795 and r8a7796. Also update IOMMU_OF_DECLARE to hook up the updated compat string. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions

[PATCH 2/3] iommu/ipmmu-vmsa: Increase maximum micro-TLBS to 48

2016-06-06 Thread Magnus Damm
From: Magnus Damm Bump up the maximum numbers of micro-TLBS to 48. Each IPMMU device instance get micro-TLB assignment via the "iommus" property in DT. Older SoCs tend to use a maximum number of 32 micro-TLBd per IPMMU instance however newer SoCs such as r8a7796 make use of up to 48

[PATCH 1/3] iommu/ipmmu-vmsa: Add r8a7796 DT binding

2016-06-06 Thread Magnus Damm
From: Magnus Damm Update the IPMMU DT binding documentation to include the r8a7796 compat string for R-Car M3-W. Signed-off-by: Magnus Damm --- Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt |1 + 1 file changed, 1 insertion(+) --- 0001/Documentation/devicetree/bindings

[PATCH 0/3] iommu/ipmmu-vmsa: Initial r8a7796 support

2016-06-06 Thread Magnus Damm
) Micro-TLB assignment DT binding extension and change number 3 above are part of this patch series. Other changes will be part of DT integration code that will be submitted separately. Signed-off-by: Magnus Damm --- Developed on top of next-20160602 and: [PATCH v3 00/06] iommu/ipmmu-vmsa

[PATCH v2 10/11] iommu/ipmmu-vmsa: Allow two bit SL0

2016-06-05 Thread Magnus Damm
From: Magnus Damm Introduce support for two bit SL0 bitfield in IMTTBCR by using a separate feature flag. Signed-off-by: Magnus Damm --- Changes since V1: - None drivers/iommu/ipmmu-vmsa.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) --- 0025/drivers/iommu

[PATCH v2 08/11] iommu/ipmmu-vmsa: Write IMCTR twice

2016-06-05 Thread Magnus Damm
From: Magnus Damm Write IMCTR both in the root device and the leaf node. Signed-off-by: Magnus Damm --- Changes since V1: - None drivers/iommu/ipmmu-vmsa.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) --- 0021/drivers/iommu/ipmmu-vmsa.c +++ work/drivers

[PATCH v2 02/11] iommu/ipmmu-vmsa: Add optional root device feature

2016-06-05 Thread Magnus Damm
From: Magnus Damm Add root device handling to the IPMMU driver by allowing certain DT compat strings to enable has_cache_leaf_nodes that in turn will support both root devices with interrupts and leaf devices that face the actual IPMMU consumer devices. Signed-off-by: Magnus Damm --- Changes

[PATCH v2 07/11] iommu/ipmmu-vmsa: IPMMU device is 64-bit bus master

2016-06-05 Thread Magnus Damm
From: Magnus Damm The r8a7795 IPMMU supports 64-bit bus mastering. Both the coherent DMA mask and the streaming DMA mask are set to unlock the 64-bit address space for coherent allocations and streaming operations. Signed-off-by: Magnus Damm --- Changes since V1: - Updated the commit

[PATCH v2 05/11] iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE()

2016-06-05 Thread Magnus Damm
From: Magnus Damm Hook up IOMMU_OF_DECLARE() support in case CONFIG_IOMMU_DMA is enabled. The only current supported case for 32-bit ARM is disabled, however for 64-bit ARM this is required. Signed-off-by: Magnus Damm --- Changes since V1: - Reworked slightly to fit updated patch order and

[PATCH v2 04/11] iommu/ipmmu-vmsa: Reuse iommu groups

2016-06-05 Thread Magnus Damm
From: Magnus Damm Extend the IPMMU driver to group devices together based on the IPMMU device they are connected to. The slave devices are kept on a list which is used to determine if existing groups (and contexts) exist. With this patch the two SYS-DMAC devices using IPMMU-DS0 on r8a7795 will

[PATCH v2 09/11] iommu/ipmmu-vmsa: Make IMBUSCTR setup optional

2016-06-05 Thread Magnus Damm
From: Magnus Damm Introduce a feature to allow opt-out of setting up IMBUSCR. The default case is unchanged. Signed-off-by: Magnus Damm --- Changes since V1: - Updated the commit message - Reworked patch to coexist with the multi context feature drivers/iommu/ipmmu-vmsa.c | 10

[PATCH v2 11/11] iommu/ipmmu-vmsa: Hook up r8a7795 DT matching code

2016-06-05 Thread Magnus Damm
From: Magnus Damm Tie in r8a7795 features and update the IOMMU_OF_DECLARE compat string to hook up the updated compat string. TODO: - Go over init order once more - Consider counting number of IPMMU devices from ->xlate() - Experiment with delaying call to bus_set_iommu() Signed-off

[PATCH v2 06/11] iommu/ipmmu-vmsa: Teach xlate() to skip disabled iommus

2016-06-05 Thread Magnus Damm
From: Magnus Damm The ->xlate() call gets invoked even though the iommu device has status = "disabled" in DT, so make sure we skip over disabled devices. In my mind it would make sense to have this at some shared level, but I guess some users may want to configure the iommu reg

[PATCH v2 03/11] iommu/ipmmu-vmsa: Enable multi context support

2016-06-05 Thread Magnus Damm
From: Magnus Damm Add support for up to 8 contexts. Each context is mapped to one domain. One domain is associated with each device, however one or more uTLBs for a single device are kept in the same domain. Signed-off-by: Magnus Damm --- Changes since V1: - Support up to 8 contexts instead

<    1   2   3   4   5   >