* [PATCH 0/3] SH-Mobile IPMMU miscellaneous cleanups
@ 2014-04-02 23:49 Laurent Pinchart
2014-04-02 23:49 ` [PATCH 1/3] iommu/shmobile: Depend on ARCH_SHMOBILE Laurent Pinchart
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-04-02 23:49 UTC (permalink / raw)
To: iommu; +Cc: linux-sh
Hello,
These three patches are small cleanups for the SH-Mobile IPMMU driver. Nothing
special here, please see individual patches for details.
I plan to send a pull request in a couple of days.
Laurent Pinchart (2):
iommu/shmobile: Don't ignore the ipmmu_iommu_init() return value
iommu/shmobile: Use devm_ioremap_resource()
Paul Bolle (1):
iommu/shmobile: Depend on ARCH_SHMOBILE
drivers/iommu/Kconfig | 2 +-
drivers/iommu/shmobile-ipmmu.c | 20 +++++++-------------
2 files changed, 8 insertions(+), 14 deletions(-)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] iommu/shmobile: Depend on ARCH_SHMOBILE
2014-04-02 23:49 [PATCH 0/3] SH-Mobile IPMMU miscellaneous cleanups Laurent Pinchart
@ 2014-04-02 23:49 ` Laurent Pinchart
2014-04-02 23:49 ` [PATCH 2/3] iommu/shmobile: Don't ignore the ipmmu_iommu_init() return value Laurent Pinchart
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-04-02 23:49 UTC (permalink / raw)
To: iommu; +Cc: linux-sh, Paul Bolle
From: Paul Bolle <pebolle@tiscali.nl>
Commit 78a2e12f51d9 ("iommu: shmobile: Enable driver compilation with
COMPILE_TEST") added an optional dependency on SH_MOBILE. But that
Kconfig symbol doesn't exist. It seems ARCH_SHMOBILE was intended. Use
that.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/iommu/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 79bbc21..df56e4c 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -207,7 +207,7 @@ config SHMOBILE_IOMMU
bool "IOMMU for Renesas IPMMU/IPMMUI"
default n
depends on ARM
- depends on SH_MOBILE || COMPILE_TEST
+ depends on ARCH_SHMOBILE || COMPILE_TEST
select IOMMU_API
select ARM_DMA_USE_IOMMU
select SHMOBILE_IPMMU
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] iommu/shmobile: Don't ignore the ipmmu_iommu_init() return value
2014-04-02 23:49 [PATCH 0/3] SH-Mobile IPMMU miscellaneous cleanups Laurent Pinchart
2014-04-02 23:49 ` [PATCH 1/3] iommu/shmobile: Depend on ARCH_SHMOBILE Laurent Pinchart
@ 2014-04-02 23:49 ` Laurent Pinchart
2014-04-02 23:49 ` [PATCH 3/3] iommu/shmobile: Use devm_ioremap_resource() Laurent Pinchart
[not found] ` <1396482562-1851-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
3 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-04-02 23:49 UTC (permalink / raw)
To: iommu; +Cc: linux-sh
The function can fail, don't ignore its error value.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/iommu/shmobile-ipmmu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/shmobile-ipmmu.c b/drivers/iommu/shmobile-ipmmu.c
index e3bc2e1..6ba6110 100644
--- a/drivers/iommu/shmobile-ipmmu.c
+++ b/drivers/iommu/shmobile-ipmmu.c
@@ -117,8 +117,7 @@ static int ipmmu_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ipmmu);
ipmmu_reg_write(ipmmu, IMCTR1, 0x0); /* disable TLB */
ipmmu_reg_write(ipmmu, IMCTR2, 0x0); /* disable PMB */
- ipmmu_iommu_init(ipmmu);
- return 0;
+ return ipmmu_iommu_init(ipmmu);
}
static struct platform_driver ipmmu_driver = {
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] iommu/shmobile: Use devm_ioremap_resource()
2014-04-02 23:49 [PATCH 0/3] SH-Mobile IPMMU miscellaneous cleanups Laurent Pinchart
2014-04-02 23:49 ` [PATCH 1/3] iommu/shmobile: Depend on ARCH_SHMOBILE Laurent Pinchart
2014-04-02 23:49 ` [PATCH 2/3] iommu/shmobile: Don't ignore the ipmmu_iommu_init() return value Laurent Pinchart
@ 2014-04-02 23:49 ` Laurent Pinchart
[not found] ` <1396482562-1851-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
3 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-04-02 23:49 UTC (permalink / raw)
To: iommu; +Cc: linux-sh
Replace the devm_ioremap_nocache() call with devm_ioremap_resource().
This simplifies error checking.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/iommu/shmobile-ipmmu.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/iommu/shmobile-ipmmu.c b/drivers/iommu/shmobile-ipmmu.c
index 6ba6110..bd97ade 100644
--- a/drivers/iommu/shmobile-ipmmu.c
+++ b/drivers/iommu/shmobile-ipmmu.c
@@ -94,11 +94,6 @@ static int ipmmu_probe(struct platform_device *pdev)
struct resource *res;
struct shmobile_ipmmu_platform_data *pdata = pdev->dev.platform_data;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "cannot get platform resources\n");
- return -ENOENT;
- }
ipmmu = devm_kzalloc(&pdev->dev, sizeof(*ipmmu), GFP_KERNEL);
if (!ipmmu) {
dev_err(&pdev->dev, "cannot allocate device data\n");
@@ -106,12 +101,12 @@ static int ipmmu_probe(struct platform_device *pdev)
}
spin_lock_init(&ipmmu->flush_lock);
ipmmu->dev = &pdev->dev;
- ipmmu->ipmmu_base = devm_ioremap_nocache(&pdev->dev, res->start,
- resource_size(res));
- if (!ipmmu->ipmmu_base) {
- dev_err(&pdev->dev, "ioremap_nocache failed\n");
- return -ENOMEM;
- }
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ ipmmu->ipmmu_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(ipmmu->ipmmu_base))
+ return PTR_ERR(ipmmu->ipmmu_base);
+
ipmmu->dev_names = pdata->dev_names;
ipmmu->num_dev_names = pdata->num_dev_names;
platform_set_drvdata(pdev, ipmmu);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [GIT PULL FOR v3.16] SH-Mobile IPMMU miscellaneous cleanups
[not found] ` <1396482562-1851-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
@ 2014-04-17 10:18 ` Laurent Pinchart
2014-05-12 18:55 ` Joerg Roedel
0 siblings, 1 reply; 7+ messages in thread
From: Laurent Pinchart @ 2014-04-17 10:18 UTC (permalink / raw)
To: Joerg Roedel
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-sh-u79uwXL29TY76Z2rM5mHXA
Hi Joerg,
The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:
Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
are available in the git repository at:
git://linuxtv.org/pinchartl/fbdev.git iommu/for-v3.16
for you to fetch changes up to b11762f8431b3a5cf1c156876e79efab7d7f80c4:
iommu/shmobile: Use devm_ioremap_resource() (2014-04-17 12:16:12 +0200)
The patches have been sitting on the linux-sh and iommu mailing lists for more
than two weeks, I think they should be ripe now.
----------------------------------------------------------------
Laurent Pinchart (2):
iommu/shmobile: Don't ignore the ipmmu_iommu_init() return value
iommu/shmobile: Use devm_ioremap_resource()
drivers/iommu/shmobile-ipmmu.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL FOR v3.16] SH-Mobile IPMMU miscellaneous cleanups
2014-04-17 10:18 ` [GIT PULL FOR v3.16] SH-Mobile IPMMU miscellaneous cleanups Laurent Pinchart
@ 2014-05-12 18:55 ` Joerg Roedel
[not found] ` <20140512185554.GY12376-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Joerg Roedel @ 2014-05-12 18:55 UTC (permalink / raw)
To: Laurent Pinchart
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
linux-sh-u79uwXL29TY76Z2rM5mHXA
On Thu, Apr 17, 2014 at 12:18:21PM +0200, Laurent Pinchart wrote:
>
> git://linuxtv.org/pinchartl/fbdev.git iommu/for-v3.16
>
Pulled, thanks Laurent, despite I missed a MAINTAINERS patch ;-)
What happened to the original author of this driver?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL FOR v3.16] SH-Mobile IPMMU miscellaneous cleanups
[not found] ` <20140512185554.GY12376-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
@ 2014-05-12 19:46 ` Laurent Pinchart
0 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-05-12 19:46 UTC (permalink / raw)
To: Joerg Roedel
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
magnus.damm-Re5JQEeQqe8AvxtiuMwx3w,
linux-sh-u79uwXL29TY76Z2rM5mHXA
Hi Joerg,
On Monday 12 May 2014 20:55:54 Joerg Roedel wrote:
> On Thu, Apr 17, 2014 at 12:18:21PM +0200, Laurent Pinchart wrote:
> > git://linuxtv.org/pinchartl/fbdev.git iommu/for-v3.16
>
> Pulled, thanks Laurent,
Thank you. Now, what about the "iommu: Add driver for Renesas VMSA-compatible
IPMMU" patch ? :-)
> despite I missed a MAINTAINERS patch ;-)
Since when are developers required to become maintainers when submitting the
odd cleanup patch ? :-)
> What happened to the original author of this driver?
I'm afraid I don't know. Magnus (CC'ed) might have more information.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-12 19:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 23:49 [PATCH 0/3] SH-Mobile IPMMU miscellaneous cleanups Laurent Pinchart
2014-04-02 23:49 ` [PATCH 1/3] iommu/shmobile: Depend on ARCH_SHMOBILE Laurent Pinchart
2014-04-02 23:49 ` [PATCH 2/3] iommu/shmobile: Don't ignore the ipmmu_iommu_init() return value Laurent Pinchart
2014-04-02 23:49 ` [PATCH 3/3] iommu/shmobile: Use devm_ioremap_resource() Laurent Pinchart
[not found] ` <1396482562-1851-1-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2014-04-17 10:18 ` [GIT PULL FOR v3.16] SH-Mobile IPMMU miscellaneous cleanups Laurent Pinchart
2014-05-12 18:55 ` Joerg Roedel
[not found] ` <20140512185554.GY12376-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-05-12 19:46 ` Laurent Pinchart
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).