public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Clean up omap24xx.h symbolic constants
@ 2007-05-21 22:59 Paul Walmsley
  2007-05-21 22:59 ` [PATCH 1/5] omap2: modify omap24xx.h to improve constant names and prepare for multi-arch kernels Paul Walmsley
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Paul Walmsley @ 2007-05-21 22:59 UTC (permalink / raw)
  To: linux-omap-open-source

These patches clean up the symbolic constants defined in
include/asm-arm/arch-omap/omap24xx.h.  The names of some constants,
like OMAP24XX_SDRC_BASE, denote that their values are the same on all
OMAP24XX platforms.  This isn't so - the constant is defined to
different values depending on the Kconfig architecture parameters.
Also, we'd eventually like to create kernels that can be used on
both 2420 or 2430, with runtime CPU detection.  These types of
defines prevent that from happening.

Fix these defines by explicitly defining separate constants for both
architectures, when the values are different.  Use ifdefs to control
which value is assigned to the "base name" of the constant.

So, to continue the example above, the OMAP24XX_SDRC_BASE constant
will be removed, and replaced with two defines: OMAP2420_SDRC_BASE and
OMAP243X_SDRC_BASE.  Depending on which CONFIG_ARCH_OMAP* Kconfig
parameter is specified, we then set an OMAP_SDRC_BASE define to point
to one of the two architecture-specific values.

These patches are necessary prerequisites for the forthcoming PRCM
cleanup series.


- Paul

-- 

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

* [PATCH 1/5] omap2: modify omap24xx.h to improve constant names and prepare for multi-arch kernels
  2007-05-21 22:59 [PATCH 0/5] Clean up omap24xx.h symbolic constants Paul Walmsley
@ 2007-05-21 22:59 ` Paul Walmsley
  2007-05-21 22:59 ` [PATCH 2/5] omap2: use OMAP2_32KSYNCT_BASE in place of OMAP24XX_32KSYNCT_BASE Paul Walmsley
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2007-05-21 22:59 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: 0001-omap2-modify-omap24xx.h-to-improve-constant-names-a.patch --]
[-- Type: text/plain, Size: 5669 bytes --]

Redo the defines in omap24xx.h to fix poorly-named defines, such as
OMAP24XX_SDRC_BASE, which is different between 2420 and 2430.  Also,
prepare for future multi-architecture kernels by removing the
architecture prefixes from several of the defines.  (Presumably in the
future these will be assigned to 'static void __iomem *'s by runtime
init code depending on the CPU type.)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 include/asm-arm/arch-omap/entry-macro.S |    2 
 include/asm-arm/arch-omap/io.h          |    6 +-
 include/asm-arm/arch-omap/omap24xx.h    |   74 +++++++++++++++++++++-----------
 3 files changed, 53 insertions(+), 29 deletions(-)

Index: linux-omap/include/asm-arm/arch-omap/io.h
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/io.h
+++ linux-omap/include/asm-arm/arch-omap/io.h
@@ -95,13 +95,13 @@
 #define io_v2p(va)	((va) - IO_OFFSET)	/* Works for L3 and L4 */
 
 /* DSP */
-#define DSP_MEM_24XX_PHYS	OMAP24XX_DSP_MEM_BASE	/* 0x58000000 */
+#define DSP_MEM_24XX_PHYS	OMAP2420_DSP_MEM_BASE	/* 0x58000000 */
 #define DSP_MEM_24XX_VIRT	0xe0000000
 #define DSP_MEM_24XX_SIZE	0x28000
-#define DSP_IPI_24XX_PHYS	OMAP24XX_DSP_IPI_BASE	/* 0x59000000 */
+#define DSP_IPI_24XX_PHYS	OMAP2420_DSP_IPI_BASE	/* 0x59000000 */
 #define DSP_IPI_24XX_VIRT	0xe1000000
 #define DSP_IPI_24XX_SIZE	SZ_4K
-#define DSP_MMU_24XX_PHYS	OMAP24XX_DSP_MMU_BASE	/* 0x5a000000 */
+#define DSP_MMU_24XX_PHYS	OMAP2420_DSP_MMU_BASE	/* 0x5a000000 */
 #define DSP_MMU_24XX_VIRT	0xe2000000
 #define DSP_MMU_24XX_SIZE	SZ_4K
 
Index: linux-omap/include/asm-arm/arch-omap/omap24xx.h
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/omap24xx.h
+++ linux-omap/include/asm-arm/arch-omap/omap24xx.h
@@ -13,46 +13,70 @@
 
 /* interrupt controller */
 #define OMAP24XX_IC_BASE	(L4_24XX_BASE + 0xfe000)
-#define VA_IC_BASE		IO_ADDRESS(OMAP24XX_IC_BASE)
 #define OMAP24XX_IVA_INTC_BASE	0x40000000
 #define IRQ_SIR_IRQ		0x0040
 
 #define OMAP24XX_CONTROL_STATUS	(L4_24XX_BASE + 0x2f8)
 
-#ifdef CONFIG_ARCH_OMAP2420
-#define OMAP24XX_32KSYNCT_BASE	(L4_24XX_BASE + 0x4000)
-#define OMAP24XX_PRCM_BASE	(L4_24XX_BASE + 0x8000)
-#define OMAP24XX_SDRC_BASE	(L3_24XX_BASE + 0x9000)
-#define OMAP24XX_CTRL_BASE	L4_24XX_BASE
-#endif
+#define OMAP2420_CTRL_BASE	L4_24XX_BASE
+#define OMAP2420_32KSYNCT_BASE	(L4_24XX_BASE + 0x4000)
+#define OMAP2420_PRCM_BASE	(L4_24XX_BASE + 0x8000)
+#define OMAP2420_SDRC_BASE	(L3_24XX_BASE + 0x9000)
+#define OMAP2420_SMS_BASE	0x68008000
+
+#define OMAP2430_32KSYNCT_BASE	(L4_WK_243X_BASE + 0x20000)
+#define OMAP2430_PRCM_BASE	(L4_WK_243X_BASE + 0x6000)
 
-#ifdef CONFIG_ARCH_OMAP2430
-#define OMAP24XX_32KSYNCT_BASE	(L4_WK_243X_BASE + 0x20000)
-#define OMAP24XX_PRCM_BASE	(L4_WK_243X_BASE + 0x6000)
 #define OMAP243X_SMS_BASE	0x6C000000
-#define OMAP24XX_SDRC_BASE	0x6D000000
+#define OMAP243X_SDRC_BASE	0x6D000000
 #define OMAP243X_GPMC_BASE	0x6E000000
 #define OMAP243X_SCM_BASE	(L4_WK_243X_BASE + 0x2000)
-#define OMAP24XX_CTRL_BASE	OMAP243X_SCM_BASE
+#define OMAP243X_CTRL_BASE	OMAP243X_SCM_BASE
 #define OMAP243X_HS_BASE	(L4_24XX_BASE + 0x000ac000)
-#endif
 
 /* DSP SS */
-#ifdef CONFIG_ARCH_OMAP2420
-#define OMAP24XX_DSP_BASE	0x58000000
-#define OMAP24XX_DSP_MEM_BASE	(OMAP24XX_DSP_BASE + 0x0)
-#define OMAP24XX_DSP_IPI_BASE	(OMAP24XX_DSP_BASE + 0x1000000)
-#define OMAP24XX_DSP_MMU_BASE	(OMAP24XX_DSP_BASE + 0x2000000)
-#endif
-
-#ifdef CONFIG_ARCH_OMAP2430
-#define OMAP24XX_DSP_BASE	0x5C000000
-#define OMAP24XX_DSP_MEM_BASE	(OMAP24XX_DSP_BASE + 0x0)
-#define OMAP24XX_DSP_MMU_BASE	(OMAP24XX_DSP_BASE + 0x1000000)
-#endif
+#define OMAP2420_DSP_BASE	0x58000000
+#define OMAP2420_DSP_MEM_BASE	(OMAP2420_DSP_BASE + 0x0)
+#define OMAP2420_DSP_IPI_BASE	(OMAP2420_DSP_BASE + 0x1000000)
+#define OMAP2420_DSP_MMU_BASE	(OMAP2420_DSP_BASE + 0x2000000)
+
+#define OMAP243X_DSP_BASE	0x5C000000
+#define OMAP243X_DSP_MEM_BASE	(OMAP243X_DSP_BASE + 0x0)
+#define OMAP243X_DSP_MMU_BASE	(OMAP243X_DSP_BASE + 0x1000000)
 
 /* Mailbox */
 #define OMAP24XX_MAILBOX_BASE	(L4_24XX_BASE + 0x94000)
 
+
+#if defined(CONFIG_ARCH_OMAP2420)
+
+#define OMAP2_32KSYNCT_BASE	OMAP2420_32KSYNCT_BASE
+#define OMAP2_PRCM_BASE		OMAP2420_PRCM_BASE
+#define OMAP2_SDRC_BASE		OMAP2420_SDRC_BASE
+#define OMAP2_SMS_BASE		OMAP2420_SMS_BASE
+#define OMAP2_L4_BASE		L4_24XX_BASE
+#define OMAP2_VA_IC_BASE	IO_ADDRESS(OMAP24XX_IC_BASE)
+#define OMAP2_CTRL_BASE		OMAP2420_CTRL_BASE
+
+#elif defined(CONFIG_ARCH_OMAP2430)
+
+#define OMAP2_32KSYNCT_BASE	OMAP2430_32KSYNCT_BASE
+#define OMAP2_PRCM_BASE		OMAP2430_PRCM_BASE
+#define OMAP2_SDRC_BASE		OMAP243X_SDRC_BASE
+#define OMAP2_SMS_BASE		OMAP243X_SMS_BASE
+#define OMAP2_L4_BASE		L4_24XX_BASE
+#define OMAP2_VA_IC_BASE	IO_ADDRESS(OMAP24XX_IC_BASE)
+#define OMAP2_CTRL_BASE		OMAP243X_CTRL_BASE
+
+#else
+#error "Unknown architecture"
+#endif
+
+/* Temporary defines to be cleaned up in following patches */
+#define OMAP24XX_32KSYNCT_BASE	OMAP2_32KSYNCT_BASE
+#define OMAP24XX_SDRC_BASE	OMAP2_SDRC_BASE
+#define OMAP24XX_PRCM_BASE	OMAP2_PRCM_BASE
+#define OMAP24XX_CTRL_BASE	OMAP2_CTRL_BASE
+
 #endif /* __ASM_ARCH_OMAP24XX_H */
 
Index: linux-omap/include/asm-arm/arch-omap/entry-macro.S
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/entry-macro.S
+++ linux-omap/include/asm-arm/arch-omap/entry-macro.S
@@ -68,7 +68,7 @@
 		.endm
 
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\base, =VA_IC_BASE
+		ldr	\base, =OMAP2_VA_IC_BASE
 		ldr	\irqnr, [\base, #0x98] /* IRQ pending reg 1 */
 		cmp	\irqnr, #0x0
 		bne	2222f

-- 

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

* [PATCH 2/5] omap2: use OMAP2_32KSYNCT_BASE in place of OMAP24XX_32KSYNCT_BASE
  2007-05-21 22:59 [PATCH 0/5] Clean up omap24xx.h symbolic constants Paul Walmsley
  2007-05-21 22:59 ` [PATCH 1/5] omap2: modify omap24xx.h to improve constant names and prepare for multi-arch kernels Paul Walmsley
@ 2007-05-21 22:59 ` Paul Walmsley
  2007-05-21 22:59 ` [PATCH 3/5] omap2: use OMAP2_PRCM_BASE in place of OMAP24XX_PRCM_BASE Paul Walmsley
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2007-05-21 22:59 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: 0002-omap2-use-OMAP2_32KSYNCT_BASE-in-place-of-OMAP24XX_.patch --]
[-- Type: text/plain, Size: 3201 bytes --]

Change users of OMAP24XX_32KSYNCT_BASE to use OMAP2_32KSYNCT_BASE, in
preparation to remove OMAP24XX_32KSYNCT_BASE.  Convert the 32K sync timer
reference in pm.c to use a symbolic constant rather than a magic number.
Remove the OMAP24XX_32KSYNCT_BASE define.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/pm.c             |    2 +-
 arch/arm/mach-omap2/sram-fn.S        |    2 +-
 arch/arm/plat-omap/common.c          |    2 +-
 arch/arm/plat-omap/timer32k.c        |    2 +-
 include/asm-arm/arch-omap/omap24xx.h |    1 -
 5 files changed, 4 insertions(+), 5 deletions(-)

Index: linux-omap/arch/arm/mach-omap2/pm.c
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/pm.c
+++ linux-omap/arch/arm/mach-omap2/pm.c
@@ -158,7 +158,7 @@ static inline u32 prcm_read_reg(int idx)
 
 static u32 omap2_read_32k_sync_counter(void)
 {
-        return omap_readl(0x48004010);
+        return omap_readl(OMAP2_32KSYNCT_BASE + 0x0010);
 }
 
 #ifdef CONFIG_PM_DEBUG
Index: linux-omap/arch/arm/mach-omap2/sram-fn.S
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/sram-fn.S
+++ linux-omap/arch/arm/mach-omap2/sram-fn.S
@@ -29,7 +29,7 @@
 
 #include "prcm-regs.h"
 
-#define TIMER_32KSYNCT_CR_V	IO_ADDRESS(OMAP24XX_32KSYNCT_BASE + 0x010)
+#define TIMER_32KSYNCT_CR_V	IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
 
 #define CM_CLKSEL2_PLL_V	IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x544)
 #define PRCM_VOLTCTRL_V		IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x050)
Index: linux-omap/arch/arm/plat-omap/common.c
===================================================================
--- linux-omap.orig/arch/arm/plat-omap/common.c
+++ linux-omap/arch/arm/plat-omap/common.c
@@ -192,7 +192,7 @@ console_initcall(omap_add_serial_console
 #if defined(CONFIG_ARCH_OMAP16XX)
 #define TIMER_32K_SYNCHRONIZED		0xfffbc410
 #elif defined(CONFIG_ARCH_OMAP24XX)
-#define TIMER_32K_SYNCHRONIZED		(OMAP24XX_32KSYNCT_BASE + 0x10)
+#define TIMER_32K_SYNCHRONIZED		(OMAP2_32KSYNCT_BASE + 0x10)
 #endif
 
 #ifdef	TIMER_32K_SYNCHRONIZED
Index: linux-omap/arch/arm/plat-omap/timer32k.c
===================================================================
--- linux-omap.orig/arch/arm/plat-omap/timer32k.c
+++ linux-omap/arch/arm/plat-omap/timer32k.c
@@ -71,7 +71,7 @@ struct sys_timer omap_timer;
 #if defined(CONFIG_ARCH_OMAP16XX)
 #define TIMER_32K_SYNCHRONIZED		0xfffbc410
 #elif defined(CONFIG_ARCH_OMAP24XX)
-#define TIMER_32K_SYNCHRONIZED		(OMAP24XX_32KSYNCT_BASE + 0x10)
+#define TIMER_32K_SYNCHRONIZED		(OMAP2_32KSYNCT_BASE + 0x10)
 #else
 #error OMAP 32KHz timer does not currently work on 15XX!
 #endif
Index: linux-omap/include/asm-arm/arch-omap/omap24xx.h
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/omap24xx.h
+++ linux-omap/include/asm-arm/arch-omap/omap24xx.h
@@ -73,7 +73,6 @@
 #endif
 
 /* Temporary defines to be cleaned up in following patches */
-#define OMAP24XX_32KSYNCT_BASE	OMAP2_32KSYNCT_BASE
 #define OMAP24XX_SDRC_BASE	OMAP2_SDRC_BASE
 #define OMAP24XX_PRCM_BASE	OMAP2_PRCM_BASE
 #define OMAP24XX_CTRL_BASE	OMAP2_CTRL_BASE

-- 

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

* [PATCH 3/5] omap2: use OMAP2_PRCM_BASE in place of OMAP24XX_PRCM_BASE
  2007-05-21 22:59 [PATCH 0/5] Clean up omap24xx.h symbolic constants Paul Walmsley
  2007-05-21 22:59 ` [PATCH 1/5] omap2: modify omap24xx.h to improve constant names and prepare for multi-arch kernels Paul Walmsley
  2007-05-21 22:59 ` [PATCH 2/5] omap2: use OMAP2_32KSYNCT_BASE in place of OMAP24XX_32KSYNCT_BASE Paul Walmsley
@ 2007-05-21 22:59 ` Paul Walmsley
  2007-05-21 22:59 ` [PATCH 4/5] omap2: use OMAP2_SDRC_BASE in place of OMAP24XX_SDRC_BASE Paul Walmsley
  2007-05-21 22:59 ` [PATCH 5/5] omap2: use OMAP2_CTRL_BASE in place of OMAP24XX_CTRL_BASE Paul Walmsley
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2007-05-21 22:59 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: 0003-omap2-use-OMAP2_PRCM_BASE-in-place-of-OMAP24XX_PRCM.patch --]
[-- Type: text/plain, Size: 3744 bytes --]

Change users of OMAP24XX_PRCM_BASE to use OMAP2_PRCM_BASE.  Remove
the OMAP24XX_PRCM_BASE define.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/mmu.c            |    3 ++-
 arch/arm/mach-omap2/pm.c             |    2 +-
 arch/arm/mach-omap2/prcm-regs.h      |    2 +-
 arch/arm/mach-omap2/sram-fn.S        |   12 ++++++------
 include/asm-arm/arch-omap/omap24xx.h |    1 -
 5 files changed, 10 insertions(+), 10 deletions(-)

Index: linux-omap/arch/arm/mach-omap2/mmu.c
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/mmu.c
+++ linux-omap/arch/arm/mach-omap2/mmu.c
@@ -96,7 +96,8 @@ static int exmap_setup_preserved_entries
 
 	exmap_setup_preserved_mem_page(mmu, dspvect_page, DSP_INIT_PAGE, n++);
 
-	exmap_setup_iomap_page(mmu, OMAP24XX_PRCM_BASE, 0x7000, n++);
+	/* REVISIT: This will need to be revisited for 3430 */
+	exmap_setup_iomap_page(mmu, OMAP2_PRCM_BASE, 0x7000, n++);
 	exmap_setup_iomap_page(mmu, OMAP24XX_MAILBOX_BASE, 0x11000, n++);
 
 	if (cpu_is_omap2420()) {
Index: linux-omap/arch/arm/mach-omap2/pm.c
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/pm.c
+++ linux-omap/arch/arm/mach-omap2/pm.c
@@ -144,7 +144,7 @@ static void (*omap2_sram_idle)(void);
 static void (*omap2_sram_suspend)(int dllctrl);
 static void (*saved_idle)(void);
 
-static u32 prcm_base = IO_ADDRESS(OMAP24XX_PRCM_BASE);
+static u32 prcm_base = IO_ADDRESS(OMAP2_PRCM_BASE);
 
 static inline void prcm_write_reg(int idx, u32 val)
 {
Index: linux-omap/arch/arm/mach-omap2/prcm-regs.h
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/prcm-regs.h
+++ linux-omap/arch/arm/mach-omap2/prcm-regs.h
@@ -29,7 +29,7 @@
 
 #ifndef __ASSEMBLER__
 
-#define PRCM_REG32(offset)	__REG32(OMAP24XX_PRCM_BASE + (offset))
+#define PRCM_REG32(offset)	__REG32(OMAP2_PRCM_BASE + (offset))
 
 #define PRCM_REVISION		PRCM_REG32(0x000)
 #define PRCM_SYSCONFIG		PRCM_REG32(0x010)
Index: linux-omap/arch/arm/mach-omap2/sram-fn.S
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/sram-fn.S
+++ linux-omap/arch/arm/mach-omap2/sram-fn.S
@@ -31,12 +31,12 @@
 
 #define TIMER_32KSYNCT_CR_V	IO_ADDRESS(OMAP2_32KSYNCT_BASE + 0x010)
 
-#define CM_CLKSEL2_PLL_V	IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x544)
-#define PRCM_VOLTCTRL_V		IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x050)
-#define PRCM_CLKCFG_CTRL_V	IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x080)
-#define CM_CLKEN_PLL_V		IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x500)
-#define CM_IDLEST_CKGEN_V	IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x520)
-#define CM_CLKSEL1_PLL_V	IO_ADDRESS(OMAP24XX_PRCM_BASE + 0x540)
+#define CM_CLKSEL2_PLL_V	IO_ADDRESS(OMAP2_PRCM_BASE + 0x544)
+#define PRCM_VOLTCTRL_V		IO_ADDRESS(OMAP2_PRCM_BASE + 0x050)
+#define PRCM_CLKCFG_CTRL_V	IO_ADDRESS(OMAP2_PRCM_BASE + 0x080)
+#define CM_CLKEN_PLL_V		IO_ADDRESS(OMAP2_PRCM_BASE + 0x500)
+#define CM_IDLEST_CKGEN_V	IO_ADDRESS(OMAP2_PRCM_BASE + 0x520)
+#define CM_CLKSEL1_PLL_V	IO_ADDRESS(OMAP2_PRCM_BASE + 0x540)
 
 #define SDRC_DLLA_CTRL_V	IO_ADDRESS(OMAP24XX_SDRC_BASE + 0x060)
 #define SDRC_RFR_CTRL_V		IO_ADDRESS(OMAP24XX_SDRC_BASE + 0x0a4)
Index: linux-omap/include/asm-arm/arch-omap/omap24xx.h
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/omap24xx.h
+++ linux-omap/include/asm-arm/arch-omap/omap24xx.h
@@ -74,7 +74,6 @@
 
 /* Temporary defines to be cleaned up in following patches */
 #define OMAP24XX_SDRC_BASE	OMAP2_SDRC_BASE
-#define OMAP24XX_PRCM_BASE	OMAP2_PRCM_BASE
 #define OMAP24XX_CTRL_BASE	OMAP2_CTRL_BASE
 
 #endif /* __ASM_ARCH_OMAP24XX_H */

-- 

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

* [PATCH 4/5] omap2: use OMAP2_SDRC_BASE in place of OMAP24XX_SDRC_BASE
  2007-05-21 22:59 [PATCH 0/5] Clean up omap24xx.h symbolic constants Paul Walmsley
                   ` (2 preceding siblings ...)
  2007-05-21 22:59 ` [PATCH 3/5] omap2: use OMAP2_PRCM_BASE in place of OMAP24XX_PRCM_BASE Paul Walmsley
@ 2007-05-21 22:59 ` Paul Walmsley
  2007-05-21 22:59 ` [PATCH 5/5] omap2: use OMAP2_CTRL_BASE in place of OMAP24XX_CTRL_BASE Paul Walmsley
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2007-05-21 22:59 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: 0004-omap2-use-OMAP2_SDRC_BASE-in-place-of-OMAP24XX_SDRC.patch --]
[-- Type: text/plain, Size: 4534 bytes --]

Change users of OMAP24XX_SDRC_BASE to use OMAP2_SDRC_BASE.  Remove the
OMAP24XX_SDRC_BASE define.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/prcm-regs.h      |   14 +++++++-------
 arch/arm/mach-omap2/sleep.S          |   10 ++++++----
 arch/arm/mach-omap2/sram-fn.S        |    4 ++--
 include/asm-arm/arch-omap/io.h       |    2 +-
 include/asm-arm/arch-omap/omap24xx.h |    1 -
 5 files changed, 16 insertions(+), 15 deletions(-)

Index: linux-omap/arch/arm/mach-omap2/prcm-regs.h
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/prcm-regs.h
+++ linux-omap/arch/arm/mach-omap2/prcm-regs.h
@@ -199,7 +199,7 @@
 #define UART1_SYSCONFIG		__REG32(OMAP24XX_L4_IO_BASE + 0x6A054)
 #define UART2_SYSCONFIG		__REG32(OMAP24XX_L4_IO_BASE + 0x6C054)
 #define UART3_SYSCONFIG		__REG32(OMAP24XX_L4_IO_BASE + 0x6E054)
-#define SDRC_SYSCONFIG		__REG32(OMAP24XX_SDRC_BASE + 0x10)
+#define SDRC_SYSCONFIG		__REG32(OMAP2_SDRC_BASE + 0x10)
 #define OMAP24XX_SMS_BASE	(L3_24XX_BASE + 0x8000)
 #define SMS_SYSCONFIG		__REG32(OMAP24XX_SMS_BASE + 0x10)
 #define SSI_SYSCONFIG		__REG32(DISP_BASE + 0x8010)
@@ -263,12 +263,12 @@
 #define GPTIMER3_TISR		__REG32(OMAP24XX_L4_IO_BASE + 0x78018)
 
 /* SDRC */
-#define SDRC_DLLA_CTRL		__REG32(OMAP24XX_SDRC_BASE + 0x060)
-#define SDRC_DLLA_STATUS	__REG32(OMAP24XX_SDRC_BASE + 0x064)
-#define SDRC_DLLB_CTRL		__REG32(OMAP24XX_SDRC_BASE + 0x068)
-#define SDRC_DLLB_STATUS	__REG32(OMAP24XX_SDRC_BASE + 0x06C)
-#define SDRC_POWER		__REG32(OMAP24XX_SDRC_BASE + 0x070)
-#define SDRC_MR_0		__REG32(OMAP24XX_SDRC_BASE + 0x084)
+#define SDRC_DLLA_CTRL		__REG32(OMAP2_SDRC_BASE + 0x060)
+#define SDRC_DLLA_STATUS	__REG32(OMAP2_SDRC_BASE + 0x064)
+#define SDRC_DLLB_CTRL		__REG32(OMAP2_SDRC_BASE + 0x068)
+#define SDRC_DLLB_STATUS	__REG32(OMAP2_SDRC_BASE + 0x06C)
+#define SDRC_POWER		__REG32(OMAP2_SDRC_BASE + 0x070)
+#define SDRC_MR_0		__REG32(OMAP2_SDRC_BASE + 0x084)
 
 /* GPIO 1 */
 #define GPIO1_BASE		GPIOX_BASE(1)
Index: linux-omap/arch/arm/mach-omap2/sleep.S
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/sleep.S
+++ linux-omap/arch/arm/mach-omap2/sleep.S
@@ -30,11 +30,13 @@
 #include <asm/arch/io.h>
 #include <asm/arch/pm.h>
 
-#define A_SDRC_DLLA_CTRL_V	IO_ADDRESS(OMAP24XX_SDRC_BASE+0x60)
-#define	A_SDRC_POWER_V		IO_ADDRESS(OMAP24XX_SDRC_BASE+0x70)
-#define A_SDRC_RFR_CTRL_V	IO_ADDRESS(OMAP24XX_SDRC_BASE+0xA4)
+#include <asm/arch/omap24xx.h>
+
+#define A_SDRC_DLLA_CTRL_V	IO_ADDRESS(OMAP2_SDRC_BASE + 0x60)
+#define	A_SDRC_POWER_V		IO_ADDRESS(OMAP2_SDRC_BASE + 0x70)
+#define A_SDRC_RFR_CTRL_V	IO_ADDRESS(OMAP2_SDRC_BASE + 0xA4)
 #define A_SDRC0_V		(0xC0000000)
-#define A_SDRC_MANUAL_V		IO_ADDRESS(OMAP24XX_SDRC_BASE+0xA8)
+#define A_SDRC_MANUAL_V		IO_ADDRESS(OMAP2_SDRC_BASE + 0xA8)
 
 	.text
 
Index: linux-omap/arch/arm/mach-omap2/sram-fn.S
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/sram-fn.S
+++ linux-omap/arch/arm/mach-omap2/sram-fn.S
@@ -38,8 +38,8 @@
 #define CM_IDLEST_CKGEN_V	IO_ADDRESS(OMAP2_PRCM_BASE + 0x520)
 #define CM_CLKSEL1_PLL_V	IO_ADDRESS(OMAP2_PRCM_BASE + 0x540)
 
-#define SDRC_DLLA_CTRL_V	IO_ADDRESS(OMAP24XX_SDRC_BASE + 0x060)
-#define SDRC_RFR_CTRL_V		IO_ADDRESS(OMAP24XX_SDRC_BASE + 0x0a4)
+#define SDRC_DLLA_CTRL_V	IO_ADDRESS(OMAP2_SDRC_BASE + 0x060)
+#define SDRC_RFR_CTRL_V		IO_ADDRESS(OMAP2_SDRC_BASE + 0x0a4)
 
 	.text
 
Index: linux-omap/include/asm-arm/arch-omap/io.h
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/io.h
+++ linux-omap/include/asm-arm/arch-omap/io.h
@@ -80,7 +80,7 @@
 #define OMAP243X_GPMC_PHYS	OMAP243X_GPMC_BASE	/* 0x49000000 */
 #define OMAP243X_GPMC_VIRT	0xFE000000
 #define OMAP243X_GPMC_SIZE	SZ_1M
-#define OMAP243X_SDRC_PHYS	OMAP24XX_SDRC_BASE
+#define OMAP243X_SDRC_PHYS	OMAP243X_SDRC_BASE
 #define OMAP243X_SDRC_VIRT	0xFD000000
 #define OMAP243X_SDRC_SIZE	SZ_1M
 #define OMAP243X_SMS_PHYS	OMAP243X_SMS_BASE
Index: linux-omap/include/asm-arm/arch-omap/omap24xx.h
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/omap24xx.h
+++ linux-omap/include/asm-arm/arch-omap/omap24xx.h
@@ -73,7 +73,6 @@
 #endif
 
 /* Temporary defines to be cleaned up in following patches */
-#define OMAP24XX_SDRC_BASE	OMAP2_SDRC_BASE
 #define OMAP24XX_CTRL_BASE	OMAP2_CTRL_BASE
 
 #endif /* __ASM_ARCH_OMAP24XX_H */

-- 

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

* [PATCH 5/5] omap2: use OMAP2_CTRL_BASE in place of OMAP24XX_CTRL_BASE
  2007-05-21 22:59 [PATCH 0/5] Clean up omap24xx.h symbolic constants Paul Walmsley
                   ` (3 preceding siblings ...)
  2007-05-21 22:59 ` [PATCH 4/5] omap2: use OMAP2_SDRC_BASE in place of OMAP24XX_SDRC_BASE Paul Walmsley
@ 2007-05-21 22:59 ` Paul Walmsley
  4 siblings, 0 replies; 6+ messages in thread
From: Paul Walmsley @ 2007-05-21 22:59 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: 0005-omap2-use-OMAP2_CTRL_BASE-in-place-of-OMAP24XX_CTRL.patch --]
[-- Type: text/plain, Size: 2296 bytes --]

Change users of OMAP24XX_CTRL_BASE to use OMAP2_CTRL_BASE.  Remove the
OMAP24XX_CTRL_BASE define.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/prcm-regs.h      |    2 +-
 arch/arm/plat-omap/mux.c             |    6 +++---
 include/asm-arm/arch-omap/omap24xx.h |    3 ---
 3 files changed, 4 insertions(+), 7 deletions(-)

Index: linux-omap/arch/arm/mach-omap2/prcm-regs.h
===================================================================
--- linux-omap.orig/arch/arm/mach-omap2/prcm-regs.h
+++ linux-omap/arch/arm/mach-omap2/prcm-regs.h
@@ -350,7 +350,7 @@
 #endif
 
 /* IO CONFIG */
-#define CONTROL_REG32(offset)		__REG32(OMAP24XX_CTRL_BASE + (offset))
+#define CONTROL_REG32(offset)		__REG32(OMAP2_CTRL_BASE + (offset))
 #define CONTROL_PADCONF_SPI1_NCS2	CONTROL_REG32(0x104)
 #define CONTROL_PADCONF_SYS_XTALOUT	CONTROL_REG32(0x134)
 #define CONTROL_PADCONF_UART1_RX	CONTROL_REG32(0x0C8)
Index: linux-omap/arch/arm/plat-omap/mux.c
===================================================================
--- linux-omap.orig/arch/arm/plat-omap/mux.c
+++ linux-omap/arch/arm/plat-omap/mux.c
@@ -85,7 +85,7 @@ int __init_or_module omap_cfg_reg(const 
 			reg |= OMAP24XX_PULL_UP;
 #if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
 		{
-			u8 orig = omap_readb(OMAP24XX_CTRL_BASE + cfg->mux_reg);
+			u8 orig = omap_readb(OMAP2_CTRL_BASE + cfg->mux_reg);
 			u8 debug = 0;
 
 #ifdef	CONFIG_OMAP_MUX_DEBUG
@@ -95,11 +95,11 @@ int __init_or_module omap_cfg_reg(const 
 			if (debug || warn)
 				printk("MUX: setup %s (0x%08x): 0x%02x -> 0x%02x\n",
 						cfg->name,
-						OMAP24XX_CTRL_BASE + cfg->mux_reg,
+						OMAP2_CTRL_BASE + cfg->mux_reg,
 						orig, reg);
 		}
 #endif
-		omap_writeb(reg, OMAP24XX_CTRL_BASE + cfg->mux_reg);
+		omap_writeb(reg, OMAP2_CTRL_BASE + cfg->mux_reg);
 
 		return 0;
 	}
Index: linux-omap/include/asm-arm/arch-omap/omap24xx.h
===================================================================
--- linux-omap.orig/include/asm-arm/arch-omap/omap24xx.h
+++ linux-omap/include/asm-arm/arch-omap/omap24xx.h
@@ -72,8 +72,5 @@
 #error "Unknown architecture"
 #endif
 
-/* Temporary defines to be cleaned up in following patches */
-#define OMAP24XX_CTRL_BASE	OMAP2_CTRL_BASE
-
 #endif /* __ASM_ARCH_OMAP24XX_H */
 

-- 

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

end of thread, other threads:[~2007-05-21 22:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 22:59 [PATCH 0/5] Clean up omap24xx.h symbolic constants Paul Walmsley
2007-05-21 22:59 ` [PATCH 1/5] omap2: modify omap24xx.h to improve constant names and prepare for multi-arch kernels Paul Walmsley
2007-05-21 22:59 ` [PATCH 2/5] omap2: use OMAP2_32KSYNCT_BASE in place of OMAP24XX_32KSYNCT_BASE Paul Walmsley
2007-05-21 22:59 ` [PATCH 3/5] omap2: use OMAP2_PRCM_BASE in place of OMAP24XX_PRCM_BASE Paul Walmsley
2007-05-21 22:59 ` [PATCH 4/5] omap2: use OMAP2_SDRC_BASE in place of OMAP24XX_SDRC_BASE Paul Walmsley
2007-05-21 22:59 ` [PATCH 5/5] omap2: use OMAP2_CTRL_BASE in place of OMAP24XX_CTRL_BASE Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox