Omap header cleanup for upcoming 2.6.32 merge window
Subsystems (10)
Tony Lindgren
maintainercover Omap header cleanup for upcoming 2.6.32 merge window
Hi all,
Here are few patches for the upcoming merge window to remove unnecessary ifdeffery in the header files.
We should get these merged early to avoid merge conflicts with other patchsets.
Regards,
Tony
---
Tony Lindgren (3):
OMAP: Remove ifdefs for io.h
OMAP: Rename OMAP_MPUIO_BASE to OMAP1_MPUIO_BASE
OMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS instead
arch/arm/mach-omap1/devices.c | 2 - arch/arm/mach-omap1/io.c | 6 +- arch/arm/mach-omap1/pm.h | 4 + arch/arm/mach-omap1/serial.c | 6 +- arch/arm/mach-omap1/sram.S | 12 ++- arch/arm/mach-omap1/time.c | 4 + arch/arm/mach-omap2/board-4430sdp.c | 4 + arch/arm/mach-omap2/cm.h | 6 +- arch/arm/mach-omap2/omap-smp.c | 2 - arch/arm/mach-omap2/pm-debug.c | 2 - arch/arm/mach-omap2/prm.h | 6 +- arch/arm/mach-omap2/sdrc.h | 6 +- arch/arm/mach-omap2/serial.c | 6 +- arch/arm/mach-omap2/sram242x.S | 4 + arch/arm/mach-omap2/sram243x.S | 4 + arch/arm/mach-omap2/timer-gp.c | 2 - arch/arm/plat-omap/dma.c | 8 +- arch/arm/plat-omap/dmtimer.c | 5 + arch/arm/plat-omap/gpio.c | 88 +++++++++++------------ arch/arm/plat-omap/include/mach/control.h | 12 ++- arch/arm/plat-omap/include/mach/entry-macro.S | 8 +- arch/arm/plat-omap/include/mach/gpio.h | 2 - arch/arm/plat-omap/include/mach/io.h | 97 ++++++++++++------------- arch/arm/plat-omap/include/mach/mtd-xip.h | 2 - arch/arm/plat-omap/include/mach/omap44xx.h | 8 +- arch/arm/plat-omap/include/mach/sdrc.h | 6 +- arch/arm/plat-omap/io.c | 62 +++++++++++++++- arch/arm/plat-omap/sram.c | 20 +++-- drivers/input/keyboard/omap-keypad.c | 22 +++--- drivers/mtd/nand/ams-delta.c | 8 +- drivers/video/omap/dispc.c | 6 +- 31 files changed, 245 insertions(+), 185 deletions(-)
Signature · 1 line
Signature
Tony Lindgren
maintainerPATCH 1/3 OMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS instead
Search and replace OMAP_IO_ADDRESS with OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS, and convert omap_read/write into a functions instead of a macros.
Also rename OMAP_MPUIO_VBASE to OMAP1_MPUIO_VBASE.
In the long run, most code should use ioremap + __raw_read/write instead.
--- arch/arm/mach-omap1/devices.c | 2 - arch/arm/mach-omap1/pm.h | 4 + arch/arm/mach-omap1/serial.c | 6 +- arch/arm/mach-omap1/sram.S | 12 ++- arch/arm/mach-omap1/time.c | 4 + arch/arm/mach-omap2/board-4430sdp.c | 4 + arch/arm/mach-omap2/cm.h | 6 +- arch/arm/mach-omap2/omap-smp.c | 2 - arch/arm/mach-omap2/pm-debug.c | 2 - arch/arm/mach-omap2/prm.h | 6 +- arch/arm/mach-omap2/sdrc.h | 6 +- arch/arm/mach-omap2/serial.c | 6 +- arch/arm/mach-omap2/sram242x.S | 4 + arch/arm/mach-omap2/sram243x.S | 4 + arch/arm/mach-omap2/timer-gp.c | 2 - arch/arm/plat-omap/dma.c | 8 +- arch/arm/plat-omap/dmtimer.c | 5 + arch/arm/plat-omap/gpio.c | 86 +++++++++++++------------ arch/arm/plat-omap/include/mach/control.h | 12 ++- arch/arm/plat-omap/include/mach/entry-macro.S | 8 +- arch/arm/plat-omap/include/mach/io.h | 64 ++++++------------- arch/arm/plat-omap/include/mach/mtd-xip.h | 2 - arch/arm/plat-omap/include/mach/omap44xx.h | 8 +- arch/arm/plat-omap/include/mach/sdrc.h | 6 +- arch/arm/plat-omap/io.c | 58 +++++++++++++++++ arch/arm/plat-omap/sram.c | 20 +++--- drivers/video/omap/dispc.c | 6 +- 27 files changed, 196 insertions(+), 157 deletions(-)
arch/arm/mach-omap1/devices.c +1 -1
@@ -71,7 +71,7 @@ static inline void omap_init_rtc(void) {}# define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1#endif -#define OMAP1_MBOX_BASE IO_ADDRESS(OMAP16XX_MAILBOX_BASE) +#define OMAP1_MBOX_BASE OMAP1_IO_ADDRESS(OMAP16XX_MAILBOX_BASE)static struct resource mbox_resources[] = { {
arch/arm/mach-omap1/pm.h +2 -2
@@ -39,11 +39,11 @@* Register and offset definitions to be used in PM assembler code * ---------------------------------------------------------------------------- */ -#define CLKGEN_REG_ASM_BASE IO_ADDRESS(0xfffece00) +#define CLKGEN_REG_ASM_BASE OMAP1_IO_ADDRESS(0xfffece00)#define ARM_IDLECT1_ASM_OFFSET 0x04#define ARM_IDLECT2_ASM_OFFSET 0x08 -#define TCMIF_ASM_BASE IO_ADDRESS(0xfffecc00) +#define TCMIF_ASM_BASE OMAP1_IO_ADDRESS(0xfffecc00)#define EMIFS_CONFIG_ASM_OFFSET 0x0c#define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20
arch/arm/mach-omap1/serial.c +3 -3
@@ -64,7 +64,7 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p)static struct plat_serial8250_port serial_platform_data[] = { { - .membase =IO_ADDRESS (OMAP_UART1_BASE ), + .membase =OMAP1_IO_ADDRESS (OMAP_UART1_BASE ), .mapbase =OMAP_UART1_BASE , .irq =INT_UART1 , .flags =UPF_BOOT_AUTOCONF ,
@@ -73,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = { .uartclk = OMAP16XX_BASE_BAUD * 16, }, { - .membase = IO_ADDRESS(OMAP_UART2_BASE), + .membase = OMAP1_IO_ADDRESS(OMAP_UART2_BASE), .mapbase = OMAP_UART2_BASE, .irq = INT_UART2, .flags = UPF_BOOT_AUTOCONF,
@@ -82,7 +82,7 @@ static struct plat_serial8250_port serial_platform_data[] = { .uartclk = OMAP16XX_BASE_BAUD * 16, }, { - .membase = IO_ADDRESS(OMAP_UART3_BASE), + .membase = OMAP1_IO_ADDRESS(OMAP_UART3_BASE), .mapbase = OMAP_UART3_BASE, .irq = INT_UART3, .flags = UPF_BOOT_AUTOCONF,
arch/arm/mach-omap1/sram.S +6 -6
@@ -21,13 +21,13 @@ ENTRY(omap1_sram_reprogram_clock) stmfd sp!, {r0 - r12, lr} @ save registers on stack - mov r2, #IO_ADDRESS(DPLL_CTL) & 0xff000000 - orr r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x00ff0000 - orr r2, r2, #IO_ADDRESS(DPLL_CTL) & 0x0000ff00 + mov r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0xff000000 + orr r2, r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0x00ff0000 + orr r2, r2, #OMAP1_IO_ADDRESS(DPLL_CTL) & 0x0000ff00 - mov r3, #IO_ADDRESS(ARM_CKCTL) & 0xff000000 - orr r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x00ff0000 - orr r3, r3, #IO_ADDRESS(ARM_CKCTL) & 0x0000ff00 + mov r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0xff000000 + orr r3, r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0x00ff0000 + orr r3, r3, #OMAP1_IO_ADDRESS(ARM_CKCTL) & 0x0000ff00 tst r0, #1 << 4 @ want lock mode? beq newck @ nope
arch/arm/mach-omap1/time.c +2 -2
@@ -62,8 +62,8 @@ typedef struct {u32 read_tim;/* READ_TIM, R */ } omap_mpu_timer_regs_t; -#define omap_mpu_timer_base (n) \ -((volatile omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ +#define omap_mpu_timer_base (n) \ +((volatile omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ (n)*OMAP_MPU_TIMER_OFFSET))static inline unsigned long omap_mpu_timer_read (int nr)
arch/arm/mach-omap2/board-4430sdp.c +2 -2
@@ -53,8 +53,8 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = {static void __init gic_init_irq (void ) { -gic_dist_init (0 ,IO_ADDRESS (OMAP44XX_GIC_DIST_BASE ),29 ); -gic_cpu_init (0 ,IO_ADDRESS (OMAP44XX_GIC_CPU_BASE )); +gic_dist_init (0 ,OMAP2_IO_ADDRESS (OMAP44XX_GIC_DIST_BASE ),29 ); +gic_cpu_init (0 ,OMAP2_IO_ADDRESS (OMAP44XX_GIC_CPU_BASE )); }static void __init omap_4430sdp_init_irq (void )
arch/arm/mach-omap2/cm.h +3 -3
@@ -17,11 +17,11 @@#include "prcm-common.h" #define OMAP2420_CM_REGADDR (module, reg) \ - IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg)) + OMAP2_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))#define OMAP2430_CM_REGADDR (module, reg) \ - IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg)) + OMAP2_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))#define OMAP34XX_CM_REGADDR (module, reg) \ - IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg)) + OMAP2_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))/* * Architecture-specific global CM registers
arch/arm/mach-omap2/omap-smp.c +1 -1
@@ -54,7 +54,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)* for us: do so */ -gic_cpu_init (0 ,IO_ADDRESS (OMAP44XX_GIC_CPU_BASE )); +gic_cpu_init (0 ,OMAP2_IO_ADDRESS (OMAP44XX_GIC_CPU_BASE ));/* * Synchronise with the boot thread.
arch/arm/mach-omap2/pm-debug.c +1 -1
@@ -48,7 +48,7 @@ int omap2_pm_debug; regs[reg_count++].val = __raw_readl(reg)#define DUMP_INTC_REG (reg, off) \ regs[reg_count].name = #reg; \ - regs[reg_count++].val = __raw_readl(IO_ADDRESS(0x480fe000 + (off))) + regs[reg_count++].val = __raw_readl(OMAP2_IO_ADDRESS(0x480fe000 + (off)))void omap2_pm_dump (int mode,int resume,unsigned int us) {
arch/arm/mach-omap2/prm.h +3 -3
@@ -17,11 +17,11 @@#include "prcm-common.h" #define OMAP2420_PRM_REGADDR (module, reg) \ - IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) + OMAP2_IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg))#define OMAP2430_PRM_REGADDR (module, reg) \ - IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg)) + OMAP2_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg))#define OMAP34XX_PRM_REGADDR (module, reg) \ - IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) + OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg))/* * Architecture-specific global PRM registers
arch/arm/mach-omap2/sdrc.h +3 -3
@@ -48,9 +48,9 @@ static inline u32 sms_read_reg(u16 reg)return __raw_readl (OMAP_SMS_REGADDR (reg)); }#else -#define OMAP242X_SDRC_REGADDR (reg) IO_ADDRESS(OMAP2420_SDRC_BASE + (reg)) -#define OMAP243X_SDRC_REGADDR (reg) IO_ADDRESS(OMAP243X_SDRC_BASE + (reg)) -#define OMAP34XX_SDRC_REGADDR (reg) IO_ADDRESS(OMAP343X_SDRC_BASE + (reg)) +#define OMAP242X_SDRC_REGADDR (reg) OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE + (reg)) +#define OMAP243X_SDRC_REGADDR (reg) OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE + (reg)) +#define OMAP34XX_SDRC_REGADDR (reg) OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE + (reg))#endif /* __ASSEMBLER__ */ #endif
arch/arm/mach-omap2/serial.c +3 -3
@@ -73,7 +73,7 @@ static LIST_HEAD(uart_list);static struct plat_serial8250_port serial_platform_data[] = { { - .membase =IO_ADDRESS (OMAP_UART1_BASE ), + .membase =OMAP2_IO_ADDRESS (OMAP_UART1_BASE ), .mapbase =OMAP_UART1_BASE , .irq =72 , .flags =UPF_BOOT_AUTOCONF ,
@@ -81,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = { .regshift = 2, .uartclk = OMAP24XX_BASE_BAUD * 16, }, { - .membase = IO_ADDRESS(OMAP_UART2_BASE), + .membase = OMAP2_IO_ADDRESS(OMAP_UART2_BASE), .mapbase = OMAP_UART2_BASE, .irq = 73, .flags = UPF_BOOT_AUTOCONF,
@@ -89,7 +89,7 @@ static struct plat_serial8250_port serial_platform_data[] = { .regshift = 2, .uartclk = OMAP24XX_BASE_BAUD * 16, }, { - .membase = IO_ADDRESS(OMAP_UART3_BASE), + .membase = OMAP2_IO_ADDRESS(OMAP_UART3_BASE), .mapbase = OMAP_UART3_BASE, .irq = 74, .flags = UPF_BOOT_AUTOCONF,
arch/arm/mach-omap2/sram242x.S +2 -2
@@ -128,7 +128,7 @@ omap242x_sdi_prcm_voltctrl: prcm_mask_val: .word 0xFFFF3FFC omap242x_sdi_timer_32ksynct_cr: - .word IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) + .word OMAP2_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(OMAP2420_32KSYNCT_BASE + 0x010) + .word OMAP2_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
@@ -128,7 +128,7 @@ omap243x_sdi_prcm_voltctrl: prcm_mask_val: .word 0xFFFF3FFC omap243x_sdi_timer_32ksynct_cr: - .word IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) + .word OMAP2_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(OMAP2430_32KSYNCT_BASE + 0x010) + .word OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) ENTRY(omap243x_sram_reprogram_sdrc_sz) .word . - omap243x_sram_reprogram_sdrc
arch/arm/mach-omap2/timer-gp.c +1 -1
@@ -231,7 +231,7 @@ static void __init omap2_gp_clocksource_init(void)static void __init omap2_gp_timer_init (void ) {#ifdef CONFIG_LOCAL_TIMERS - twd_base =IO_ADDRESS (OMAP44XX_LOCAL_TWD_BASE ); + twd_base =OMAP2_IO_ADDRESS (OMAP44XX_LOCAL_TWD_BASE );#endif omap_dm_timer_init ();
arch/arm/plat-omap/dma.c +4 -4
@@ -2337,16 +2337,16 @@ static int __init omap_init_dma(void)int ch, r;if (cpu_class_is_omap1 ()) { - omap_dma_base =IO_ADDRESS (OMAP1_DMA_BASE ); + omap_dma_base =OMAP1_IO_ADDRESS (OMAP1_DMA_BASE ); dma_lch_count =OMAP1_LOGICAL_DMA_CH_COUNT ; }else if (cpu_is_omap24xx ()) { - omap_dma_base =IO_ADDRESS (OMAP24XX_DMA4_BASE ); + omap_dma_base =OMAP2_IO_ADDRESS (OMAP24XX_DMA4_BASE ); dma_lch_count =OMAP_DMA4_LOGICAL_DMA_CH_COUNT ; }else if (cpu_is_omap34xx ()) { - omap_dma_base =IO_ADDRESS (OMAP34XX_DMA4_BASE ); + omap_dma_base =OMAP2_IO_ADDRESS (OMAP34XX_DMA4_BASE ); dma_lch_count =OMAP_DMA4_LOGICAL_DMA_CH_COUNT ; }else if (cpu_is_omap44xx ()) { - omap_dma_base =IO_ADDRESS (OMAP44XX_DMA4_BASE ); + omap_dma_base =OMAP2_IO_ADDRESS (OMAP44XX_DMA4_BASE ); dma_lch_count =OMAP_DMA4_LOGICAL_DMA_CH_COUNT ; }else {pr_err ("DMA init failed for unsupported omap\n" );
arch/arm/plat-omap/dmtimer.c +4 -1
@@ -774,7 +774,10 @@ int __init omap_dm_timer_init(void)for (i =0 ; i < dm_timer_count; i++) { timer = &dm_timers[i]; - timer->io_base =IO_ADDRESS (timer->phys_base); +if (cpu_class_is_omap1 ()) + timer->io_base =OMAP1_IO_ADDRESS (timer->phys_base); +else + timer->io_base =OMAP2_IO_ADDRESS (timer->phys_base);#if defined(CONFIG_ARCH_OMAP2 ) || defined(CONFIG_ARCH_OMAP3 ) || \ defined(CONFIG_ARCH_OMAP4 )if (cpu_class_is_omap2 ()) {
arch/arm/plat-omap/gpio.c +43 -43
148 lines not on this page · raw message
arch/arm/plat-omap/include/mach/control.h +6 -6
@@ -20,15 +20,15 @@#ifndef __ASSEMBLY__#define OMAP242X_CTRL_REGADDR (reg) \ - IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) + OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))#define OMAP243X_CTRL_REGADDR (reg) \ - IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) + OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg))#define OMAP343X_CTRL_REGADDR (reg) \ - IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) + OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))#else -#define OMAP242X_CTRL_REGADDR (reg) IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) -#define OMAP243X_CTRL_REGADDR (reg) IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) -#define OMAP343X_CTRL_REGADDR (reg) IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) +#define OMAP242X_CTRL_REGADDR (reg) OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) +#define OMAP243X_CTRL_REGADDR (reg) OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) +#define OMAP343X_CTRL_REGADDR (reg) OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))#endif /* __ASSEMBLY__ */ /*
arch/arm/plat-omap/include/mach/entry-macro.S +4 -4
@@ -41,7 +41,7 @@ .endm .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - ldr \base, =IO_ADDRESS(OMAP_IH1_BASE) + ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE) ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] mov \irqstat, #0xffffffff
@@ -53,7 +53,7 @@ cmp \irqnr, #0 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] cmpeq \irqnr, #INT_IH2_IRQ - ldreq \base, =IO_ADDRESS(OMAP_IH2_BASE) + ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] addeqs \irqnr, \irqnr, #32 1510:
@@ -68,9 +68,9 @@ /* 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) +#define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP24XX_IC_BASE) #elif defined(CONFIG_ARCH_OMAP34XX) -#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP34XX_IC_BASE) +#define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP34XX_IC_BASE) #endif #if defined(CONFIG_ARCH_OMAP4) #include <mach/omap44xx.h>
arch/arm/plat-omap/include/mach/io.h +21 -43
98 lines not on this page · raw message
arch/arm/plat-omap/include/mach/mtd-xip.h +1 -1
@@ -25,7 +25,7 @@ typedef struct { } xip_omap_mpu_timer_regs_t;#define xip_omap_mpu_timer_base (n) \ -((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ +((volatile xip_omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ (n)*OMAP_MPU_TIMER_OFFSET))static inline unsigned long xip_omap_mpu_timer_read (int nr)
arch/arm/plat-omap/include/mach/omap44xx.h +4 -4
@@ -33,14 +33,14 @@#define IRQ_SIR_IRQ 0x0040#define OMAP44XX_GIC_DIST_BASE 0x48241000#define OMAP44XX_GIC_CPU_BASE 0x48240100 -#define OMAP44XX_VA_GIC_CPU_BASE IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) +#define OMAP44XX_VA_GIC_CPU_BASE OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)#define OMAP44XX_SCU_BASE 0x48240000 -#define OMAP44XX_VA_SCU_BASE IO_ADDRESS(OMAP44XX_SCU_BASE) +#define OMAP44XX_VA_SCU_BASE OMAP2_IO_ADDRESS(OMAP44XX_SCU_BASE)#define OMAP44XX_LOCAL_TWD_BASE 0x48240600 -#define OMAP44XX_VA_LOCAL_TWD_BASE IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE) +#define OMAP44XX_VA_LOCAL_TWD_BASE OMAP2_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE)#define OMAP44XX_LOCAL_TWD_SIZE 0x00000100#define OMAP44XX_WKUPGEN_BASE 0x48281000 -#define OMAP44XX_VA_WKUPGEN_BASE IO_ADDRESS(OMAP44XX_WKUPGEN_BASE) +#define OMAP44XX_VA_WKUPGEN_BASE OMAP2_IO_ADDRESS(OMAP44XX_WKUPGEN_BASE)#endif /* __ASM_ARCH_OMAP44XX_H */
arch/arm/plat-omap/include/mach/sdrc.h +3 -3
@@ -67,11 +67,11 @@*/ #define OMAP242X_SMS_REGADDR (reg) \ - (void __iomem *)IO_ADDRESS(OMAP2420_SMS_BASE + reg) + (void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE + reg)#define OMAP243X_SMS_REGADDR (reg) \ - (void __iomem *)IO_ADDRESS(OMAP243X_SMS_BASE + reg) + (void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE + reg)#define OMAP343X_SMS_REGADDR (reg) \ - (void __iomem *)IO_ADDRESS(OMAP343X_SMS_BASE + reg) + (void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE + reg)/* SMS register offsets - read/write with sms_{read,write}_reg() */
arch/arm/plat-omap/io.c +58 -0
61 lines not on this page · raw message
arch/arm/plat-omap/sram.c +10 -10
@@ -56,16 +56,16 @@#define SRAM_BOOTLOADER_SZ 0x80#endif -#define OMAP24XX_VA_REQINFOPERM0 IO_ADDRESS(0x68005048) -#define OMAP24XX_VA_READPERM0 IO_ADDRESS(0x68005050) -#define OMAP24XX_VA_WRITEPERM0 IO_ADDRESS(0x68005058) - -#define OMAP34XX_VA_REQINFOPERM0 IO_ADDRESS(0x68012848) -#define OMAP34XX_VA_READPERM0 IO_ADDRESS(0x68012850) -#define OMAP34XX_VA_WRITEPERM0 IO_ADDRESS(0x68012858) -#define OMAP34XX_VA_ADDR_MATCH2 IO_ADDRESS(0x68012880) -#define OMAP34XX_VA_SMS_RG_ATT0 IO_ADDRESS(0x6C000048) -#define OMAP34XX_VA_CONTROL_STAT IO_ADDRESS(0x480022F0) +#define OMAP24XX_VA_REQINFOPERM0 OMAP2_IO_ADDRESS(0x68005048) +#define OMAP24XX_VA_READPERM0 OMAP2_IO_ADDRESS(0x68005050) +#define OMAP24XX_VA_WRITEPERM0 OMAP2_IO_ADDRESS(0x68005058) + +#define OMAP34XX_VA_REQINFOPERM0 OMAP2_IO_ADDRESS(0x68012848) +#define OMAP34XX_VA_READPERM0 OMAP2_IO_ADDRESS(0x68012850) +#define OMAP34XX_VA_WRITEPERM0 OMAP2_IO_ADDRESS(0x68012858) +#define OMAP34XX_VA_ADDR_MATCH2 OMAP2_IO_ADDRESS(0x68012880) +#define OMAP34XX_VA_SMS_RG_ATT0 OMAP2_IO_ADDRESS(0x6C000048) +#define OMAP34XX_VA_CONTROL_STAT OMAP2_IO_ADDRESS(0x480022F0)#define GP_DEVICE 0x300
drivers/video/omap/dispc.c +3 -3
@@ -212,9 +212,9 @@ static void enable_rfbi_mode(int enable)dispc_write_reg (DISPC_CONTROL , l);/* Set bypass mode in RFBI module */ - l =__raw_readl (IO_ADDRESS (RFBI_CONTROL )); + l =__raw_readl (OMAP2_IO_ADDRESS (RFBI_CONTROL )); l |= enable ?0 : (1 <<1 ); -__raw_writel (l,IO_ADDRESS (RFBI_CONTROL )); +__raw_writel (l,OMAP2_IO_ADDRESS (RFBI_CONTROL )); }static void set_lcd_data_lines (int data_lines)
@@ -1421,7 +1421,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, }/* L3 firewall setting: enable access to OCM RAM */ -__raw_writel (0x402000b0 ,IO_ADDRESS (0x680050a0 )); +__raw_writel (0x402000b0 ,OMAP2_IO_ADDRESS (0x680050a0 ));if ((r =alloc_palette_ram ()) <0 ) goto fail2;
Re: [PATCH 1/3] OMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS instead
Hi,
Quoted 43 lines · ext Tony Lindgren
Search and replace
OMAP_IO_ADDRESSwithOMAP1_IO_ADDRESSandOMAP2_IO_ADDRESS, and convert omap_read/write into a functions instead of a macros.Also rename
OMAP_MPUIO_VBASEtoOMAP1_MPUIO_VBASE.In the long run, most code should use ioremap + __raw_read/write instead.
Signed-off-by Tony Lindgren <[email protected]>--- arch/arm/mach-omap1/devices.c | 2 - arch/arm/mach-omap1/pm.h | 4 + arch/arm/mach-omap1/serial.c | 6 +- arch/arm/mach-omap1/sram.S | 12 ++- arch/arm/mach-omap1/time.c | 4 + arch/arm/mach-omap2/board-4430sdp.c | 4 + arch/arm/mach-omap2/cm.h | 6 +- arch/arm/mach-omap2/omap-smp.c | 2 - arch/arm/mach-omap2/pm-debug.c | 2 - arch/arm/mach-omap2/prm.h | 6 +- arch/arm/mach-omap2/sdrc.h | 6 +- arch/arm/mach-omap2/serial.c | 6 +- arch/arm/mach-omap2/sram242x.S | 4 + arch/arm/mach-omap2/sram243x.S | 4 + arch/arm/mach-omap2/timer-gp.c | 2 - arch/arm/plat-omap/dma.c | 8 +- arch/arm/plat-omap/dmtimer.c | 5 + arch/arm/plat-omap/gpio.c | 86 +++++++++++++------------ arch/arm/plat-omap/include/mach/control.h | 12 ++- arch/arm/plat-omap/include/mach/entry-macro.S | 8 +- arch/arm/plat-omap/include/mach/io.h | 64 ++++++------------- arch/arm/plat-omap/include/mach/mtd-xip.h | 2 - arch/arm/plat-omap/include/mach/omap44xx.h | 8 +- arch/arm/plat-omap/include/mach/sdrc.h | 6 +- arch/arm/plat-omap/io.c | 58 +++++++++++++++++ arch/arm/plat-omap/sram.c | 20 +++--- drivers/video/omap/dispc.c | 6 +- 27 files changed, 196 insertions(+), 157 deletions(-)arch/arm/mach-omap1/devices.c +0
-0
arch/arm/mach-omap1/devices.c static inline void omap_init_rtc(void) {} · line 74
Quoted 5 lines
arch/arm/mach-omap1/devices.c +1
-1@@ -71,7 +71,7 @@ static inline void omap_init_rtc(void) {}# define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1#endif -#define OMAP1_MBOX_BASE IO_ADDRESS(OMAP16XX_MAILBOX_BASE) +#define OMAP1_MBOX_BASE OMAP1_IO_ADDRESS(OMAP16XX_MAILBOX_BASE)
any chance to ioremap() at least this one ?
Signature · 1 line
balbi
Tony Lindgren
maintainerRe: [PATCH 1/3] OMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS instead
Quoted 49 lines · Felipe Balbi
Hi,
Quoted 46 lines · ext Tony Lindgren
Search and replace
OMAP_IO_ADDRESSwithOMAP1_IO_ADDRESSandOMAP2_IO_ADDRESS, and convert omap_read/write into a functions instead of a macros.Also rename
OMAP_MPUIO_VBASEtoOMAP1_MPUIO_VBASE.In the long run, most code should use ioremap + __raw_read/write instead.
Signed-off-by Tony Lindgren <[email protected]>--- arch/arm/mach-omap1/devices.c | 2 - arch/arm/mach-omap1/pm.h | 4 + arch/arm/mach-omap1/serial.c | 6 +- arch/arm/mach-omap1/sram.S | 12 ++- arch/arm/mach-omap1/time.c | 4 + arch/arm/mach-omap2/board-4430sdp.c | 4 + arch/arm/mach-omap2/cm.h | 6 +- arch/arm/mach-omap2/omap-smp.c | 2 - arch/arm/mach-omap2/pm-debug.c | 2 - arch/arm/mach-omap2/prm.h | 6 +- arch/arm/mach-omap2/sdrc.h | 6 +- arch/arm/mach-omap2/serial.c | 6 +- arch/arm/mach-omap2/sram242x.S | 4 + arch/arm/mach-omap2/sram243x.S | 4 + arch/arm/mach-omap2/timer-gp.c | 2 - arch/arm/plat-omap/dma.c | 8 +- arch/arm/plat-omap/dmtimer.c | 5 + arch/arm/plat-omap/gpio.c | 86 +++++++++++++------------ arch/arm/plat-omap/include/mach/control.h | 12 ++- arch/arm/plat-omap/include/mach/entry-macro.S | 8 +- arch/arm/plat-omap/include/mach/io.h | 64 ++++++------------- arch/arm/plat-omap/include/mach/mtd-xip.h | 2 - arch/arm/plat-omap/include/mach/omap44xx.h | 8 +- arch/arm/plat-omap/include/mach/sdrc.h | 6 +- arch/arm/plat-omap/io.c | 58 +++++++++++++++++ arch/arm/plat-omap/sram.c | 20 +++--- drivers/video/omap/dispc.c | 6 +- 27 files changed, 196 insertions(+), 157 deletions(-)arch/arm/mach-omap1/devices.c +0
-0@@ -71,7 +71,7 @@ static inline void omap_init_rtc(void) {}# define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1#endif
Quoted 4 lines
arch/arm/mach-omap1/devices.c static inline void omap_init_rtc(void) {} · line 74
Quoted 2 lines
arch/arm/mach-omap1/devices.c +1
-1-#define OMAP1_MBOX_BASE IO_ADDRESS(OMAP16XX_MAILBOX_BASE) +#define OMAP1_MBOX_BASE OMAP1_IO_ADDRESS(OMAP16XX_MAILBOX_BASE)any chance to
ioremap()at least this one ?
Let's do once change at a time. It should be easy to start adding ioremap conversion patches on top of this series.
Tony
Tony Lindgren
maintainerPATCH 2/3 OMAP: Rename OMAP_MPUIO_BASE to OMAP1_MPUIO_BASE
In reply to Tony LindgrenRename OMAP_MPUIO_BASE to OMAP1_MPUIO_BASE
--- arch/arm/plat-omap/gpio.c | 4 ++-- arch/arm/plat-omap/include/mach/gpio.h | 2 +- drivers/input/keyboard/omap-keypad.c | 22 +++++++++++----------- drivers/mtd/nand/ams-delta.c | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-)
arch/arm/plat-omap/gpio.c +2 -2
@@ -99,7 +99,7 @@#define OMAP850_GPIO_INT_MASK 0x10#define OMAP850_GPIO_INT_STATUS 0x14 -#define OMAP1_MPUIO_VBASE OMAP1_IO_ADDRESS(OMAP_MPUIO_BASE) +#define OMAP1_MPUIO_VBASE OMAP1_IO_ADDRESS(OMAP1_MPUIO_BASE)/* * omap24xx specific GPIO registers
@@ -224,7 +224,7 @@ static struct gpio_bank gpio_bank_730[7] = {#ifdef CONFIG_ARCH_OMAP850 static struct gpio_bank gpio_bank_850[7 ] = { - {OMAP_MPUIO_BASE ,INT_850_MPUIO ,IH_MPUIO_BASE ,METHOD_MPUIO }, + {OMAP1_MPUIO_BASE ,INT_850_MPUIO ,IH_MPUIO_BASE ,METHOD_MPUIO }, {OMAP850_GPIO1_BASE ,INT_850_GPIO_BANK1 ,IH_GPIO_BASE ,METHOD_GPIO_850 }, {OMAP850_GPIO2_BASE ,INT_850_GPIO_BANK2 ,IH_GPIO_BASE +32 ,METHOD_GPIO_850 }, { OMAP850_GPIO3_BASE, INT_850_GPIO_BANK3, IH_GPIO_BASE + 64, METHOD_GPIO_850 },
arch/arm/plat-omap/include/mach/gpio.h +1 -1
@@ -29,7 +29,7 @@#include <linux/io.h> #include <mach/irqs.h> -#define OMAP_MPUIO_BASE 0xfffb5000 +#define OMAP1_MPUIO_BASE 0xfffb5000#if (defined(CONFIG_ARCH_OMAP730 ) || defined(CONFIG_ARCH_OMAP850 ))
drivers/input/keyboard/omap-keypad.c +11 -11
@@ -116,7 +116,7 @@ static irqreturn_t omap_kp_interrupt(int irq, void *dev_id) } }else /* disable keyboard interrupt and schedule for handling */ -omap_writew (1 ,OMAP_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );tasklet_schedule (&kp_tasklet);
@@ -143,20 +143,20 @@ static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state) }else {/* disable keyboard interrupt and schedule for handling */ -omap_writew (1 ,OMAP_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );/* read the keypad status */ -omap_writew (0xff ,OMAP_MPUIO_BASE +OMAP_MPUIO_KBC ); +omap_writew (0xff ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC );for (col =0 ; col < omap_kp->cols; col++) {omap_writew (~(1 << col) &0xff , -OMAP_MPUIO_BASE +OMAP_MPUIO_KBC ); +OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC );udelay (omap_kp->delay); - state[col] = ~omap_readw (OMAP_MPUIO_BASE + + state[col] = ~omap_readw (OMAP1_MPUIO_BASE +OMAP_MPUIO_KBR_LATCH ) &0xff ; } -omap_writew (0x00 ,OMAP_MPUIO_BASE +OMAP_MPUIO_KBC ); +omap_writew (0x00 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBC );udelay (2 ); } }
@@ -234,7 +234,7 @@ static void omap_kp_tasklet(unsigned long data)for (i =0 ; i < omap_kp_data->rows; i++)enable_irq (gpio_to_irq (row_gpios[i])); }else { -omap_writew (0 ,OMAP_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); kp_cur_group =-1 ; } }
@@ -317,7 +317,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev)/* Disable the interrupt for the MPUIO keyboard */ if (!cpu_is_omap24xx ()) -omap_writew (1 ,OMAP_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); keymap = pdata->keymap;
@@ -391,7 +391,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) }if (pdata->dbounce) -omap_writew (0xff ,OMAP_MPUIO_BASE +OMAP_MPUIO_GPIO_DEBOUNCING ); +omap_writew (0xff ,OMAP1_MPUIO_BASE +OMAP_MPUIO_GPIO_DEBOUNCING );/* scan current status and enable interrupt */ omap_kp_scan_keypad (omap_kp, keypad_state);
@@ -402,7 +402,7 @@ static int __devinit omap_kp_probe(struct platform_device *pdev) "omap-keypad", omap_kp) < 0) goto err4; } -omap_writew (0 ,OMAP_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (0 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); }else {for (irq_idx =0 ; irq_idx < omap_kp->rows; irq_idx++) { if (request_irq(gpio_to_irq(row_gpios[irq_idx]),
@@ -449,7 +449,7 @@ static int __devexit omap_kp_remove(struct platform_device *pdev)free_irq (gpio_to_irq (row_gpios[i]),0 ); } }else { -omap_writew (1 ,OMAP_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT ); +omap_writew (1 ,OMAP1_MPUIO_BASE +OMAP_MPUIO_KBD_MASKIT );free_irq (omap_kp->irq,0 ); }
drivers/mtd/nand/ams-delta.c +4 -4
@@ -63,7 +63,7 @@ static void ams_delta_write_byte(struct mtd_info *mtd, u_char byte) {struct nand_chip *this = mtd->priv; -omap_writew (0 , (OMAP_MPUIO_BASE +OMAP_MPUIO_IO_CNTL )); +omap_writew (0 , (OMAP1_MPUIO_BASE +OMAP_MPUIO_IO_CNTL ));omap_writew (byte, this->IO_ADDR_W);ams_delta_latch2_write (AMS_DELTA_LATCH2_NAND_NWE ,0 );ndelay (40 );
@@ -78,7 +78,7 @@ static u_char ams_delta_read_byte(struct mtd_info *mtd)ams_delta_latch2_write (AMS_DELTA_LATCH2_NAND_NRE ,0 );ndelay (40 ); -omap_writew (~0 , (OMAP_MPUIO_BASE +OMAP_MPUIO_IO_CNTL )); +omap_writew (~0 , (OMAP1_MPUIO_BASE +OMAP_MPUIO_IO_CNTL )); res =omap_readw (this->IO_ADDR_R);ams_delta_latch2_write (AMS_DELTA_LATCH2_NAND_NRE ,AMS_DELTA_LATCH2_NAND_NRE );
@@ -178,8 +178,8 @@ static int __init ams_delta_init(void) ams_delta_mtd->priv = this;/* Set address of NAND IO lines */ - this->IO_ADDR_R = (OMAP_MPUIO_BASE +OMAP_MPUIO_INPUT_LATCH ); - this->IO_ADDR_W = (OMAP_MPUIO_BASE +OMAP_MPUIO_OUTPUT ); + this->IO_ADDR_R = (OMAP1_MPUIO_BASE +OMAP_MPUIO_INPUT_LATCH ); + this->IO_ADDR_W = (OMAP1_MPUIO_BASE +OMAP_MPUIO_OUTPUT ); this->read_byte = ams_delta_read_byte; this->write_buf = ams_delta_write_buf; this->read_buf = ams_delta_read_buf;
Tony Lindgren
maintainerPATCH 3/3 OMAP: Remove ifdefs for io.h
In reply to Tony LindgrenRemove ifdefs for io.h
--- arch/arm/mach-omap1/io.c | 6 +++--- arch/arm/plat-omap/include/mach/io.h | 37 +++++++++++++++++++++++++++------- arch/arm/plat-omap/io.c | 4 ++-- 3 files changed, 34 insertions(+), 13 deletions(-)
arch/arm/mach-omap1/io.c +3 -3
@@ -29,9 +29,9 @@ extern void omapfb_reserve_sdram(void);*/ static struct map_desc omap_io_desc[]__initdata = { { - .virtual =IO_VIRT , - .pfn =__phys_to_pfn (IO_PHYS ), - .length =IO_SIZE , + .virtual =OMAP1_IO_VIRT , + .pfn =__phys_to_pfn (OMAP1_IO_PHYS ), + .length =OMAP1_IO_SIZE , .type =MT_DEVICE } };
arch/arm/plat-omap/include/mach/io.h +29 -8
@@ -66,13 +66,21 @@#define OMAP2_IO_OFFSET 0x90000000#define OMAP2_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_IO_OFFSET)/* L3 and L4 */ -#if defined(CONFIG_ARCH_OMAP1 ) +/* +* ---------------------------------------------------------------------------- +* Omap1 specific IO mapping +* ---------------------------------------------------------------------------- +*/ -#define IO_PHYS 0xFFFB0000 -#define IO_SIZE 0x40000 -#define IO_VIRT (IO_PHYS - OMAP1_IO_OFFSET) +#define OMAP1_IO_PHYS 0xFFFB0000 +#define OMAP1_IO_SIZE 0x40000 +#define OMAP1_IO_VIRT (OMAP1_IO_PHYS - OMAP1_IO_OFFSET) -#elif defined(CONFIG_ARCH_OMAP2 ) +/* +* ---------------------------------------------------------------------------- +* Omap2 specific IO mapping +* ---------------------------------------------------------------------------- +*/ /* We map both L3 and L4 on OMAP2 */ #define L3_24XX_PHYS L3_24XX_BASE/* 0x68000000 */
@@ -106,7 +114,11 @@#define DSP_MMU_24XX_VIRT 0xe2000000#define DSP_MMU_24XX_SIZE SZ_4K -#elif defined(CONFIG_ARCH_OMAP3 ) +/* +* ---------------------------------------------------------------------------- +* Omap3 specific IO mapping +* ---------------------------------------------------------------------------- +*/ /* We map both L3 and L4 on OMAP3 */ #define L3_34XX_PHYS L3_34XX_BASE/* 0x68000000 */
@@ -157,8 +169,12 @@#define DSP_MMU_34XX_VIRT 0xe2000000#define DSP_MMU_34XX_SIZE SZ_4K +/* +* ---------------------------------------------------------------------------- +* Omap4 specific IO mapping +* ---------------------------------------------------------------------------- +*/ -#elif defined(CONFIG_ARCH_OMAP4 )/* We map both L3 and L4 on OMAP4 */ #define L3_44XX_PHYS L3_44XX_BASE#define L3_44XX_VIRT 0xd4000000
@@ -185,7 +201,12 @@#define OMAP44XX_GPMC_VIRT 0xe0000000#define OMAP44XX_GPMC_SIZE SZ_1M -#endif + +/* +* ---------------------------------------------------------------------------- +* Omap specific register access +* ---------------------------------------------------------------------------- +*/ #ifndef __ASSEMBLER__
arch/arm/plat-omap/io.c +2 -2
@@ -30,8 +30,8 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) {#ifdef CONFIG_ARCH_OMAP1 if (cpu_class_is_omap1 ()) { -if (BETWEEN (p,IO_PHYS ,IO_SIZE )) -return XLATE (p,IO_PHYS ,IO_VIRT ); +if (BETWEEN (p,OMAP1_IO_PHYS ,OMAP1_IO_SIZE )) +return XLATE (p,OMAP1_IO_PHYS ,OMAP1_IO_VIRT ); }if (cpu_is_omap730 ()) {if (BETWEEN (p,OMAP730_DSP_BASE ,OMAP730_DSP_SIZE ))
Quoted 2 lines · Tony Lindgren
Here are few patches for the upcoming merge window to remove unnecessary ifdeffery in the header files.
I'm not sure what the plans are wrt OMAP1 vs the later OMAPs, but given that OMAP1 lives in a separate mach directory, I think it would make sense for the OMAP1 parts of the headers to be moved out to arch/arm/mach-omap1/include/mach, leaving the other parts in arch/arm/mach-omap2/include/mach.
Common stuff can be in arch/arm/plat-omap/include/plat/ and which should only really cover the code in arch/arm/plat-omap/
Tony Lindgren
maintainerQuoted 9 lines · Russell King - ARM Linux
Quoted 2 lines · Tony Lindgren
Here are few patches for the upcoming merge window to remove unnecessary ifdeffery in the header files.
I'm not sure what the plans are wrt OMAP1 vs the later OMAPs, but given that OMAP1 lives in a separate mach directory, I think it would make sense for the OMAP1 parts of the headers to be moved out to
arch/arm/mach-omap1/include/mach, leaving the other parts inarch/arm/mach-omap2/include/mach.
Yees.
After this series is applied we can move the remaining omap1 specific defines in hardware.h into omap1.h.
Quoted 2 lines
Common stuff can be in
arch/arm/plat-omap/include/plat/and which should only really cover the code inarch/arm/plat-omap/
Sounds good.
Tony
Tony Lindgren
maintainergit pull request for omap header cleanup for upcoming 2.6.32 merge window
Russell,
Here's the pull request for these header clean-up patches.
Tony
The following changes since commit ed680c4ad478d0fee9740f7d029087f181346564:
Linus Torvalds (1):
Linux 2.6.31-rc5
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git omap-headers
Tony Lindgren (3):
OMAP: Remove OMAP_IO_ADDRESS, use OMAP1_IO_ADDRESS and OMAP2_IO_ADDRESS instead
OMAP: Rename OMAP_MPUIO_BASE to OMAP1_MPUIO_BASE
OMAP: Remove ifdefs for io.h
arch/arm/mach-omap1/devices.c | 2 +- arch/arm/mach-omap1/io.c | 6 +- arch/arm/mach-omap1/pm.h | 4 +- arch/arm/mach-omap1/serial.c | 6 +- arch/arm/mach-omap1/sram.S | 12 ++-- arch/arm/mach-omap1/time.c | 4 +- arch/arm/mach-omap2/board-4430sdp.c | 4 +- arch/arm/mach-omap2/cm.h | 6 +- arch/arm/mach-omap2/omap-smp.c | 2 +- arch/arm/mach-omap2/pm-debug.c | 2 +- arch/arm/mach-omap2/prm.h | 6 +- arch/arm/mach-omap2/sdrc.h | 6 +- arch/arm/mach-omap2/serial.c | 6 +- arch/arm/mach-omap2/sram242x.S | 4 +- arch/arm/mach-omap2/sram243x.S | 4 +- arch/arm/mach-omap2/timer-gp.c | 2 +- arch/arm/plat-omap/dma.c | 8 +- arch/arm/plat-omap/dmtimer.c | 5 +- arch/arm/plat-omap/gpio.c | 88 +++++++++++----------- arch/arm/plat-omap/include/mach/control.h | 12 ++-- arch/arm/plat-omap/include/mach/entry-macro.S | 8 +- arch/arm/plat-omap/include/mach/gpio.h | 2 +- arch/arm/plat-omap/include/mach/io.h | 97 ++++++++++++------------- arch/arm/plat-omap/include/mach/mtd-xip.h | 2 +- arch/arm/plat-omap/include/mach/omap44xx.h | 8 +- arch/arm/plat-omap/include/mach/sdrc.h | 6 +- arch/arm/plat-omap/io.c | 62 +++++++++++++++- arch/arm/plat-omap/sram.c | 20 +++--- drivers/input/keyboard/omap-keypad.c | 22 +++--- drivers/mtd/nand/ams-delta.c | 8 +- drivers/video/omap/dispc.c | 6 +- 31 files changed, 245 insertions(+), 185 deletions(-) ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Tony Lindgren
maintainerQuoted 7 lines · Tony Lindgren
Hi all,
Here are few patches for the upcoming merge window to remove unnecessary ifdeffery in the header files.
We should get these merged early to avoid merge conflicts with other patchsets.
I've added this series into omap for-next branch.
Quoted 51 lines
Regards,
Tony
---
Tony Lindgren (3):
OMAP: Remove ifdefs forio.h
OMAP: RenameOMAP_MPUIO_BASEtoOMAP1_MPUIO_BASE
OMAP: RemoveOMAP_IO_ADDRESS, useOMAP1_IO_ADDRESSandOMAP2_IO_ADDRESSinsteadarch/arm/mach-omap1/devices.c | 2 - arch/arm/mach-omap1/io.c | 6 +- arch/arm/mach-omap1/pm.h | 4 + arch/arm/mach-omap1/serial.c | 6 +- arch/arm/mach-omap1/sram.S | 12 ++- arch/arm/mach-omap1/time.c | 4 + arch/arm/mach-omap2/board-4430sdp.c | 4 + arch/arm/mach-omap2/cm.h | 6 +- arch/arm/mach-omap2/omap-smp.c | 2 - arch/arm/mach-omap2/pm-debug.c | 2 - arch/arm/mach-omap2/prm.h | 6 +- arch/arm/mach-omap2/sdrc.h | 6 +- arch/arm/mach-omap2/serial.c | 6 +- arch/arm/mach-omap2/sram242x.S | 4 + arch/arm/mach-omap2/sram243x.S | 4 + arch/arm/mach-omap2/timer-gp.c | 2 - arch/arm/plat-omap/dma.c | 8 +- arch/arm/plat-omap/dmtimer.c | 5 + arch/arm/plat-omap/gpio.c | 88 +++++++++++------------ arch/arm/plat-omap/include/mach/control.h | 12 ++- arch/arm/plat-omap/include/mach/entry-macro.S | 8 +- arch/arm/plat-omap/include/mach/gpio.h | 2 - arch/arm/plat-omap/include/mach/io.h | 97 ++++++++++++------------- arch/arm/plat-omap/include/mach/mtd-xip.h | 2 - arch/arm/plat-omap/include/mach/omap44xx.h | 8 +- arch/arm/plat-omap/include/mach/sdrc.h | 6 +- arch/arm/plat-omap/io.c | 62 +++++++++++++++- arch/arm/plat-omap/sram.c | 20 +++-- drivers/input/keyboard/omap-keypad.c | 22 +++--- drivers/mtd/nand/ams-delta.c | 8 +- drivers/video/omap/dispc.c | 6 +- 31 files changed, 245 insertions(+), 185 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