From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.arm.linux.org.uk, linux-omap@vger.kernel.org
Subject: [PATCH 3/6] omap iommu: omap3 iommu device registration
Date: Fri, 16 Jan 2009 10:37:20 +0200 [thread overview]
Message-ID: <20090116083719.18344.28959.stgit@oreo.research.nokia.com> (raw)
In-Reply-To: <20090116083003.18344.38307.stgit@oreo.research.nokia.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---
arch/arm/mach-omap2/omap3-iommu.c | 111 +++++++++++++++++++++++++++++++++++++
1 files changed, 111 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-omap2/omap3-iommu.c
diff --git a/arch/arm/mach-omap2/omap3-iommu.c b/arch/arm/mach-omap2/omap3-iommu.c
new file mode 100644
index 0000000..52d0e56
--- /dev/null
+++ b/arch/arm/mach-omap2/omap3-iommu.c
@@ -0,0 +1,111 @@
+/*
+ * omap iommu: omap3 device registration
+ *
+ * Copyright (C) 2008 Nokia Corporation
+ *
+ * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/io.h>
+#include <linux/platform_device.h>
+
+#include <mach/iommu.h>
+
+#define DEVNAME "omap-iommu"
+
+/* Camera ISP MMU */
+#define OMAP3_MMU1_BASE 0x480bd400
+#define OMAP3_MMU1_IRQ 24
+
+/* IVA2.2 MMU */
+#define OMAP3_MMU2_BASE 0x5d000000
+#define OMAP3_MMU2_IRQ 28
+
+static struct resource iommu1_res[] = { /* Camera ISP MMU */
+ {
+ .start = OMAP3_MMU1_BASE,
+ .end = OMAP3_MMU1_BASE + MMU_REG_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = OMAP3_MMU1_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct resource iommu2_res[] = { /* IVA2.2 MMU */
+ {
+ .start = OMAP3_MMU2_BASE,
+ .end = OMAP3_MMU2_BASE + MMU_REG_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .start = OMAP3_MMU2_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct iommu_platform_data omap3_iommu_pdata[] = {
+ {
+ .name = "isp",
+ .nr_tlb_entries = 8,
+ .clk_name = "cam_ick",
+ },
+ {
+ .name = "iva2",
+ .nr_tlb_entries = 32,
+ .clk_name = "iva2_ck",
+ },
+};
+
+static void omap3_iommu_release(struct device *dev)
+{
+}
+
+static struct platform_device omap3_iommu_pdev[] = {
+ {
+ .name = DEVNAME,
+ .id = 1,
+ .num_resources = ARRAY_SIZE(iommu1_res),
+ .resource = iommu1_res,
+ .dev = {
+ .release = omap3_iommu_release,
+ .platform_data = &omap3_iommu_pdata[0],
+ },
+ },
+ {
+ .name = DEVNAME,
+ .id = 2,
+ .num_resources = ARRAY_SIZE(iommu2_res),
+ .resource = iommu2_res,
+ .dev = {
+ .release = omap3_iommu_release,
+ .platform_data = &omap3_iommu_pdata[1],
+ },
+ },
+};
+
+static int __init omap3_iommu_init(void)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(omap3_iommu_pdev); i++)
+ platform_device_register(&omap3_iommu_pdev[i]);
+ return 0;
+}
+module_init(omap3_iommu_init);
+
+static void __exit omap3_iommu_exit(void)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(omap3_iommu_pdev); i++)
+ platform_device_unregister(&omap3_iommu_pdev[i]);
+}
+module_exit(omap3_iommu_exit);
+
+MODULE_AUTHOR("Hiroshi DOYU");
+MODULE_DESCRIPTION("omap iommu: omap3 device registration");
+MODULE_LICENSE("GPL v2");
next prev parent reply other threads:[~2009-01-16 8:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-16 8:37 [PATCH 0/6] arm: omap iommu: add initial support Hiroshi DOYU
2009-01-16 8:37 ` [PATCH 1/6] omap iommu: tlb and pagetable primitives Hiroshi DOYU
2009-01-17 16:06 ` Russell King - ARM Linux
2009-01-17 20:48 ` David Brownell
2009-01-19 9:44 ` Hiroshi DOYU
2009-01-19 21:58 ` Russell King - ARM Linux
2009-01-19 22:42 ` David Brownell
2009-01-26 13:41 ` Hiroshi DOYU
2009-01-27 21:31 ` Hiroshi DOYU
2009-01-16 8:37 ` [PATCH 2/6] omap iommu: omap2 architecture specific functions Hiroshi DOYU
2009-01-16 8:37 ` Hiroshi DOYU [this message]
2009-01-17 16:21 ` [PATCH 3/6] omap iommu: omap3 iommu device registration Russell King - ARM Linux
2009-01-27 21:29 ` Hiroshi DOYU
2009-01-28 10:41 ` Russell King - ARM Linux
2009-01-28 11:37 ` Hiroshi DOYU
2009-01-16 8:37 ` [PATCH 4/6] omap iommu: simple virtual address space management Hiroshi DOYU
2009-01-17 16:57 ` Russell King - ARM Linux
2009-01-27 21:29 ` Hiroshi DOYU
2009-01-16 8:37 ` [PATCH 5/6] omap iommu: entries for Kconfig and Makefile Hiroshi DOYU
2009-01-16 8:37 ` [PATCH 6/6] omap2 " Hiroshi DOYU
2009-01-17 16:59 ` Russell King - ARM Linux
2009-01-22 15:02 ` Hiroshi DOYU
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=20090116083719.18344.28959.stgit@oreo.research.nokia.com \
--to=hiroshi.doyu@nokia.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.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
Powered by JetHome