linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: Change IOPAD macro's for OMAP4/5
@ 2014-05-12 18:16 Joachim Eastwood
  2014-05-14 21:58 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Joachim Eastwood @ 2014-05-12 18:16 UTC (permalink / raw)
  To: tony; +Cc: linux-omap, Joachim Eastwood

The OMAP4/5 TRMs primarily list address offsets from the padconf
physical address (which is not driver base address) and not
always the absolute physical address for padconf registers like
some other OMAP TRMs. So create a new macro to use this offset
and to avoid confusion between different OMAP parts.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 include/dt-bindings/pinctrl/omap.h | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/include/dt-bindings/pinctrl/omap.h b/include/dt-bindings/pinctrl/omap.h
index b04528cd033c..827e80964a35 100644
--- a/include/dt-bindings/pinctrl/omap.h
+++ b/include/dt-bindings/pinctrl/omap.h
@@ -62,12 +62,17 @@
 #define OMAP3630_CORE2_IOPAD(pa, val)	OMAP_IOPAD_OFFSET((pa), 0x25a0) (val)
 #define OMAP3_WKUP_IOPAD(pa, val)	OMAP_IOPAD_OFFSET((pa), 0x2a00) (val)
 #define AM33XX_IOPAD(pa, val)		OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
-#define OMAP4_CORE_IOPAD(pa, val)	OMAP_IOPAD_OFFSET((pa), 0x0040) (val)
-#define OMAP4_WKUP_IOPAD(pa, val)	OMAP_IOPAD_OFFSET((pa), 0xe040) (val)
 #define AM4372_IOPAD(pa, val)		OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
-#define OMAP5_CORE_IOPAD(pa, val)	OMAP_IOPAD_OFFSET((pa), 0x2840) (val)
-#define OMAP5_WKUP_IOPAD(pa, val)	OMAP_IOPAD_OFFSET((pa), 0xc840) (val)
 #define DRA7XX_CORE_IOPAD(pa, val)	OMAP_IOPAD_OFFSET((pa), 0x3400) (val)
 
+/*
+ * Macros to allow using the offset from the padconf physical address
+ * instead  of the offset from padconf base.
+ */
+#define OMAP_PADCONF_OFFSET(offset, base_offset)	((offset) - (base_offset))
+
+#define OMAP4_IOPAD(offset, val)	OMAP_PADCONF_OFFSET((offset), 0x0040) (val)
+#define OMAP5_IOPAD(offset, val)	OMAP_PADCONF_OFFSET((offset), 0x0040) (val)
+
 #endif
 
-- 
1.8.0


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

* Re: [PATCH] ARM: dts: Change IOPAD macro's for OMAP4/5
  2014-05-12 18:16 [PATCH] ARM: dts: Change IOPAD macro's for OMAP4/5 Joachim Eastwood
@ 2014-05-14 21:58 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2014-05-14 21:58 UTC (permalink / raw)
  To: Joachim Eastwood; +Cc: linux-omap

* Joachim Eastwood <manabian@gmail.com> [140512 11:17]:
> The OMAP4/5 TRMs primarily list address offsets from the padconf
> physical address (which is not driver base address) and not
> always the absolute physical address for padconf registers like
> some other OMAP TRMs. So create a new macro to use this offset
> and to avoid confusion between different OMAP parts.

Thanks applying into omap-for-v3.16/dt.

Tony

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

end of thread, other threads:[~2014-05-14 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 18:16 [PATCH] ARM: dts: Change IOPAD macro's for OMAP4/5 Joachim Eastwood
2014-05-14 21:58 ` Tony Lindgren

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).