Skip to contentSkip to conversation

ARM: DRA7: Provide proper IO map table

PATCH In review Nishanth Menon 2 participants 4 messages Jun 22, 2015 – Jul 16, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: DRA7: Provide proper IO map table

DRA7 uses OMAP5 IO table at the moment. This is purely spurious since the OMAP5 and DRA7 register maps are different in many aspects.

AM57xx/DRA7 TRM Reference: http://www.ti.com/lit/ug/spruhz6/spruhz6.pdf

NOTE: Most of the drivers are already doing ioremap, so, there should'nt be any functional improvement involved here, other than making the initial iotable more accurate.

Fixes a3a9384a1157 ("ARM: DRA7: Reuse io tables and add a new .init_early")

---

NOTE: there are a few >80c checkpatch warnings in this patch, which i decided to ignore since it helps readability of the macros and overall code formatting already used in the header.

Baseline: v4.1
Test (boot):

	AM57xx-BeagleBoard-X15: http://pastebin.ubuntu.com/11757238/
	DRA72x Evm: http://pastebin.ubuntu.com/11757252/
	DRA74x Evm: http://pastebin.ubuntu.com/11757259/
 arch/arm/mach-omap2/board-generic.c |    4 +--
 arch/arm/mach-omap2/common.h        |    1 +
 arch/arm/mach-omap2/io.c            |   58 ++++++++++++++++++++++++++++++--
 arch/arm/mach-omap2/iomap.h         |   63 +++++++++++++++++++++++++++++++++++
 arch/arm/mach-omap2/omap54xx.h      |    8 +++++
 5 files changed, 130 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/board-generic.c +2 -2
index 34ff14b7beab..b4fbe50672a3 100644
@@ -297,7 +297,7 @@ static const char *const dra74x_boards_compat[] __initconst = {
 DT_MACHINE_START(DRA74X_DT, "Generic DRA74X (Flattened Device Tree)")
 	.reserve	= omap_reserve,
 	.smp		= smp_ops(omap4_smp_ops),
-	.map_io		= omap5_map_io,
+	.map_io		= dra7xx_map_io,
 	.init_early	= dra7xx_init_early,
 	.init_late	= dra7xx_init_late,
 	.init_irq	= omap_gic_of_init,
@@ -316,7 +316,7 @@ static const char *const dra72x_boards_compat[] __initconst = {
 
 DT_MACHINE_START(DRA72X_DT, "Generic DRA72X (Flattened Device Tree)")
 	.reserve	= omap_reserve,
-	.map_io		= omap5_map_io,
+	.map_io		= dra7xx_map_io,
 	.init_early	= dra7xx_init_early,
 	.init_late	= dra7xx_init_late,
 	.init_irq	= omap_gic_of_init,
arch/arm/mach-omap2/common.h +1 -0
index cf3cf22ecd42..749d50bb4ca5 100644
@@ -198,6 +198,7 @@ void __init omap3_map_io(void);
 void __init am33xx_map_io(void);
 void __init omap4_map_io(void);
 void __init omap5_map_io(void);
+void __init dra7xx_map_io(void);
 void __init ti81xx_map_io(void);
 
 /**
arch/arm/mach-omap2/io.c +56 -2

81 lines not on this page · raw message

arch/arm/mach-omap2/iomap.h +63 -0

66 lines not on this page · raw message

arch/arm/mach-omap2/omap54xx.h +8 -0
index 2d35c5709408..0ca8e938096b 100644
@@ -30,6 +30,14 @@
 #define OMAP54XX_CTRL_BASE		0x4a002800
 #define OMAP54XX_SAR_RAM_BASE		0x4ae26000
 
+/* DRA7 specific base addresses */
+#define L3_MAIN_SN_DRA7XX_BASE		0x44000000
+#define L4_PER1_DRA7XX_BASE		0x48000000
+#define L4_CFG_MPU_DRA7XX_BASE		0x48210000
+#define L4_PER2_DRA7XX_BASE		0x48400000
+#define L4_PER3_DRA7XX_BASE		0x48800000
+#define L4_CFG_DRA7XX_BASE		0x4A000000
+#define L4_WKUP_DRA7XX_BASE		0x4ae00000
 #define DRA7XX_CM_CORE_AON_BASE		0x4a005000
 #define DRA7XX_CTRL_BASE		0x4a003400
 #define DRA7XX_TAP_BASE			0x4ae0c000
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 11 lines · Nishanth Menon

DRA7 uses OMAP5 IO table at the moment. This is purely spurious since the OMAP5 and DRA7 register maps are different in many aspects.

AM57xx/DRA7 TRM Reference: http://www.ti.com/lit/ug/spruhz6/spruhz6.pdf

NOTE: Most of the drivers are already doing ioremap, so, there should'nt be any functional improvement involved here, other than making the initial iotable more accurate.

Fixes a3a9384a1157 ("ARM: DRA7: Reuse io tables and add a new .init_early")

Is this needed for v4.2-rc or can this wait for v4.3 merge window?

Regards,

Tony

#2 lore raw
Quoted 6 lines · Tony Lindgren
Quoted 5 lines · Nishanth Menon

DRA7 uses OMAP5 IO table at the moment. This is purely spurious since the OMAP5 and DRA7 register maps are different in many aspects.

AM57xx/DRA7 TRM Reference: http://www.ti.com/lit/ug/spruhz6/spruhz6.pdf

Quoted 8 lines
Quoted 6 lines

NOTE: Most of the drivers are already doing ioremap, so, there should'nt be any functional improvement involved here, other than making the initial iotable more accurate.

Fixes a3a9384a1157 ("ARM: DRA7: Reuse io tables and add a new .init_early")

Is this needed for v4.2-rc or can this wait for v4.3 merge window?

It can wait till 4.3 for sure. there is no known functional issue traced to this.

Signature · 2 lines
Regards,
Nishanth Menon
maintainer
#3 lore raw
Quoted 11 lines · Nishanth Menon
Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Nishanth Menon

DRA7 uses OMAP5 IO table at the moment. This is purely spurious since the OMAP5 and DRA7 register maps are different in many aspects.

AM57xx/DRA7 TRM Reference: http://www.ti.com/lit/ug/spruhz6/spruhz6.pdf

NOTE: Most of the drivers are already doing ioremap, so, there should'nt be any functional improvement involved here, other than making the initial iotable more accurate.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Fixes a3a9384a1157 ("ARM: DRA7: Reuse io tables and add a new .init_early")

Is this needed for v4.2-rc or can this wait for v4.3 merge window?

It can wait till 4.3 for sure. there is no known functional issue traced to this.

OK thanks applying into omap-for-v4.3/soc.

Tony