mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suman Anna <s-anna@ti.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: <iommu@lists.linux-foundation.org>,
	Tony Lindgren <tony@atomide.com>, Tero Kristo <t-kristo@ti.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	<linux-omap@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Suman Anna <s-anna@ti.com>
Subject: [PATCH 0/2] Dual MMU support for TI DRA7xx DSPs
Date: Thu, 31 Aug 2017 08:14:00 -0500	[thread overview]
Message-ID: <20170831131402.29502-1-s-anna@ti.com> (raw)

Hi Joerg,

The following two patches enhance the OMAP IOMMU driver to support
mirror-programming of two MMUs present within the DSP subsystems 
specifically on TI DRA7xx/AM57xx family of SOCs. The TI OMAP DSP
subsystems traditionally always has a DSP core and an internal EDMA
block behind a single MMU within the subsystem, but DRA7xx DSP SoCs
now separate these out and the blocks are behind an individual MMU
and a dedicated port to connect to the interconnect. The DT usage
for these will be of the form,
	
	dsp1: dsp@40800000 {
		...
		iommus = <&mmu0_dsp1>, <&mmu1_dsp1>;
		...
	};

The series is based on your current 4.13 based arm/omap branch. The
patches add the support in the driver, but the MMU devices themselves
are still not created. There are two separate series (Add hwmod data
for IPU & DSP processors/MMUs [1] and Enable DRA7 processor MMU DT
nodes [2]) that add these patches, and will go through Tony and the
linux-omap tree. The consumer nodes/client drivers are still in-progress
and will depend on this series being merged first. Series is tested
along-side these two additional series and adding the other consumer
patches, no change in behavior with just these patches.

regards
Suman

[1] https://marc.info/?l=linux-omap&m=150335933714097&w=2
[2] https://marc.info/?l=linux-omap&m=150335958414166&w=2

Following is an output of sysfs with these MMUs exercised
with additional patches:

root@dra7xx-evm:~# ls -l /sys/kernel/iommu_groups/
drwxr-xr-x    3 root     root             0 Aug  8 03:59 0
drwxr-xr-x    3 root     root             0 Aug  8 03:59 1
drwxr-xr-x    3 root     root             0 Aug  8 03:59 2
drwxr-xr-x    3 root     root             0 Aug  8 03:59 3
drwxr-xr-x    3 root     root             0 Aug  8 03:59 4
drwxr-xr-x    3 root     root             0 Aug  8 03:59 5
root@dra7xx-evm:~# ls -l /sys/kernel/iommu_groups/*/devices
/sys/kernel/iommu_groups/0/devices:
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 40800000.dsp -> ../../../../devices/platform/44000000.ocp/40800000.dsp

/sys/kernel/iommu_groups/1/devices:

/sys/kernel/iommu_groups/2/devices:
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 58820000.ipu -> ../../../../devices/platform/44000000.ocp/58820000.ipu

/sys/kernel/iommu_groups/3/devices:
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 55020000.ipu -> ../../../../devices/platform/44000000.ocp/55020000.ipu

/sys/kernel/iommu_groups/4/devices:
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 41000000.dsp -> ../../../../devices/platform/44000000.ocp/41000000.dsp

/sys/kernel/iommu_groups/5/devices:
root@dra7xx-evm:~# ls -l /sys/kernel/iommu_groups/*/devices/*/
/sys/kernel/iommu_groups/0/devices/40800000.dsp/:
lrwxrwxrwx    1 root     root             0 Aug  8 15:59 driver -> ../../../../bus/platform/drivers/omap-rproc
-rw-r--r--    1 root     root          4096 Aug  8 03:59 driver_override
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 iommu -> ../40d01000.mmu/iommu/40d01000.mmu
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 iommu_group -> ../../../../kernel/iommu_groups/0
-r--r--r--    1 root     root          4096 Aug  8 03:59 modalias
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 of_node -> ../../../../firmware/devicetree/base/ocp/dsp@40800000
drwxr-xr-x    2 root     root             0 Aug  8 03:59 power
drwxr-xr-x    3 root     root             0 Aug  8 04:03 remoteproc
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 subsystem -> ../../../../bus/platform
-rw-r--r--    1 root     root          4096 Aug  8 03:59 uevent

/sys/kernel/iommu_groups/2/devices/58820000.ipu/:
lrwxrwxrwx    1 root     root             0 Aug  8 15:59 driver -> ../../../../bus/platform/drivers/omap-rproc
-rw-r--r--    1 root     root          4096 Aug  8 03:59 driver_override
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 iommu -> ../58882000.mmu/iommu/58882000.mmu
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 iommu_group -> ../../../../kernel/iommu_groups/2
-r--r--r--    1 root     root          4096 Aug  8 03:59 modalias
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 of_node -> ../../../../firmware/devicetree/base/ocp/ipu@58820000
drwxr-xr-x    2 root     root             0 Aug  8 03:59 power
drwxr-xr-x    3 root     root             0 Aug  8 04:03 remoteproc
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 subsystem -> ../../../../bus/platform
-rw-r--r--    1 root     root          4096 Aug  8 03:59 uevent

/sys/kernel/iommu_groups/3/devices/55020000.ipu/:
lrwxrwxrwx    1 root     root             0 Aug  8 15:59 driver -> ../../../../bus/platform/drivers/omap-rproc
-rw-r--r--    1 root     root          4096 Aug  8 03:59 driver_override
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 iommu -> ../55082000.mmu/iommu/55082000.mmu
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 iommu_group -> ../../../../kernel/iommu_groups/3
-r--r--r--    1 root     root          4096 Aug  8 03:59 modalias
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 of_node -> ../../../../firmware/devicetree/base/ocp/ipu@55020000
drwxr-xr-x    2 root     root             0 Aug  8 03:59 power
drwxr-xr-x    3 root     root             0 Aug  8 04:03 remoteproc
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 subsystem -> ../../../../bus/platform
-rw-r--r--    1 root     root          4096 Aug  8 03:59 uevent

/sys/kernel/iommu_groups/4/devices/41000000.dsp/:
lrwxrwxrwx    1 root     root             0 Aug  8 15:59 driver -> ../../../../bus/platform/drivers/omap-rproc
-rw-r--r--    1 root     root          4096 Aug  8 03:59 driver_override
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 iommu -> ../41501000.mmu/iommu/41501000.mmu
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 iommu_group -> ../../../../kernel/iommu_groups/4
-r--r--r--    1 root     root          4096 Aug  8 03:59 modalias
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 of_node -> ../../../../firmware/devicetree/base/ocp/dsp@41000000
drwxr-xr-x    2 root     root             0 Aug  8 03:59 power
drwxr-xr-x    3 root     root             0 Aug  8 04:03 remoteproc
lrwxrwxrwx    1 root     root             0 Aug  8 03:59 subsystem -> ../../../../bus/platform
-rw-r--r--    1 root     root          4096 Aug  8 03:59 uevent

Suman Anna (2):
  iommu/omap: Change the attach detection logic
  iommu/omap: Add support to program multiple iommus

 drivers/iommu/omap-iommu.c | 324 ++++++++++++++++++++++++++++++++++-----------
 drivers/iommu/omap-iommu.h |  30 ++---
 2 files changed, 259 insertions(+), 95 deletions(-)

-- 
2.13.1

             reply	other threads:[~2017-08-31 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 13:14 Suman Anna [this message]
2017-08-31 13:14 ` [PATCH 1/2] iommu/omap: Change the attach detection logic Suman Anna
2017-08-31 13:14 ` [PATCH 2/2] iommu/omap: Add support to program multiple iommus Suman Anna
2017-09-01 10:01   ` Joerg Roedel
2017-09-01 16:21     ` Suman Anna
2017-09-01 16:33       ` Joerg Roedel
2017-09-01 17:05         ` Suman Anna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170831131402.29502-1-s-anna@ti.com \
    --to=s-anna@ti.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®