Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* [PATCH/RFC 00/02] ARM: shmobile: r8a7795 Salvator-X IPMMU 4 GiB RAM test code
@ 2016-01-18  5:48 Magnus Damm
  2016-01-18  5:48 ` [PATCH/RFC 01/02] iommu/ipmmu-vmsa: Use 64-bit masks Magnus Damm
  2016-01-18  5:48 ` [PATCH/RFC 02/02] arm64: dts: Salvator-X: Enable 4 GiB of RAM Magnus Damm
  0 siblings, 2 replies; 4+ messages in thread
From: Magnus Damm @ 2016-01-18  5:48 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: horms+renesas, Magnus Damm, laurent.pinchart+renesas,
	geert+renesas

ARM: shmobile: r8a7795 Salvator-X IPMMU 4 GiB RAM test code

[PATCH/RFC 01/02] iommu/ipmmu-vmsa: Use 64-bit masks
[PATCH/RFC 02/02] arm64: dts: Salvator-X: Enable 4 GiB of RAM

This code simply enables 4 GiB of RAM on Salvator-X after
adjusting the IPMMU driver to tell the Linux driver model
that the device it is managing is able to do 64-bit bus
mastering.

Not for upstream merge. Patch 1/2 will be rolled into a larger
series for the IPMMU driver in the future. Patch 2/2 depends
on firmware updates, so the integration needs to be correctly
ordered to keep things smooth.

Not-Yet-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 Developed on top of renesas-drivers-2016-01-13-v4.4.

 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts |   15 +++++++++++++++
 drivers/iommu/ipmmu-vmsa.c                         |    2 ++
 2 files changed, 17 insertions(+)

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

* [PATCH/RFC 01/02] iommu/ipmmu-vmsa: Use 64-bit masks
  2016-01-18  5:48 [PATCH/RFC 00/02] ARM: shmobile: r8a7795 Salvator-X IPMMU 4 GiB RAM test code Magnus Damm
@ 2016-01-18  5:48 ` Magnus Damm
  2016-01-18  5:48 ` [PATCH/RFC 02/02] arm64: dts: Salvator-X: Enable 4 GiB of RAM Magnus Damm
  1 sibling, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2016-01-18  5:48 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: horms+renesas, Magnus Damm, laurent.pinchart+renesas,
	geert+renesas

From: Magnus Damm <damm+renesas@opensource.se>

The IPMMU hardware is able to use page tables from anywhere
in the memory, so set masks to 64-bits. Required to be able
to use the IPMMU driver with 4 GiB of memory. Without this
patch with 4 GiB enabled the following error message is spit
out on the console during boot:

ipmmu-vmsa e67b0000.mmu: Cannot accommodate DMA translation
                         for IOMMU page tables

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 drivers/iommu/ipmmu-vmsa.c |    2 ++
 1 file changed, 2 insertions(+)

--- 0001/drivers/iommu/ipmmu-vmsa.c
+++ work/drivers/iommu/ipmmu-vmsa.c	2016-01-18 14:22:22.730513000 +0900
@@ -1043,6 +1043,8 @@ static int ipmmu_probe(struct platform_d
 		return -ENOMEM;
 	}
 
+	dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+	
 	mmu->dev = &pdev->dev;
 	mmu->num_utlbs = 32;
 	bitmap_zero(mmu->ctx, IPMMU_CTX_MAX);

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

* [PATCH/RFC 02/02] arm64: dts: Salvator-X: Enable 4 GiB of RAM
  2016-01-18  5:48 [PATCH/RFC 00/02] ARM: shmobile: r8a7795 Salvator-X IPMMU 4 GiB RAM test code Magnus Damm
  2016-01-18  5:48 ` [PATCH/RFC 01/02] iommu/ipmmu-vmsa: Use 64-bit masks Magnus Damm
@ 2016-01-18  5:48 ` Magnus Damm
  2017-02-17  8:56   ` Geert Uytterhoeven
  1 sibling, 1 reply; 4+ messages in thread
From: Magnus Damm @ 2016-01-18  5:48 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: horms+renesas, Magnus Damm, laurent.pinchart+renesas,
	geert+renesas

From: Magnus Damm <damm+renesas@opensource.se>

Enable all the on-board memory for the r8a7795 Salvator-X board.

Not for upstream merge. Needs to be ordered with firmware update
to avoid overly complex dependencies.

Not-Yet-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

--- 0002/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ work/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts	2016-01-08 14:49:50.440513000 +0900
@@ -57,6 +57,21 @@
 		reg = <0x0 0x48000000 0x0 0x38000000>;
 	};
 
+	memory@500000000 {
+		device_type = "memory";
+		reg = <5 0x00000000 0 0x40000000>;
+	};
+
+	memory@600000000 {
+		device_type = "memory";
+		reg = <6 0x00000000 0 0x40000000>;
+	};
+
+	memory@700000000 {
+		device_type = "memory";
+		reg = <7 0x00000000 0 0x40000000>;
+	};
+
 	x12_clk: x12_clk {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;

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

* Re: [PATCH/RFC 02/02] arm64: dts: Salvator-X: Enable 4 GiB of RAM
  2016-01-18  5:48 ` [PATCH/RFC 02/02] arm64: dts: Salvator-X: Enable 4 GiB of RAM Magnus Damm
@ 2017-02-17  8:56   ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2017-02-17  8:56 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Linux-Renesas, Simon Horman, Laurent Pinchart, Geert Uytterhoeven

Hi Magnus,

On Mon, Jan 18, 2016 at 6:48 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Enable all the on-board memory for the r8a7795 Salvator-X board.
>
> Not for upstream merge. Needs to be ordered with firmware update
> to avoid overly complex dependencies.
>
> Not-Yet-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Any chance we can get a real SoB?
Not-so-recent firmware already enables the memory in U-Boot anyway.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2017-02-17  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18  5:48 [PATCH/RFC 00/02] ARM: shmobile: r8a7795 Salvator-X IPMMU 4 GiB RAM test code Magnus Damm
2016-01-18  5:48 ` [PATCH/RFC 01/02] iommu/ipmmu-vmsa: Use 64-bit masks Magnus Damm
2016-01-18  5:48 ` [PATCH/RFC 02/02] arm64: dts: Salvator-X: Enable 4 GiB of RAM Magnus Damm
2017-02-17  8:56   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox