* [PATCH v2 2/5] iommu/omap: Merge iommu2.h into iommu.h
2012-10-01 22:46 ` [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h Ido Yariv
@ 2012-10-01 22:46 ` Ido Yariv
2012-10-02 16:40 ` Tony Lindgren
2012-10-01 22:46 ` [PATCH v2 3/5] iommu/omap: Make some definitions local Ido Yariv
` (3 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Ido Yariv @ 2012-10-01 22:46 UTC (permalink / raw)
To: linux-arm-kernel
Since iommu is not supported on OMAP1 and will not likely to ever be
supported, merge plat/iommu2.h into iommu.h so only one file would have
to move to platform_data/ as part of the single zImage effort.
Signed-off-by: Ido Yariv <ido@wizery.com>
---
arch/arm/plat-omap/include/plat/iommu.h | 88 +++++++++++++++++++++++++++--
arch/arm/plat-omap/include/plat/iommu2.h | 96 --------------------------------
2 files changed, 83 insertions(+), 101 deletions(-)
delete mode 100644 arch/arm/plat-omap/include/plat/iommu2.h
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h
index 68b5f03..7e8c7b6 100644
--- a/arch/arm/plat-omap/include/plat/iommu.h
+++ b/arch/arm/plat-omap/include/plat/iommu.h
@@ -13,6 +13,12 @@
#ifndef __MACH_IOMMU_H
#define __MACH_IOMMU_H
+#include <linux/io.h>
+
+#if defined(CONFIG_ARCH_OMAP1)
+#error "iommu for this processor not implemented yet"
+#endif
+
struct iotlb_entry {
u32 da;
u32 pa;
@@ -159,11 +165,70 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev)
#define OMAP_IOMMU_ERR_TBLWALK_FAULT (1 << 3)
#define OMAP_IOMMU_ERR_MULTIHIT_FAULT (1 << 4)
-#if defined(CONFIG_ARCH_OMAP1)
-#error "iommu for this processor not implemented yet"
-#else
-#include <plat/iommu2.h>
-#endif
+/*
+ * MMU Register offsets
+ */
+#define MMU_REVISION 0x00
+#define MMU_SYSCONFIG 0x10
+#define MMU_SYSSTATUS 0x14
+#define MMU_IRQSTATUS 0x18
+#define MMU_IRQENABLE 0x1c
+#define MMU_WALKING_ST 0x40
+#define MMU_CNTL 0x44
+#define MMU_FAULT_AD 0x48
+#define MMU_TTB 0x4c
+#define MMU_LOCK 0x50
+#define MMU_LD_TLB 0x54
+#define MMU_CAM 0x58
+#define MMU_RAM 0x5c
+#define MMU_GFLUSH 0x60
+#define MMU_FLUSH_ENTRY 0x64
+#define MMU_READ_CAM 0x68
+#define MMU_READ_RAM 0x6c
+#define MMU_EMU_FAULT_AD 0x70
+
+#define MMU_REG_SIZE 256
+
+/*
+ * MMU Register bit definitions
+ */
+#define MMU_LOCK_BASE_SHIFT 10
+#define MMU_LOCK_BASE_MASK (0x1f << MMU_LOCK_BASE_SHIFT)
+#define MMU_LOCK_BASE(x) \
+ ((x & MMU_LOCK_BASE_MASK) >> MMU_LOCK_BASE_SHIFT)
+
+#define MMU_LOCK_VICT_SHIFT 4
+#define MMU_LOCK_VICT_MASK (0x1f << MMU_LOCK_VICT_SHIFT)
+#define MMU_LOCK_VICT(x) \
+ ((x & MMU_LOCK_VICT_MASK) >> MMU_LOCK_VICT_SHIFT)
+
+#define MMU_CAM_VATAG_SHIFT 12
+#define MMU_CAM_VATAG_MASK \
+ ((~0UL >> MMU_CAM_VATAG_SHIFT) << MMU_CAM_VATAG_SHIFT)
+#define MMU_CAM_P (1 << 3)
+#define MMU_CAM_V (1 << 2)
+#define MMU_CAM_PGSZ_MASK 3
+#define MMU_CAM_PGSZ_1M (0 << 0)
+#define MMU_CAM_PGSZ_64K (1 << 0)
+#define MMU_CAM_PGSZ_4K (2 << 0)
+#define MMU_CAM_PGSZ_16M (3 << 0)
+
+#define MMU_RAM_PADDR_SHIFT 12
+#define MMU_RAM_PADDR_MASK \
+ ((~0UL >> MMU_RAM_PADDR_SHIFT) << MMU_RAM_PADDR_SHIFT)
+#define MMU_RAM_ENDIAN_SHIFT 9
+#define MMU_RAM_ENDIAN_MASK (1 << MMU_RAM_ENDIAN_SHIFT)
+#define MMU_RAM_ENDIAN_BIG (1 << MMU_RAM_ENDIAN_SHIFT)
+#define MMU_RAM_ENDIAN_LITTLE (0 << MMU_RAM_ENDIAN_SHIFT)
+#define MMU_RAM_ELSZ_SHIFT 7
+#define MMU_RAM_ELSZ_MASK (3 << MMU_RAM_ELSZ_SHIFT)
+#define MMU_RAM_ELSZ_8 (0 << MMU_RAM_ELSZ_SHIFT)
+#define MMU_RAM_ELSZ_16 (1 << MMU_RAM_ELSZ_SHIFT)
+#define MMU_RAM_ELSZ_32 (2 << MMU_RAM_ELSZ_SHIFT)
+#define MMU_RAM_ELSZ_NONE (3 << MMU_RAM_ELSZ_SHIFT)
+#define MMU_RAM_MIXED_SHIFT 6
+#define MMU_RAM_MIXED_MASK (1 << MMU_RAM_MIXED_SHIFT)
+#define MMU_RAM_MIXED MMU_RAM_MIXED_MASK
/*
* utilities for super page(16MB, 1MB, 64KB and 4KB)
@@ -218,4 +283,17 @@ omap_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len);
extern size_t
omap_dump_tlb_entries(struct omap_iommu *obj, char *buf, ssize_t len);
+/*
+ * register accessors
+ */
+static inline u32 iommu_read_reg(struct omap_iommu *obj, size_t offs)
+{
+ return __raw_readl(obj->regbase + offs);
+}
+
+static inline void iommu_write_reg(struct omap_iommu *obj, u32 val, size_t offs)
+{
+ __raw_writel(val, obj->regbase + offs);
+}
+
#endif /* __MACH_IOMMU_H */
diff --git a/arch/arm/plat-omap/include/plat/iommu2.h b/arch/arm/plat-omap/include/plat/iommu2.h
deleted file mode 100644
index d4116b5..0000000
--- a/arch/arm/plat-omap/include/plat/iommu2.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * omap iommu: omap2 architecture specific definitions
- *
- * Copyright (C) 2008-2009 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.
- */
-
-#ifndef __MACH_IOMMU2_H
-#define __MACH_IOMMU2_H
-
-#include <linux/io.h>
-
-/*
- * MMU Register offsets
- */
-#define MMU_REVISION 0x00
-#define MMU_SYSCONFIG 0x10
-#define MMU_SYSSTATUS 0x14
-#define MMU_IRQSTATUS 0x18
-#define MMU_IRQENABLE 0x1c
-#define MMU_WALKING_ST 0x40
-#define MMU_CNTL 0x44
-#define MMU_FAULT_AD 0x48
-#define MMU_TTB 0x4c
-#define MMU_LOCK 0x50
-#define MMU_LD_TLB 0x54
-#define MMU_CAM 0x58
-#define MMU_RAM 0x5c
-#define MMU_GFLUSH 0x60
-#define MMU_FLUSH_ENTRY 0x64
-#define MMU_READ_CAM 0x68
-#define MMU_READ_RAM 0x6c
-#define MMU_EMU_FAULT_AD 0x70
-
-#define MMU_REG_SIZE 256
-
-/*
- * MMU Register bit definitions
- */
-#define MMU_LOCK_BASE_SHIFT 10
-#define MMU_LOCK_BASE_MASK (0x1f << MMU_LOCK_BASE_SHIFT)
-#define MMU_LOCK_BASE(x) \
- ((x & MMU_LOCK_BASE_MASK) >> MMU_LOCK_BASE_SHIFT)
-
-#define MMU_LOCK_VICT_SHIFT 4
-#define MMU_LOCK_VICT_MASK (0x1f << MMU_LOCK_VICT_SHIFT)
-#define MMU_LOCK_VICT(x) \
- ((x & MMU_LOCK_VICT_MASK) >> MMU_LOCK_VICT_SHIFT)
-
-#define MMU_CAM_VATAG_SHIFT 12
-#define MMU_CAM_VATAG_MASK \
- ((~0UL >> MMU_CAM_VATAG_SHIFT) << MMU_CAM_VATAG_SHIFT)
-#define MMU_CAM_P (1 << 3)
-#define MMU_CAM_V (1 << 2)
-#define MMU_CAM_PGSZ_MASK 3
-#define MMU_CAM_PGSZ_1M (0 << 0)
-#define MMU_CAM_PGSZ_64K (1 << 0)
-#define MMU_CAM_PGSZ_4K (2 << 0)
-#define MMU_CAM_PGSZ_16M (3 << 0)
-
-#define MMU_RAM_PADDR_SHIFT 12
-#define MMU_RAM_PADDR_MASK \
- ((~0UL >> MMU_RAM_PADDR_SHIFT) << MMU_RAM_PADDR_SHIFT)
-#define MMU_RAM_ENDIAN_SHIFT 9
-#define MMU_RAM_ENDIAN_MASK (1 << MMU_RAM_ENDIAN_SHIFT)
-#define MMU_RAM_ENDIAN_BIG (1 << MMU_RAM_ENDIAN_SHIFT)
-#define MMU_RAM_ENDIAN_LITTLE (0 << MMU_RAM_ENDIAN_SHIFT)
-#define MMU_RAM_ELSZ_SHIFT 7
-#define MMU_RAM_ELSZ_MASK (3 << MMU_RAM_ELSZ_SHIFT)
-#define MMU_RAM_ELSZ_8 (0 << MMU_RAM_ELSZ_SHIFT)
-#define MMU_RAM_ELSZ_16 (1 << MMU_RAM_ELSZ_SHIFT)
-#define MMU_RAM_ELSZ_32 (2 << MMU_RAM_ELSZ_SHIFT)
-#define MMU_RAM_ELSZ_NONE (3 << MMU_RAM_ELSZ_SHIFT)
-#define MMU_RAM_MIXED_SHIFT 6
-#define MMU_RAM_MIXED_MASK (1 << MMU_RAM_MIXED_SHIFT)
-#define MMU_RAM_MIXED MMU_RAM_MIXED_MASK
-
-/*
- * register accessors
- */
-static inline u32 iommu_read_reg(struct omap_iommu *obj, size_t offs)
-{
- return __raw_readl(obj->regbase + offs);
-}
-
-static inline void iommu_write_reg(struct omap_iommu *obj, u32 val, size_t offs)
-{
- __raw_writel(val, obj->regbase + offs);
-}
-
-#endif /* __MACH_IOMMU2_H */
--
1.7.11.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 3/5] iommu/omap: Make some definitions local
2012-10-01 22:46 ` [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h Ido Yariv
2012-10-01 22:46 ` [PATCH v2 2/5] iommu/omap: Merge iommu2.h into iommu.h Ido Yariv
@ 2012-10-01 22:46 ` Ido Yariv
2012-10-01 22:46 ` [PATCH v2 4/5] arm: omap: Move iommu/iovmm headers to platform_data Ido Yariv
` (2 subsequent siblings)
4 siblings, 0 replies; 17+ messages in thread
From: Ido Yariv @ 2012-10-01 22:46 UTC (permalink / raw)
To: linux-arm-kernel
Move some of the definitions in plat/iommu.h that can be made local to
either drivers/iommu or arch/arm/mach-omap2. This minimizes the number
of global definitions once plat/iommu.h moves to platform_data/ as part
of the single zImage effort.
Signed-off-by: Ido Yariv <ido@wizery.com>
---
arch/arm/mach-omap2/iommu2.c | 6 ++++
arch/arm/plat-omap/include/plat/iommu.h | 55 ------------------------------
drivers/iommu/omap-iommu-debug.c | 2 ++
drivers/iommu/omap-iommu.c | 2 ++
drivers/iommu/omap-iommu.h | 59 +++++++++++++++++++++++++++++++++
drivers/iommu/omap-iovmm.c | 2 ++
6 files changed, 71 insertions(+), 55 deletions(-)
create mode 100644 drivers/iommu/omap-iommu.h
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index eefc379..c986880 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -65,6 +65,12 @@
((pgsz) == MMU_CAM_PGSZ_64K) ? 0xffff0000 : \
((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0)
+/* IOMMU errors */
+#define OMAP_IOMMU_ERR_TLB_MISS (1 << 0)
+#define OMAP_IOMMU_ERR_TRANS_FAULT (1 << 1)
+#define OMAP_IOMMU_ERR_EMU_MISS (1 << 2)
+#define OMAP_IOMMU_ERR_TBLWALK_FAULT (1 << 3)
+#define OMAP_IOMMU_ERR_MULTIHIT_FAULT (1 << 4)
static void __iommu_set_twl(struct omap_iommu *obj, bool on)
{
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h
index 7e8c7b6..35a0245 100644
--- a/arch/arm/plat-omap/include/plat/iommu.h
+++ b/arch/arm/plat-omap/include/plat/iommu.h
@@ -77,11 +77,6 @@ struct cr_regs {
};
};
-struct iotlb_lock {
- short base;
- short vict;
-};
-
/* architecture specific functions */
struct iommu_functions {
unsigned long version;
@@ -145,26 +140,6 @@ struct omap_iommu_arch_data {
struct omap_iommu *iommu_dev;
};
-#ifdef CONFIG_IOMMU_API
-/**
- * dev_to_omap_iommu() - retrieves an omap iommu object from a user device
- * @dev: iommu client device
- */
-static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev)
-{
- struct omap_iommu_arch_data *arch_data = dev->archdata.iommu;
-
- return arch_data->iommu_dev;
-}
-#endif
-
-/* IOMMU errors */
-#define OMAP_IOMMU_ERR_TLB_MISS (1 << 0)
-#define OMAP_IOMMU_ERR_TRANS_FAULT (1 << 1)
-#define OMAP_IOMMU_ERR_EMU_MISS (1 << 2)
-#define OMAP_IOMMU_ERR_TBLWALK_FAULT (1 << 3)
-#define OMAP_IOMMU_ERR_MULTIHIT_FAULT (1 << 4)
-
/*
* MMU Register offsets
*/
@@ -192,16 +167,6 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev)
/*
* MMU Register bit definitions
*/
-#define MMU_LOCK_BASE_SHIFT 10
-#define MMU_LOCK_BASE_MASK (0x1f << MMU_LOCK_BASE_SHIFT)
-#define MMU_LOCK_BASE(x) \
- ((x & MMU_LOCK_BASE_MASK) >> MMU_LOCK_BASE_SHIFT)
-
-#define MMU_LOCK_VICT_SHIFT 4
-#define MMU_LOCK_VICT_MASK (0x1f << MMU_LOCK_VICT_SHIFT)
-#define MMU_LOCK_VICT(x) \
- ((x & MMU_LOCK_VICT_MASK) >> MMU_LOCK_VICT_SHIFT)
-
#define MMU_CAM_VATAG_SHIFT 12
#define MMU_CAM_VATAG_MASK \
((~0UL >> MMU_CAM_VATAG_SHIFT) << MMU_CAM_VATAG_SHIFT)
@@ -257,32 +222,12 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev)
/*
* global functions
*/
-extern u32 omap_iommu_arch_version(void);
-
-extern void omap_iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e);
-
-extern int
-omap_iopgtable_store_entry(struct omap_iommu *obj, struct iotlb_entry *e);
-
-extern int omap_iommu_set_isr(const char *name,
- int (*isr)(struct omap_iommu *obj, u32 da, u32 iommu_errs,
- void *priv),
- void *isr_priv);
-
extern void omap_iommu_save_ctx(struct device *dev);
extern void omap_iommu_restore_ctx(struct device *dev);
extern int omap_install_iommu_arch(const struct iommu_functions *ops);
extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops);
-extern int omap_foreach_iommu_device(void *data,
- int (*fn)(struct device *, void *));
-
-extern ssize_t
-omap_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len);
-extern size_t
-omap_dump_tlb_entries(struct omap_iommu *obj, char *buf, ssize_t len);
-
/*
* register accessors
*/
diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c
index f55fc5d..a0b0309 100644
--- a/drivers/iommu/omap-iommu-debug.c
+++ b/drivers/iommu/omap-iommu-debug.c
@@ -24,6 +24,8 @@
#include <plat/iopgtable.h>
+#include "omap-iommu.h"
+
#define MAXCOLUMN 100 /* for short messages */
static DEFINE_MUTEX(iommu_debug_lock);
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index d0b1234..80844b3 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -28,6 +28,8 @@
#include <plat/iopgtable.h>
+#include "omap-iommu.h"
+
#define for_each_iotlb_cr(obj, n, __i, cr) \
for (__i = 0; \
(__i < (n)) && (cr = __iotlb_read_cr((obj), __i), true); \
diff --git a/drivers/iommu/omap-iommu.h b/drivers/iommu/omap-iommu.h
new file mode 100644
index 0000000..51fd00c
--- /dev/null
+++ b/drivers/iommu/omap-iommu.h
@@ -0,0 +1,59 @@
+/*
+ * omap iommu: miscellaneous iommu functions and structures
+ *
+ * Copyright (C) 2008-2009 Nokia Corporation
+ * Copyright (C) 2012 Texas Instruments
+ *
+ * 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.
+ */
+
+#ifndef _OMAP_IOMMU_H
+#define _OMAP_IOMMU_H
+
+/*
+ * MMU Register bit definitions
+ */
+#define MMU_LOCK_BASE_SHIFT 10
+#define MMU_LOCK_BASE_MASK (0x1f << MMU_LOCK_BASE_SHIFT)
+#define MMU_LOCK_BASE(x) \
+ ((x & MMU_LOCK_BASE_MASK) >> MMU_LOCK_BASE_SHIFT)
+
+#define MMU_LOCK_VICT_SHIFT 4
+#define MMU_LOCK_VICT_MASK (0x1f << MMU_LOCK_VICT_SHIFT)
+#define MMU_LOCK_VICT(x) \
+ ((x & MMU_LOCK_VICT_MASK) >> MMU_LOCK_VICT_SHIFT)
+
+struct iotlb_lock {
+ short base;
+ short vict;
+};
+
+extern u32 omap_iommu_arch_version(void);
+
+extern void omap_iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e);
+
+extern int
+omap_iopgtable_store_entry(struct omap_iommu *obj, struct iotlb_entry *e);
+
+extern int omap_foreach_iommu_device(void *data,
+ int (*fn)(struct device *, void *));
+
+extern ssize_t
+omap_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len);
+extern size_t
+omap_dump_tlb_entries(struct omap_iommu *obj, char *buf, ssize_t len);
+
+/**
+ * dev_to_omap_iommu() - retrieves an omap iommu object from a user device
+ * @dev: iommu client device
+ */
+static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev)
+{
+ struct omap_iommu_arch_data *arch_data = dev->archdata.iommu;
+
+ return arch_data->iommu_dev;
+}
+
+#endif
diff --git a/drivers/iommu/omap-iovmm.c b/drivers/iommu/omap-iovmm.c
index 2e10c3e..b362fb5 100644
--- a/drivers/iommu/omap-iovmm.c
+++ b/drivers/iommu/omap-iovmm.c
@@ -26,6 +26,8 @@
#include <plat/iopgtable.h>
+#include "omap-iommu.h"
+
static struct kmem_cache *iovm_area_cachep;
/* return the offset of the first scatterlist entry in a sg table */
--
1.7.11.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 4/5] arm: omap: Move iommu/iovmm headers to platform_data
2012-10-01 22:46 ` [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h Ido Yariv
2012-10-01 22:46 ` [PATCH v2 2/5] iommu/omap: Merge iommu2.h into iommu.h Ido Yariv
2012-10-01 22:46 ` [PATCH v2 3/5] iommu/omap: Make some definitions local Ido Yariv
@ 2012-10-01 22:46 ` Ido Yariv
2012-10-01 22:46 ` [PATCH v2 5/5] arm: omap: Move iopgtable header to drivers/iommu/ Ido Yariv
2012-10-02 16:31 ` [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h Tony Lindgren
4 siblings, 0 replies; 17+ messages in thread
From: Ido Yariv @ 2012-10-01 22:46 UTC (permalink / raw)
To: linux-arm-kernel
Move iommu/iovmm headers from plat/ to platform_data/ as part of the
single zImage work.
Signed-off-by: Ido Yariv <ido@wizery.com>
---
arch/arm/mach-omap2/devices.c | 2 +-
arch/arm/mach-omap2/iommu2.c | 2 +-
arch/arm/mach-omap2/omap-iommu.c | 2 +-
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 +-
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 2 +-
drivers/iommu/omap-iommu-debug.c | 4 ++--
drivers/iommu/omap-iommu.c | 2 +-
drivers/iommu/omap-iovmm.c | 4 ++--
drivers/media/platform/omap3isp/isp.h | 5 +++--
drivers/media/platform/omap3isp/ispvideo.c | 6 ++++--
.../plat/iommu.h => include/linux/platform_data/iommu-omap.h | 0
.../plat/iovmm.h => include/linux/platform_data/iovmm-omap.h | 0
12 files changed, 17 insertions(+), 14 deletions(-)
rename arch/arm/plat-omap/include/plat/iommu.h => include/linux/platform_data/iommu-omap.h (100%)
rename arch/arm/plat-omap/include/plat/iovmm.h => include/linux/platform_data/iovmm-omap.h (100%)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index c8c2117..6cd0c2a 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -126,7 +126,7 @@ static struct platform_device omap2cam_device = {
#if defined(CONFIG_IOMMU_API)
-#include <plat/iommu.h>
+#include <linux/platform_data/iommu-omap.h>
static struct resource omap3isp_resources[] = {
{
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index c986880..82f9174 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -18,7 +18,7 @@
#include <linux/slab.h>
#include <linux/stringify.h>
-#include <plat/iommu.h>
+#include <linux/platform_data/iommu-omap.h>
/*
* omap2 architecture specific register bit definitions
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index df298d4..a6a4ff8 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -13,7 +13,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <plat/iommu.h>
+#include <linux/platform_data/iommu-omap.h>
#include "soc.h"
#include "common.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 2857772..35ebf14 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -26,8 +26,8 @@
#include <plat/mmc.h>
#include <linux/platform_data/asoc-ti-mcbsp.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
+#include <linux/platform_data/iommu-omap.h>
#include <plat/dmtimer.h>
-#include <plat/iommu.h>
#include "am35xx.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 652d028..5850b3e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -27,10 +27,10 @@
#include <plat/dma.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/platform_data/asoc-ti-mcbsp.h>
+#include <linux/platform_data/iommu-omap.h>
#include <plat/mmc.h>
#include <plat/dmtimer.h>
#include <plat/common.h>
-#include <plat/iommu.h>
#include "omap_hwmod_common_data.h"
#include "cm1_44xx.h"
diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c
index a0b0309..8c1e30b 100644
--- a/drivers/iommu/omap-iommu-debug.c
+++ b/drivers/iommu/omap-iommu-debug.c
@@ -19,8 +19,8 @@
#include <linux/platform_device.h>
#include <linux/debugfs.h>
-#include <plat/iommu.h>
-#include <plat/iovmm.h>
+#include <linux/platform_data/iommu-omap.h>
+#include <linux/platform_data/iovmm-omap.h>
#include <plat/iopgtable.h>
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 80844b3..6100334 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -24,7 +24,7 @@
#include <asm/cacheflush.h>
-#include <plat/iommu.h>
+#include <linux/platform_data/iommu-omap.h>
#include <plat/iopgtable.h>
diff --git a/drivers/iommu/omap-iovmm.c b/drivers/iommu/omap-iovmm.c
index b362fb5..b5ac2cd 100644
--- a/drivers/iommu/omap-iovmm.c
+++ b/drivers/iommu/omap-iovmm.c
@@ -21,8 +21,8 @@
#include <asm/cacheflush.h>
#include <asm/mach/map.h>
-#include <plat/iommu.h>
-#include <plat/iovmm.h>
+#include <linux/platform_data/iommu-omap.h>
+#include <linux/platform_data/iovmm-omap.h>
#include <plat/iopgtable.h>
diff --git a/drivers/media/platform/omap3isp/isp.h b/drivers/media/platform/omap3isp/isp.h
index 8be7487..62c76f9 100644
--- a/drivers/media/platform/omap3isp/isp.h
+++ b/drivers/media/platform/omap3isp/isp.h
@@ -34,8 +34,9 @@
#include <linux/platform_device.h>
#include <linux/wait.h>
#include <linux/iommu.h>
-#include <plat/iommu.h>
-#include <plat/iovmm.h>
+
+#include <linux/platform_data/iommu-omap.h>
+#include <linux/platform_data/iovmm-omap.h>
#include "ispstat.h"
#include "ispccdc.h"
diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
index 3a5085e..1093f07 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -34,8 +34,10 @@
#include <linux/vmalloc.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>
-#include <plat/iommu.h>
-#include <plat/iovmm.h>
+
+#include <linux/platform_data/iommu-omap.h>
+#include <linux/platform_data/iovmm-omap.h>
+
#include <plat/omap-pm.h>
#include "ispvideo.h"
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/include/linux/platform_data/iommu-omap.h
similarity index 100%
rename from arch/arm/plat-omap/include/plat/iommu.h
rename to include/linux/platform_data/iommu-omap.h
diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/include/linux/platform_data/iovmm-omap.h
similarity index 100%
rename from arch/arm/plat-omap/include/plat/iovmm.h
rename to include/linux/platform_data/iovmm-omap.h
--
1.7.11.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 5/5] arm: omap: Move iopgtable header to drivers/iommu/
2012-10-01 22:46 ` [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h Ido Yariv
` (2 preceding siblings ...)
2012-10-01 22:46 ` [PATCH v2 4/5] arm: omap: Move iommu/iovmm headers to platform_data Ido Yariv
@ 2012-10-01 22:46 ` Ido Yariv
2012-10-02 16:31 ` [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h Tony Lindgren
4 siblings, 0 replies; 17+ messages in thread
From: Ido Yariv @ 2012-10-01 22:46 UTC (permalink / raw)
To: linux-arm-kernel
The iopgtable header file is only used by the iommu & iovmm drivers, so
move it to drivers/iommu/, as part of the single zImage effort.
Signed-off-by: Ido Yariv <ido@wizery.com>
---
drivers/iommu/omap-iommu-debug.c | 3 +--
drivers/iommu/omap-iommu.c | 3 +--
.../include/plat/iopgtable.h => drivers/iommu/omap-iopgtable.h | 0
drivers/iommu/omap-iovmm.c | 3 +--
4 files changed, 3 insertions(+), 6 deletions(-)
rename arch/arm/plat-omap/include/plat/iopgtable.h => drivers/iommu/omap-iopgtable.h (100%)
diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c
index 8c1e30b..84dbfd2 100644
--- a/drivers/iommu/omap-iommu-debug.c
+++ b/drivers/iommu/omap-iommu-debug.c
@@ -22,8 +22,7 @@
#include <linux/platform_data/iommu-omap.h>
#include <linux/platform_data/iovmm-omap.h>
-#include <plat/iopgtable.h>
-
+#include "omap-iopgtable.h"
#include "omap-iommu.h"
#define MAXCOLUMN 100 /* for short messages */
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 6100334..1ca33b0 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -26,8 +26,7 @@
#include <linux/platform_data/iommu-omap.h>
-#include <plat/iopgtable.h>
-
+#include "omap-iopgtable.h"
#include "omap-iommu.h"
#define for_each_iotlb_cr(obj, n, __i, cr) \
diff --git a/arch/arm/plat-omap/include/plat/iopgtable.h b/drivers/iommu/omap-iopgtable.h
similarity index 100%
rename from arch/arm/plat-omap/include/plat/iopgtable.h
rename to drivers/iommu/omap-iopgtable.h
diff --git a/drivers/iommu/omap-iovmm.c b/drivers/iommu/omap-iovmm.c
index b5ac2cd..2820e3a 100644
--- a/drivers/iommu/omap-iovmm.c
+++ b/drivers/iommu/omap-iovmm.c
@@ -24,8 +24,7 @@
#include <linux/platform_data/iommu-omap.h>
#include <linux/platform_data/iovmm-omap.h>
-#include <plat/iopgtable.h>
-
+#include "omap-iopgtable.h"
#include "omap-iommu.h"
static struct kmem_cache *iovm_area_cachep;
--
1.7.11.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h
2012-10-01 22:46 ` [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h Ido Yariv
` (3 preceding siblings ...)
2012-10-01 22:46 ` [PATCH v2 5/5] arm: omap: Move iopgtable header to drivers/iommu/ Ido Yariv
@ 2012-10-02 16:31 ` Tony Lindgren
2012-10-07 13:17 ` Mauro Carvalho Chehab
4 siblings, 1 reply; 17+ messages in thread
From: Tony Lindgren @ 2012-10-02 16:31 UTC (permalink / raw)
To: linux-arm-kernel
* Ido Yariv <ido@wizery.com> [121001 15:48]:
> Commit c49f34bc ("ARM: OMAP2+ Move SoC specific headers to be local to
> mach-omap2") moved omap34xx.h to mach-omap2. This broke omap3isp, as it
> includes omap34xx.h.
>
> Instead of moving omap34xx to platform_data, simply add the two
> definitions the driver needs and remove the include altogether.
>
> Signed-off-by: Ido Yariv <ido@wizery.com>
I'm assuming that Mauro picks this one up, sorry
for breaking it.
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> drivers/media/platform/omap3isp/ispreg.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/omap3isp/ispreg.h b/drivers/media/platform/omap3isp/ispreg.h
> index 084ea77..e2c57f3 100644
> --- a/drivers/media/platform/omap3isp/ispreg.h
> +++ b/drivers/media/platform/omap3isp/ispreg.h
> @@ -27,13 +27,13 @@
> #ifndef OMAP3_ISP_REG_H
> #define OMAP3_ISP_REG_H
>
> -#include <plat/omap34xx.h>
> -
> -
> #define CM_CAM_MCLK_HZ 172800000 /* Hz */
>
> /* ISP Submodules offset */
>
> +#define L4_34XX_BASE 0x48000000
> +#define OMAP3430_ISP_BASE (L4_34XX_BASE + 0xBC000)
> +
> #define OMAP3ISP_REG_BASE OMAP3430_ISP_BASE
> #define OMAP3ISP_REG(offset) (OMAP3ISP_REG_BASE + (offset))
>
> --
> 1.7.11.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h
2012-10-02 16:31 ` [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h Tony Lindgren
@ 2012-10-07 13:17 ` Mauro Carvalho Chehab
2012-10-08 21:30 ` Tony Lindgren
2012-10-12 1:07 ` Laurent Pinchart
0 siblings, 2 replies; 17+ messages in thread
From: Mauro Carvalho Chehab @ 2012-10-07 13:17 UTC (permalink / raw)
To: linux-arm-kernel
Em Tue, 2 Oct 2012 09:31:58 -0700
Tony Lindgren <tony@atomide.com> escreveu:
> * Ido Yariv <ido@wizery.com> [121001 15:48]:
> > Commit c49f34bc ("ARM: OMAP2+ Move SoC specific headers to be local to
> > mach-omap2") moved omap34xx.h to mach-omap2. This broke omap3isp, as it
> > includes omap34xx.h.
> >
> > Instead of moving omap34xx to platform_data, simply add the two
> > definitions the driver needs and remove the include altogether.
> >
> > Signed-off-by: Ido Yariv <ido@wizery.com>
>
> I'm assuming that Mauro picks this one up, sorry
> for breaking it.
Picked, thanks.
With regards to the other patches in this series, IMHO, it
makes more sense to go through arm omap tree, so, for the
patches on this series that touch at drivers/media/platform/*:
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> Acked-by: Tony Lindgren <tony@atomide.com>
>
> > ---
> > drivers/media/platform/omap3isp/ispreg.h | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/media/platform/omap3isp/ispreg.h b/drivers/media/platform/omap3isp/ispreg.h
> > index 084ea77..e2c57f3 100644
> > --- a/drivers/media/platform/omap3isp/ispreg.h
> > +++ b/drivers/media/platform/omap3isp/ispreg.h
> > @@ -27,13 +27,13 @@
> > #ifndef OMAP3_ISP_REG_H
> > #define OMAP3_ISP_REG_H
> >
> > -#include <plat/omap34xx.h>
> > -
> > -
> > #define CM_CAM_MCLK_HZ 172800000 /* Hz */
> >
> > /* ISP Submodules offset */
> >
> > +#define L4_34XX_BASE 0x48000000
> > +#define OMAP3430_ISP_BASE (L4_34XX_BASE + 0xBC000)
> > +
> > #define OMAP3ISP_REG_BASE OMAP3430_ISP_BASE
> > #define OMAP3ISP_REG(offset) (OMAP3ISP_REG_BASE + (offset))
> >
> > --
> > 1.7.11.4
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> > the body of a message to majordomo at vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
Mauro
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h
2012-10-07 13:17 ` Mauro Carvalho Chehab
@ 2012-10-08 21:30 ` Tony Lindgren
2012-10-12 1:07 ` Laurent Pinchart
1 sibling, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2012-10-08 21:30 UTC (permalink / raw)
To: linux-arm-kernel
* Mauro Carvalho Chehab <mchehab@infradead.org> [121007 06:18]:
> Em Tue, 2 Oct 2012 09:31:58 -0700
> Tony Lindgren <tony@atomide.com> escreveu:
>
> > * Ido Yariv <ido@wizery.com> [121001 15:48]:
> > > Commit c49f34bc ("ARM: OMAP2+ Move SoC specific headers to be local to
> > > mach-omap2") moved omap34xx.h to mach-omap2. This broke omap3isp, as it
> > > includes omap34xx.h.
> > >
> > > Instead of moving omap34xx to platform_data, simply add the two
> > > definitions the driver needs and remove the include altogether.
> > >
> > > Signed-off-by: Ido Yariv <ido@wizery.com>
> >
> > I'm assuming that Mauro picks this one up, sorry
> > for breaking it.
>
> Picked, thanks.
>
> With regards to the other patches in this series, IMHO, it
> makes more sense to go through arm omap tree, so, for the
> patches on this series that touch at drivers/media/platform/*:
>
> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Thanks yeah it's best that I pick up the rest. I can setup
a minimal branch that can also be pulled into iommu branch
after -rc1.
Regards,
Tony
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 1/5] [media] omap3isp: Fix compilation error in ispreg.h
2012-10-07 13:17 ` Mauro Carvalho Chehab
2012-10-08 21:30 ` Tony Lindgren
@ 2012-10-12 1:07 ` Laurent Pinchart
1 sibling, 0 replies; 17+ messages in thread
From: Laurent Pinchart @ 2012-10-12 1:07 UTC (permalink / raw)
To: linux-arm-kernel
Hi Mauro,
On Sunday 07 October 2012 10:17:18 Mauro Carvalho Chehab wrote:
> Em Tue, 2 Oct 2012 09:31:58 -0700 Tony Lindgren escreveu:
> > * Ido Yariv <ido@wizery.com> [121001 15:48]:
> > > Commit c49f34bc ("ARM: OMAP2+ Move SoC specific headers to be local to
> > > mach-omap2") moved omap34xx.h to mach-omap2. This broke omap3isp, as it
> > > includes omap34xx.h.
> > >
> > > Instead of moving omap34xx to platform_data, simply add the two
> > > definitions the driver needs and remove the include altogether.
> > >
> > > Signed-off-by: Ido Yariv <ido@wizery.com>
> >
> > I'm assuming that Mauro picks this one up, sorry
> > for breaking it.
>
> Picked, thanks.
>
> With regards to the other patches in this series, IMHO, it
> makes more sense to go through arm omap tree, so, for the
> patches on this series that touch at drivers/media/platform/*:
>
> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> > Acked-by: Tony Lindgren <tony@atomide.com>
> >
> > > ---
> > >
> > > drivers/media/platform/omap3isp/ispreg.h | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/media/platform/omap3isp/ispreg.h
> > > b/drivers/media/platform/omap3isp/ispreg.h index 084ea77..e2c57f3
> > > 100644
> > > --- a/drivers/media/platform/omap3isp/ispreg.h
> > > +++ b/drivers/media/platform/omap3isp/ispreg.h
> > > @@ -27,13 +27,13 @@
> > >
> > > #ifndef OMAP3_ISP_REG_H
> > > #define OMAP3_ISP_REG_H
> > >
> > > -#include <plat/omap34xx.h>
> > > -
> > > -
> > >
> > > #define CM_CAM_MCLK_HZ 172800000 /* Hz */
> > >
> > > /* ISP Submodules offset */
> > >
> > > +#define L4_34XX_BASE 0x48000000
> > > +#define OMAP3430_ISP_BASE (L4_34XX_BASE + 0xBC000)
> > > +
> > >
> > > #define OMAP3ISP_REG_BASE OMAP3430_ISP_BASE
> > > #define OMAP3ISP_REG(offset) (OMAP3ISP_REG_BASE + (offset))
I'll send a follow-up patch that removes all those definitions as they're
actually not needed.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 17+ messages in thread