From: Suman Anna <s-anna-l0cyMroinI0@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCHv3 03/13] iommu/omap: allow enable/disable even without pdata
Date: Fri, 28 Feb 2014 14:42:34 -0600 [thread overview]
Message-ID: <1393620164-14633-4-git-send-email-s-anna@ti.com> (raw)
In-Reply-To: <1393620164-14633-1-git-send-email-s-anna-l0cyMroinI0@public.gmane.org>
From: Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>
When booting with a devicetree, no platform data is provided.
Do not prematurely exit iommu_enable() and iommu_disable() in
such a case.
Note: As OMAP do not yet has a proper reset controller driver,
IOMMUs requiring a reset signal should use pdata-quirks as a
transitional solution.
Signed-off-by: Florian Vaussard <florian.vaussard-p8DiymsW2f8@public.gmane.org>
Signed-off-by: Suman Anna <s-anna-l0cyMroinI0@public.gmane.org>
Acked-by: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
---
drivers/iommu/omap-iommu.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 647e4ba..217952b 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -146,13 +146,10 @@ static int iommu_enable(struct omap_iommu *obj)
struct platform_device *pdev = to_platform_device(obj->dev);
struct iommu_platform_data *pdata = pdev->dev.platform_data;
- if (!pdata)
- return -EINVAL;
-
if (!arch_iommu)
return -ENODEV;
- if (pdata->deassert_reset) {
+ if (pdata && pdata->deassert_reset) {
err = pdata->deassert_reset(pdev, pdata->reset_name);
if (err) {
dev_err(obj->dev, "deassert_reset failed: %d\n", err);
@@ -172,14 +169,11 @@ static void iommu_disable(struct omap_iommu *obj)
struct platform_device *pdev = to_platform_device(obj->dev);
struct iommu_platform_data *pdata = pdev->dev.platform_data;
- if (!pdata)
- return;
-
arch_iommu->disable(obj);
pm_runtime_put_sync(obj->dev);
- if (pdata->assert_reset)
+ if (pdata && pdata->assert_reset)
pdata->assert_reset(pdev, pdata->reset_name);
}
--
1.9.0
next prev parent reply other threads:[~2014-02-28 20:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 20:42 [PATCHv3 00/13] OMAP IOMMU DT adaptation for 3.15 Suman Anna
2014-02-28 20:42 ` [PATCHv3 05/13] iommu/omap: add devicetree support Suman Anna
2014-02-28 20:42 ` [PATCHv3 09/13] ARM: OMAP3: fix iva mmu programming issues Suman Anna
[not found] ` <1393620164-14633-1-git-send-email-s-anna-l0cyMroinI0@public.gmane.org>
2014-02-28 20:42 ` [PATCHv3 01/13] iommu/omap: convert to devm_* interfaces Suman Anna
2014-02-28 20:42 ` [PATCHv3 02/13] iommu/omap: fix error return paths in omap_iommu_attach() Suman Anna
2014-02-28 20:42 ` Suman Anna [this message]
2014-02-28 20:42 ` [PATCHv3 04/13] Documentation: dt: add OMAP iommu bindings Suman Anna
2014-02-28 20:42 ` [PATCHv3 06/13] iommu/omap: enable bus-error back on supported iommus Suman Anna
2014-02-28 20:42 ` [PATCHv3 07/13] iommu/omap: allocate archdata on the fly for DT-based devices Suman Anna
2014-02-28 20:42 ` [PATCHv3 08/13] ARM: OMAP3: remove deprecated CONFIG_OMAP_IOMMU_IVA2 Suman Anna
2014-02-28 20:42 ` [PATCHv3 10/13] ARM: OMAP2+: change the ISP device archdata MMU name for DT Suman Anna
2014-02-28 20:42 ` [PATCHv3 12/13] ARM: OMAP5: hwmod data: add mmu data for ipu & dsp Suman Anna
2014-02-28 20:42 ` [PATCHv3 13/13] ARM: OMAP2+: extend iommu pdata-quirks to OMAP5 Suman Anna
2014-02-28 23:00 ` [PATCHv3 00/13] OMAP IOMMU DT adaptation for 3.15 Tony Lindgren
2014-03-03 5:35 ` Suman Anna
[not found] ` <20140228230000.GW13624-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2014-03-04 16:04 ` Joerg Roedel
2014-03-04 16:52 ` Suman Anna
[not found] ` <20140304160432.GG2799-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-03-04 16:59 ` Suman Anna
[not found] ` <5316068F.3020003-l0cyMroinI0@public.gmane.org>
2014-03-05 19:33 ` Tony Lindgren
2014-03-05 20:07 ` Suman Anna
2014-02-28 20:42 ` [PATCHv3 11/13] ARM: OMAP2+: use pdata quirks for iommu reset lines 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=1393620164-14633-4-git-send-email-s-anna@ti.com \
--to=s-anna-l0cymroini0@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=florian.vaussard-p8DiymsW2f8@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).