Skip to contentSkip to conversation

More omap header clean-up for the merge window after 2.6.30

PATCH In review Tony Lindgren 2 participants 10 messages May 14, 2009 – May 28, 2009

Subsystems (5)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover More omap header clean-up for the merge window after 2.6.30

Hi,

This series removes defines that are included from hardware.h via various processor specific headers. The series makes the defines processor specific where possible so they don't trigger recompile and cause blocks for multi-omap booting.

After this series, pretty much the only remaining problem code is the clock24xx.h that should have clock registers set dynamically for 2420 and 2430. This series just makes the problem defines local to clock24xx.h.

Regards,

Tony

---

Tony Lindgren (5):
ARM: OMAP2/3: Remove OMAP_CM_REGADDR
ARM: OMAP2/3: Remove OMAP2_PRCM_BASE
ARM: OMAP2/3: Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S
ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE
ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE

 arch/arm/mach-omap2/clock.c                   |    4 
 arch/arm/mach-omap2/clock24xx.c               |   21 +--
 arch/arm/mach-omap2/clock24xx.h               |   11 +
 arch/arm/mach-omap2/clock34xx.h               |    2 
 arch/arm/mach-omap2/cm.h                      |    6 -
 arch/arm/mach-omap2/prm.h                     |  205 +++++++++++++++----------
 arch/arm/mach-omap2/sdrc2xxx.c                |    5 -
 arch/arm/mach-omap2/sram242x.S                |   10 +
 arch/arm/mach-omap2/sram243x.S                |   10 +
 arch/arm/plat-omap/common.c                   |   69 +++++++-
 arch/arm/plat-omap/include/mach/entry-macro.S |    9 +
 arch/arm/plat-omap/include/mach/omap24xx.h    |   18 --
 arch/arm/plat-omap/include/mach/omap34xx.h    |    9 -
 13 files changed, 232 insertions(+), 147 deletions(-)
Signature · 1 line
Signature
author maintainer
#1 lore raw

PATCH 1/5 ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE

Use processor specific defines instead.

As an extra bonus, this patch fixes the problem of CONFIG_DEBUG_SPINLOCK calling sched_clock before we have things initialized:

http://patchwork.kernel.org/patch/15810/

---
 arch/arm/mach-omap2/sram242x.S             |    4 +-
 arch/arm/mach-omap2/sram243x.S             |    4 +-
 arch/arm/plat-omap/common.c                |   69 ++++++++++++++++++++++++----
 arch/arm/plat-omap/include/mach/omap24xx.h |    2 -
 arch/arm/plat-omap/include/mach/omap34xx.h |    1 
 5 files changed, 62 insertions(+), 18 deletions(-)
arch/arm/mach-omap2/sram242x.S +2 -2
index af4bd34..cbb8930 100644
@@ -128,7 +128,7 @@ omap242x_sdi_prcm_voltctrl:
 prcm_mask_val:
 	.word 0xFFFF3FFC
 omap242x_sdi_timer_32ksynct_cr:
-	.word IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
+	.word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
 ENTRY(omap242x_sram_ddr_init_sz)
 	.word	. - omap242x_sram_ddr_init
 
@@ -224,7 +224,7 @@ omap242x_srs_prcm_voltctrl:
 ddr_prcm_mask_val:
 	.word 0xFFFF3FFC
 omap242x_srs_timer_32ksynct:
-	.word IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
+	.word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010)
 
 ENTRY(omap242x_sram_reprogram_sdrc_sz)
 	.word	. - omap242x_sram_reprogram_sdrc
arch/arm/mach-omap2/sram243x.S +2 -2
index 84363e2..054b0f3 100644
@@ -128,7 +128,7 @@ omap243x_sdi_prcm_voltctrl:
 prcm_mask_val:
 	.word 0xFFFF3FFC
 omap243x_sdi_timer_32ksynct_cr:
-	.word IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
+	.word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)
 ENTRY(omap243x_sram_ddr_init_sz)
 	.word	. - omap243x_sram_ddr_init
 
@@ -224,7 +224,7 @@ omap243x_srs_prcm_voltctrl:
 ddr_prcm_mask_val:
 	.word 0xFFFF3FFC
 omap243x_srs_timer_32ksynct:
-	.word IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
+	.word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010)
 
 ENTRY(omap243x_sram_reprogram_sdrc_sz)
 	.word	. - omap243x_sram_reprogram_sdrc
arch/arm/plat-omap/common.c +58 -11

103 lines not on this page · raw message

arch/arm/plat-omap/include/mach/omap24xx.h +0 -2
index 24335d4..4202cf4 100644
@@ -87,7 +87,6 @@
 
 #if defined(CONFIG_ARCH_OMAP2420)
 
-#define OMAP2_32KSYNCT_BASE	OMAP2420_32KSYNCT_BASE
 #define OMAP2_PRCM_BASE		OMAP2420_PRCM_BASE
 #define OMAP2_CM_BASE		OMAP2420_CM_BASE
 #define OMAP2_PRM_BASE		OMAP2420_PRM_BASE
@@ -95,7 +94,6 @@
 
 #elif defined(CONFIG_ARCH_OMAP2430)
 
-#define OMAP2_32KSYNCT_BASE	OMAP2430_32KSYNCT_BASE
 #define OMAP2_PRCM_BASE		OMAP2430_PRCM_BASE
 #define OMAP2_CM_BASE		OMAP2430_CM_BASE
 #define OMAP2_PRM_BASE		OMAP2430_PRM_BASE
arch/arm/plat-omap/include/mach/omap34xx.h +0 -1
index ab64015..581d910 100644
@@ -85,7 +85,6 @@
 
 #if defined(CONFIG_ARCH_OMAP3430)
 
-#define OMAP2_32KSYNCT_BASE		OMAP3430_32KSYNCT_BASE
 #define OMAP2_CM_BASE			OMAP3430_CM_BASE
 #define OMAP2_PRM_BASE			OMAP3430_PRM_BASE
 #define OMAP2_VA_IC_BASE		IO_ADDRESS(OMAP34XX_IC_BASE)
#2 lore raw

Re: [PATCH 1/5] ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE

Quoted 4 lines · Tony Lindgren

Use processor specific defines instead.

As an extra bonus, this patch fixes the problem of CONFIG_DEBUG_SPINLOCK calling sched_clock before we have things initialized:

Hmm. I don't think sched_clock peculiarities should be handed by the clock source implementation.

This is really a generic kernel bug: lots of ARM architecture sched_clock implementations can not be called before things like IO memory has been setup - and that's something that mainline people have been made aware of repeatedly, and they've fixed the problems when they've come up.

Moreover, the issue of using clocksources for sched_clock is being discussed on the main ARM lists, with the possibility of the generic kernel-wide sched_clock implementation being based upon clock sources.

Whether that changes anything with this patch, I'm not entirely sure.

author maintainer
#3 lore raw

Re: [PATCH 1/5] ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE

Quoted 6 lines · Russell King - ARM Linux
Quoted 4 lines · Tony Lindgren

Use processor specific defines instead.

As an extra bonus, this patch fixes the problem of CONFIG_DEBUG_SPINLOCK calling sched_clock before we have things initialized:

Quoted 7 lines

Hmm. I don't think sched_clock peculiarities should be handed by the clock source implementation.

This is really a generic kernel bug: lots of ARM architecture sched_clock implementations can not be called before things like IO memory has been setup - and that's something that mainline people have been made aware of repeatedly, and they've fixed the problems when they've come up.

Yeah agreed.

Quoted 5 lines

Moreover, the issue of using clocksources for sched_clock is being discussed on the main ARM lists, with the possibility of the generic kernel-wide sched_clock implementation being based upon clock sources.

Whether that changes anything with this patch, I'm not entirely sure.

The clocksource and sched_clock thing is a separate issue, this patch is still needed to remove the conflicting defines.

Tony

author maintainer
#4 lore raw

PATCH 2/5 ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE

In reply to Tony Lindgren

Remove OMAP_PRM_REGADDR and use processor specific defines instead.

Also fold in a patch from Kevin Hilman to add _OFFSET #defines for the PRCM registers to be used with the prm_[read|write]_* macros. These are used extensively in the forthcoming OMAP PM support.

Also remove now unused OMAP2_PRM_BASE.

---
 arch/arm/mach-omap2/clock.c                |    4 -
 arch/arm/mach-omap2/clock24xx.c            |   21 ++-
 arch/arm/mach-omap2/clock24xx.h            |    9 +
 arch/arm/mach-omap2/cm.h                   |    1 
 arch/arm/mach-omap2/prm.h                  |  205 +++++++++++++++++-----------
 arch/arm/mach-omap2/sdrc2xxx.c             |    5 +
 arch/arm/mach-omap2/sram242x.S             |    6 -
 arch/arm/mach-omap2/sram243x.S             |    6 -
 arch/arm/plat-omap/include/mach/omap24xx.h |    2 
 arch/arm/plat-omap/include/mach/omap34xx.h |    1 
 10 files changed, 160 insertions(+), 100 deletions(-)
arch/arm/mach-omap2/clock.c +2 -2
index 4247a15..dd37483 100644
@@ -91,9 +91,9 @@ static void _omap2xxx_clk_commit(struct clk *clk)
 		return;
 
 	prm_write_mod_reg(OMAP24XX_VALID_CONFIG, OMAP24XX_GR_MOD,
-		OMAP24XX_PRCM_CLKCFG_CTRL_OFFSET);
+		OMAP2_PRCM_CLKCFG_CTRL_OFFSET);
 	/* OCP barrier */
-	prm_read_mod_reg(OMAP24XX_GR_MOD, OMAP24XX_PRCM_CLKCFG_CTRL_OFFSET);
+	prm_read_mod_reg(OMAP24XX_GR_MOD, OMAP2_PRCM_CLKCFG_CTRL_OFFSET);
 }
 
 /*
arch/arm/mach-omap2/clock24xx.c +12 -9
index e4cef33..c442fe9 100644
@@ -233,6 +233,8 @@ static struct prcm_config *curr_prcm_set;
 static struct clk *vclk;
 static struct clk *sclk;
 
+static void __iomem *prcm_clksrc_ctrl;
+
 /*-------------------------------------------------------------------------
  * Omap24xx specific clock functions
  *-------------------------------------------------------------------------*/
@@ -269,10 +271,9 @@ static int omap2_enable_osc_ck(struct clk *clk)
 {
 	u32 pcc;
 
-	pcc = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
+	pcc = __raw_readl(prcm_clksrc_ctrl);
 
-	__raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK,
-		      OMAP24XX_PRCM_CLKSRC_CTRL);
+	__raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
 
 	return 0;
 }
@@ -281,10 +282,9 @@ static void omap2_disable_osc_ck(struct clk *clk)
 {
 	u32 pcc;
 
-	pcc = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
+	pcc = __raw_readl(prcm_clksrc_ctrl);
 
-	__raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK,
-		      OMAP24XX_PRCM_CLKSRC_CTRL);
+	__raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
 }
 
 static const struct clkops clkops_oscck = {
@@ -654,7 +654,7 @@ static u32 omap2_get_sysclkdiv(void)
 {
 	u32 div;
 
-	div = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL);
+	div = __raw_readl(prcm_clksrc_ctrl);
 	div &= OMAP_SYSCLKDIV_MASK;
 	div >>= OMAP_SYSCLKDIV_SHIFT;
 
@@ -714,10 +714,13 @@ int __init omap2_clk_init(void)
 	struct omap_clk *c;
 	u32 clkrate;
 
-	if (cpu_is_omap242x())
+	if (cpu_is_omap242x()) {
+		prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL;
 		cpu_mask = RATE_IN_242X;
-	else if (cpu_is_omap2430())
+	} else if (cpu_is_omap2430()) {
+		prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL;
 		cpu_mask = RATE_IN_243X;
+	}
 
 	clk_init(&omap2_clk_functions);
 
arch/arm/mach-omap2/clock24xx.h +9 -0
index 88c5acb..f0e4480 100644
@@ -24,6 +24,15 @@
 #include "cm-regbits-24xx.h"
 #include "sdrc.h"
 
+/* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
+#ifdef CONFIG_ARCH_OMAP2420
+#define OMAP24XX_PRCM_CLKOUT_CTRL	OMAP2420_PRCM_CLKOUT_CTRL
+#define OMAP24XX_PRCM_CLKEMUL_CTRL	OMAP2420_PRCM_CLKEMUL_CTRL
+#else
+#define OMAP24XX_PRCM_CLKOUT_CTRL	OMAP2430_PRCM_CLKOUT_CTRL
+#define OMAP24XX_PRCM_CLKEMUL_CTRL	OMAP2430_PRCM_CLKEMUL_CTRL
+#endif
+
 static unsigned long omap2_table_mpu_recalc(struct clk *clk);
 static int omap2_select_table_rate(struct clk *clk, unsigned long rate);
 static long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
arch/arm/mach-omap2/cm.h +1 -0
index 65fdf78..efc082a 100644
@@ -38,6 +38,7 @@
 #define OMAP3430_CM_SYSCONFIG		OMAP_CM_REGADDR(OCP_MOD, 0x0010)
 #define OMAP3430_CM_POLCTRL		OMAP_CM_REGADDR(OCP_MOD, 0x009c)
 
+#define OMAP3_CM_CLKOUT_CTRL_OFFSET	0x0070
 #define OMAP3430_CM_CLKOUT_CTRL		OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070)
 
 /*
arch/arm/mach-omap2/prm.h +126 -79

223 lines not on this page · raw message

arch/arm/mach-omap2/sdrc2xxx.c +4 -1
index 0afdad5..feaec7e 100644
@@ -99,7 +99,10 @@ u32 omap2xxx_sdrc_reprogram(u32 level, u32 force)
 	m_type = omap2xxx_sdrc_get_type();
 
 	local_irq_save(flags);
-	__raw_writel(0xffff, OMAP24XX_PRCM_VOLTSETUP);
+	if (cpu_is_omap2420())
+		__raw_writel(0xffff, OMAP2420_PRCM_VOLTSETUP);
+	else
+		__raw_writel(0xffff, OMAP2430_PRCM_VOLTSETUP);
 	omap2_sram_reprogram_sdrc(level, dll_ctrl, m_type);
 	curr_perf_level = level;
 	local_irq_restore(flags);
arch/arm/mach-omap2/sram242x.S +3 -3
index cbb8930..bb29985 100644
@@ -124,7 +124,7 @@ omap242x_sdi_cm_clksel2_pll:
 omap242x_sdi_sdrc_dlla_ctrl:
 	.word OMAP242X_SDRC_REGADDR(SDRC_DLLA_CTRL)
 omap242x_sdi_prcm_voltctrl:
-	.word OMAP242X_PRCM_VOLTCTRL
+	.word OMAP2420_PRCM_VOLTCTRL
 prcm_mask_val:
 	.word 0xFFFF3FFC
 omap242x_sdi_timer_32ksynct_cr:
@@ -220,7 +220,7 @@ omap242x_srs_sdrc_dlla_ctrl:
 omap242x_srs_sdrc_rfr_ctrl:
 	.word OMAP242X_SDRC_REGADDR(SDRC_RFR_CTRL_0)
 omap242x_srs_prcm_voltctrl:
-	.word OMAP242X_PRCM_VOLTCTRL
+	.word OMAP2420_PRCM_VOLTCTRL
 ddr_prcm_mask_val:
 	.word 0xFFFF3FFC
 omap242x_srs_timer_32ksynct:
@@ -305,7 +305,7 @@ wait_dll_lock:
 	ldmfd	sp!, {r0-r12, pc}	@ restore regs and return
 
 omap242x_ssp_set_config:
-	.word OMAP242X_PRCM_CLKCFG_CTRL
+	.word OMAP2420_PRCM_CLKCFG_CTRL
 omap242x_ssp_pll_ctl:
 	.word OMAP2420_CM_REGADDR(PLL_MOD, CM_CLKEN)
 omap242x_ssp_pll_stat:
arch/arm/mach-omap2/sram243x.S +3 -3
index 054b0f3..9955abc 100644
@@ -124,7 +124,7 @@ omap243x_sdi_cm_clksel2_pll:
 omap243x_sdi_sdrc_dlla_ctrl:
 	.word OMAP243X_SDRC_REGADDR(SDRC_DLLA_CTRL)
 omap243x_sdi_prcm_voltctrl:
-	.word OMAP243X_PRCM_VOLTCTRL
+	.word OMAP2430_PRCM_VOLTCTRL
 prcm_mask_val:
 	.word 0xFFFF3FFC
 omap243x_sdi_timer_32ksynct_cr:
@@ -220,7 +220,7 @@ omap243x_srs_sdrc_dlla_ctrl:
 omap243x_srs_sdrc_rfr_ctrl:
 	.word OMAP243X_SDRC_REGADDR(SDRC_RFR_CTRL_0)
 omap243x_srs_prcm_voltctrl:
-	.word OMAP243X_PRCM_VOLTCTRL
+	.word OMAP2430_PRCM_VOLTCTRL
 ddr_prcm_mask_val:
 	.word 0xFFFF3FFC
 omap243x_srs_timer_32ksynct:
@@ -305,7 +305,7 @@ wait_dll_lock:
 	ldmfd	sp!, {r0-r12, pc}	@ restore regs and return
 
 omap243x_ssp_set_config:
-	.word OMAP243X_PRCM_CLKCFG_CTRL
+	.word OMAP2430_PRCM_CLKCFG_CTRL
 omap243x_ssp_pll_ctl:
 	.word OMAP2430_CM_REGADDR(PLL_MOD, CM_CLKEN)
 omap243x_ssp_pll_stat:
arch/arm/plat-omap/include/mach/omap24xx.h +0 -2
index 4202cf4..10a6413 100644
@@ -89,14 +89,12 @@
 
 #define OMAP2_PRCM_BASE		OMAP2420_PRCM_BASE
 #define OMAP2_CM_BASE		OMAP2420_CM_BASE
-#define OMAP2_PRM_BASE		OMAP2420_PRM_BASE
 #define OMAP2_VA_IC_BASE	IO_ADDRESS(OMAP24XX_IC_BASE)
 
 #elif defined(CONFIG_ARCH_OMAP2430)
 
 #define OMAP2_PRCM_BASE		OMAP2430_PRCM_BASE
 #define OMAP2_CM_BASE		OMAP2430_CM_BASE
-#define OMAP2_PRM_BASE		OMAP2430_PRM_BASE
 #define OMAP2_VA_IC_BASE	IO_ADDRESS(OMAP24XX_IC_BASE)
 
 #endif
arch/arm/plat-omap/include/mach/omap34xx.h +0 -1
index 581d910..4233064 100644
@@ -86,7 +86,6 @@
 #if defined(CONFIG_ARCH_OMAP3430)
 
 #define OMAP2_CM_BASE			OMAP3430_CM_BASE
-#define OMAP2_PRM_BASE			OMAP3430_PRM_BASE
 #define OMAP2_VA_IC_BASE		IO_ADDRESS(OMAP34XX_IC_BASE)
 
 #endif
author maintainer
#5 lore raw

PATCH 3/5 ARM: OMAP2/3: Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S

In reply to Tony Lindgren

Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S

---
 arch/arm/plat-omap/include/mach/entry-macro.S |    9 ++++++---
 arch/arm/plat-omap/include/mach/omap24xx.h    |    2 --
 arch/arm/plat-omap/include/mach/omap34xx.h    |    1 -
 3 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/plat-omap/include/mach/entry-macro.S +6 -3
index 2276f89..33256a0 100644
@@ -58,11 +58,14 @@
 #endif
 #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
 
-#if defined(CONFIG_ARCH_OMAP24XX)
 #include <mach/omap24xx.h>
-#endif
-#if defined(CONFIG_ARCH_OMAP34XX)
 #include <mach/omap34xx.h>
+
+/* REVISIT: This should be set dynamically if CONFIG_MULTI_OMAP2 is selected */
+#if defined(CONFIG_ARCH_OMAP2420) || defined(CONFIG_ARCH_OMAP2430)
+#define OMAP2_VA_IC_BASE		IO_ADDRESS(OMAP24XX_IC_BASE)
+#elif defined(CONFIG_ARCH_OMAP34XX)
+#define OMAP2_VA_IC_BASE		IO_ADDRESS(OMAP34XX_IC_BASE)
 #endif
 
 #define INTCPS_SIR_IRQ_OFFSET	0x0040		/* Active interrupt offset */
arch/arm/plat-omap/include/mach/omap24xx.h +0 -2
index 10a6413..4ce9b6a 100644
@@ -89,13 +89,11 @@
 
 #define OMAP2_PRCM_BASE		OMAP2420_PRCM_BASE
 #define OMAP2_CM_BASE		OMAP2420_CM_BASE
-#define OMAP2_VA_IC_BASE	IO_ADDRESS(OMAP24XX_IC_BASE)
 
 #elif defined(CONFIG_ARCH_OMAP2430)
 
 #define OMAP2_PRCM_BASE		OMAP2430_PRCM_BASE
 #define OMAP2_CM_BASE		OMAP2430_CM_BASE
-#define OMAP2_VA_IC_BASE	IO_ADDRESS(OMAP24XX_IC_BASE)
 
 #endif
 
arch/arm/plat-omap/include/mach/omap34xx.h +0 -1
index 4233064..36c99ca 100644
@@ -86,7 +86,6 @@
 #if defined(CONFIG_ARCH_OMAP3430)
 
 #define OMAP2_CM_BASE			OMAP3430_CM_BASE
-#define OMAP2_VA_IC_BASE		IO_ADDRESS(OMAP34XX_IC_BASE)
 
 #endif
 
author maintainer
#6 lore raw

PATCH 4/5 ARM: OMAP2/3: Remove OMAP2_PRCM_BASE

In reply to Tony Lindgren

It's currently unused, and processor specific defines should be used instead.

---
 arch/arm/plat-omap/include/mach/omap24xx.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/mach/omap24xx.h +0 -2
index 4ce9b6a..60f8324 100644
@@ -87,12 +87,10 @@
 
 #if defined(CONFIG_ARCH_OMAP2420)
 
-#define OMAP2_PRCM_BASE		OMAP2420_PRCM_BASE
 #define OMAP2_CM_BASE		OMAP2420_CM_BASE
 
 #elif defined(CONFIG_ARCH_OMAP2430)
 
-#define OMAP2_PRCM_BASE		OMAP2430_PRCM_BASE
 #define OMAP2_CM_BASE		OMAP2430_CM_BASE
 
 #endif
author maintainer
#7 lore raw

PATCH 5/5 ARM: OMAP2/3: Remove OMAP_CM_REGADDR

In reply to Tony Lindgren

Processor specific macros should be used instead.

---
 arch/arm/mach-omap2/clock24xx.h            |    2 ++
 arch/arm/mach-omap2/clock34xx.h            |    2 ++
 arch/arm/mach-omap2/cm.h                   |    5 -----
 arch/arm/plat-omap/include/mach/omap24xx.h |   10 ----------
 arch/arm/plat-omap/include/mach/omap34xx.h |    6 ------
 5 files changed, 4 insertions(+), 21 deletions(-)
arch/arm/mach-omap2/clock24xx.h +2 -0
index f0e4480..458f00c 100644
@@ -26,9 +26,11 @@
 
 /* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
 #ifdef CONFIG_ARCH_OMAP2420
+#define OMAP_CM_REGADDR			OMAP2420_CM_REGADDR
 #define OMAP24XX_PRCM_CLKOUT_CTRL	OMAP2420_PRCM_CLKOUT_CTRL
 #define OMAP24XX_PRCM_CLKEMUL_CTRL	OMAP2420_PRCM_CLKEMUL_CTRL
 #else
+#define OMAP_CM_REGADDR			OMAP2430_CM_REGADDR
 #define OMAP24XX_PRCM_CLKOUT_CTRL	OMAP2430_PRCM_CLKOUT_CTRL
 #define OMAP24XX_PRCM_CLKEMUL_CTRL	OMAP2430_PRCM_CLKEMUL_CTRL
 #endif
arch/arm/mach-omap2/clock34xx.h +2 -0
index 017a30e..496f0e9 100644
@@ -27,6 +27,8 @@
 #include "prm.h"
 #include "prm-regbits-34xx.h"
 
+#define OMAP_CM_REGADDR		OMAP34XX_CM_REGADDR
+
 static unsigned long omap3_dpll_recalc(struct clk *clk);
 static unsigned long omap3_clkoutx2_recalc(struct clk *clk);
 static void omap3_dpll_allow_idle(struct clk *clk);
arch/arm/mach-omap2/cm.h +0 -5
index efc082a..1d3c93b 100644
@@ -16,17 +16,12 @@
 
 #include "prcm-common.h"
 
-#ifndef __ASSEMBLER__
-#define OMAP_CM_REGADDR(module, reg)					\
-			IO_ADDRESS(OMAP2_CM_BASE + (module) + (reg))
-#else
 #define OMAP2420_CM_REGADDR(module, reg)				\
 			IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
 #define OMAP2430_CM_REGADDR(module, reg)				\
 			IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
 #define OMAP34XX_CM_REGADDR(module, reg)				\
 			IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
-#endif
 
 /*
  * Architecture-specific global CM registers
arch/arm/plat-omap/include/mach/omap24xx.h +0 -10
index 60f8324..696edfc 100644
@@ -85,15 +85,5 @@
 #define OMAP24XX_SEC_AES_BASE	(OMAP24XX_SEC_BASE + 0x6000)
 #define OMAP24XX_SEC_PKA_BASE	(OMAP24XX_SEC_BASE + 0x8000)
 
-#if defined(CONFIG_ARCH_OMAP2420)
-
-#define OMAP2_CM_BASE		OMAP2420_CM_BASE
-
-#elif defined(CONFIG_ARCH_OMAP2430)
-
-#define OMAP2_CM_BASE		OMAP2430_CM_BASE
-
-#endif
-
 #endif /* __ASM_ARCH_OMAP24XX_H */
 
arch/arm/plat-omap/include/mach/omap34xx.h +0 -6
index 36c99ca..cc25733 100644
@@ -83,12 +83,6 @@
 
 #define OMAP34XX_MAILBOX_BASE		(L4_34XX_BASE + 0x94000)
 
-#if defined(CONFIG_ARCH_OMAP3430)
-
-#define OMAP2_CM_BASE			OMAP3430_CM_BASE
-
-#endif
-
 #define OMAP34XX_DSP_BASE	0x58000000
 #define OMAP34XX_DSP_MEM_BASE	(OMAP34XX_DSP_BASE + 0x0)
 #define OMAP34XX_DSP_IPI_BASE	(OMAP34XX_DSP_BASE + 0x1000000)
author maintainer
#8 lore raw
In reply to Tony Lindgren
Quoted 11 lines · Tony Lindgren

Hi,

This series removes defines that are included from hardware.h via various processor specific headers. The series makes the defines processor specific where possible so they don't trigger recompile and cause blocks for multi-omap booting.

After this series, pretty much the only remaining problem code is the clock24xx.h that should have clock registers set dynamically for 2420 and 2430. This series just makes the problem defines local to clock24xx.h.

If no comments, I'll add these to the omap for-next branch to wait for the merge window.

Tony

Quoted 36 lines

Regards,

Tony

---

Tony Lindgren (5):
ARM: OMAP2/3: Remove OMAP_CM_REGADDR
ARM: OMAP2/3: Remove OMAP2_PRCM_BASE
ARM: OMAP2/3: Move define of OMAP2_VA_IC_BASE to be local to entry-macro.S
ARM: OMAP2/3: Remove OMAP_PRM_REGADDR and OMAP2_PRM_BASE
ARM: OMAP2/3: Remove OMAP2_32KSYNCT_BASE

 arch/arm/mach-omap2/clock.c                   |    4 
 arch/arm/mach-omap2/clock24xx.c               |   21 +--
 arch/arm/mach-omap2/clock24xx.h               |   11 +
 arch/arm/mach-omap2/clock34xx.h               |    2 
 arch/arm/mach-omap2/cm.h                      |    6 -
 arch/arm/mach-omap2/prm.h                     |  205 +++++++++++++++----------
 arch/arm/mach-omap2/sdrc2xxx.c                |    5 -
 arch/arm/mach-omap2/sram242x.S                |   10 +
 arch/arm/mach-omap2/sram243x.S                |   10 +
 arch/arm/plat-omap/common.c                   |   69 +++++++-
 arch/arm/plat-omap/include/mach/entry-macro.S |    9 +
 arch/arm/plat-omap/include/mach/omap24xx.h    |   18 --
 arch/arm/plat-omap/include/mach/omap34xx.h    |    9 -
 13 files changed, 232 insertions(+), 147 deletions(-)
Signature · 5 lines
Signature
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#9 lore raw
Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Tony Lindgren

Hi,

This series removes defines that are included from hardware.h via various processor specific headers. The series makes the defines processor specific where possible so they don't trigger recompile and cause blocks for multi-omap booting.

Quoted 7 lines
Quoted 4 lines

After this series, pretty much the only remaining problem code is the clock24xx.h that should have clock registers set dynamically for 2420 and 2430. This series just makes the problem defines local to clock24xx.h.

If no comments, I'll add these to the omap for-next branch to wait for the merge window.

Apart from the first patch, no further comments.