All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: OMAP2+: hwmod: rt address space index for DT
@ 2013-07-05 15:13 ` Afzal Mohammed
  0 siblings, 0 replies; 10+ messages in thread
From: Afzal Mohammed @ 2013-07-05 15:13 UTC (permalink / raw)
  To: linux-omap, linux-arm-kernel
  Cc: Paul Walmsley, Benoit Cousson, Tony Lindgren, Russell King

Address space is being removed from hwmod database and DT information
in <reg> property is being used. Currently the 0th index of device
address space is used to map for register target address. This is not
always true, eg. cpgmac has it's sysconfig in second address space.

Handle it by specifying index of device address space to be used for
register target. As default value of this field would be zero with
static initialization, existing behaviour of using first address space
for register target while using DT would be kept as such.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c | 2 +-
 arch/arm/mach-omap2/omap_hwmod.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 7341eff..7f4db12 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2386,7 +2386,7 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
 
 		np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
 		if (np)
-			va_start = of_iomap(np, 0);
+			va_start = of_iomap(np, oh->mpu_rt_idx);
 	} else {
 		va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
 	}
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index aab33fd..29f7687 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -568,6 +568,7 @@ struct omap_hwmod_link {
  * @voltdm: pointer to voltage domain (filled in at runtime)
  * @dev_attr: arbitrary device attributes that can be passed to the driver
  * @_sysc_cache: internal-use hwmod flags
+ * @mpu_rt_idx: index of device address space for register target (for DT boot)
  * @_mpu_rt_va: cached register target start address (internal use)
  * @_mpu_port: cached MPU register target slave (internal use)
  * @opt_clks_cnt: number of @opt_clks
@@ -612,6 +613,7 @@ struct omap_hwmod {
 	struct list_head		slave_ports; /* connect to *_TA */
 	void				*dev_attr;
 	u32				_sysc_cache;
+	int				mpu_rt_idx;
 	void __iomem			*_mpu_rt_va;
 	spinlock_t			_lock;
 	struct list_head		node;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-07-25 10:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-05 15:13 [PATCH 1/2] ARM: OMAP2+: hwmod: rt address space index for DT Afzal Mohammed
2013-07-05 15:13 ` Afzal Mohammed
2013-07-05 15:13 ` [PATCH 2/2] ARM: OMAP2+: hwmod: AM335x: fix cpgmac address space Afzal Mohammed
2013-07-05 15:13   ` Afzal Mohammed
2013-07-25 10:01   ` Mugunthan V N
2013-07-25 10:01     ` Mugunthan V N
2013-07-24 13:38 ` [PATCH 1/2] ARM: OMAP2+: hwmod: rt address space index for DT Afzal Mohammed
2013-07-24 13:38   ` Afzal Mohammed
2013-07-25 10:00 ` Mugunthan V N
2013-07-25 10:00   ` Mugunthan V N

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.