ARM: OMAP2/3/4: Split OMAP2_IO_ADDRESS to L3 and L4
Subsystems (6)
PATCH 1/5 ARM: OMAP2/3/4: Split OMAP2_IO_ADDRESS to L3 and L4
This patch splits OMAP2_IO_ADDRESS to OMAP2_L3_IO_ADDRESS and OMAP2_L4_IO_ADDRESS to reclaim more IO space.
The omap_read*() and omap_write*() functions will work only over L4 address space. Current omap kernel stack uses these functions only to access registers over L4 io address space
--- arch/arm/mach-omap2/board-4430sdp.c | 4 +- arch/arm/mach-omap2/cm.h | 6 ++-- arch/arm/mach-omap2/irq.c | 4 +- arch/arm/mach-omap2/omap-smp.c | 2 +- arch/arm/mach-omap2/pm-debug.c | 3 +- arch/arm/mach-omap2/prm.h | 6 ++-- arch/arm/mach-omap2/sdrc.h | 9 +++-- 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/common.c | 44 ++++++++++++------------ arch/arm/plat-omap/dma.c | 6 ++-- arch/arm/plat-omap/dmtimer.c | 2 +- arch/arm/plat-omap/gpio.c | 42 ++++++++++++------------ arch/arm/plat-omap/include/mach/control.h | 15 +++++--- arch/arm/plat-omap/include/mach/entry-macro.S | 4 +- arch/arm/plat-omap/include/mach/io.h | 6 ++- arch/arm/plat-omap/include/mach/omap44xx.h | 11 ++++-- arch/arm/plat-omap/include/mach/sdrc.h | 6 ++-- arch/arm/plat-omap/io.c | 12 +++--- arch/arm/plat-omap/sram.c | 18 +++++----- drivers/video/omap/dispc.c | 6 ++-- 23 files changed, 117 insertions(+), 105 deletions(-)
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 ,OMAP2_IO_ADDRESS (OMAP44XX_GIC_DIST_BASE ),29 ); -gic_cpu_init (0 ,OMAP2_IO_ADDRESS (OMAP44XX_GIC_CPU_BASE )); +gic_dist_init (0 ,OMAP2_L4_IO_ADDRESS (OMAP44XX_GIC_DIST_BASE ),29 ); +gic_cpu_init (0 ,OMAP2_L4_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) \ - OMAP2_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))#define OMAP2430_CM_REGADDR (module, reg) \ - OMAP2_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))#define OMAP34XX_CM_REGADDR (module, reg) \ - OMAP2_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))/* * Architecture-specific global CM registers
arch/arm/mach-omap2/irq.c +2 -2
@@ -181,9 +181,9 @@ void __init omap_init_irq(void)struct omap_irq_bank *bank = irq_banks + i;if (cpu_is_omap24xx ()) - bank->base_reg =OMAP2_IO_ADDRESS (OMAP24XX_IC_BASE ); + bank->base_reg =OMAP2_L4_IO_ADDRESS (OMAP24XX_IC_BASE );else if (cpu_is_omap34xx ()) - bank->base_reg =OMAP2_IO_ADDRESS (OMAP34XX_IC_BASE ); + bank->base_reg =OMAP2_L4_IO_ADDRESS (OMAP34XX_IC_BASE );omap_irq_bank_init_one (bank);
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 ,OMAP2_IO_ADDRESS (OMAP44XX_GIC_CPU_BASE )); +gic_cpu_init (0 ,OMAP2_L4_IO_ADDRESS (OMAP44XX_GIC_CPU_BASE ));/* * Synchronise with the boot thread.
arch/arm/mach-omap2/pm-debug.c +2 -1
@@ -48,7 +48,8 @@ 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(OMAP2_IO_ADDRESS(0x480fe000 + (off))) + regs[reg_count++].val = \ + __raw_readl(OMAP2_L4_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) \ - OMAP2_IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg))#define OMAP2430_PRM_REGADDR (module, reg) \ - OMAP2_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg))#define OMAP34XX_PRM_REGADDR (module, reg) \ - OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg))/* * Architecture-specific global PRM registers
arch/arm/mach-omap2/sdrc.h +6 -3
@@ -48,9 +48,12 @@ static inline u32 sms_read_reg(u16 reg)return __raw_readl (OMAP_SMS_REGADDR (reg)); }#else -#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)) +#define OMAP242X_SDRC_REGADDR (reg) \ + OMAP2_L3_IO_ADDRESS(OMAP2420_SDRC_BASE + (reg)) +#define OMAP243X_SDRC_REGADDR (reg) \ + OMAP2_L3_IO_ADDRESS(OMAP243X_SDRC_BASE + (reg)) +#define OMAP34XX_SDRC_REGADDR (reg) \ + OMAP2_L3_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_data0[] = { { - .membase =OMAP2_IO_ADDRESS (OMAP_UART1_BASE ), + .membase =OMAP2_L4_IO_ADDRESS (OMAP_UART1_BASE ), .mapbase =OMAP_UART1_BASE , .irq =72 , .flags =UPF_BOOT_AUTOCONF ,
@@ -87,7 +87,7 @@ static struct plat_serial8250_port serial_platform_data0[] = {static struct plat_serial8250_port serial_platform_data1[] = { { - .membase =OMAP2_IO_ADDRESS (OMAP_UART2_BASE ), + .membase =OMAP2_L4_IO_ADDRESS (OMAP_UART2_BASE ), .mapbase =OMAP_UART2_BASE , .irq =73 , .flags =UPF_BOOT_AUTOCONF ,
@@ -101,7 +101,7 @@ static struct plat_serial8250_port serial_platform_data1[] = {static struct plat_serial8250_port serial_platform_data2[] = { { - .membase =OMAP2_IO_ADDRESS (OMAP_UART3_BASE ), + .membase =OMAP2_L4_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 OMAP2_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) + .word OMAP2_L4_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 OMAP2_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x010) + .word OMAP2_L4_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 OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) + .word OMAP2_L4_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 OMAP2_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x010) + .word OMAP2_L4_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 =OMAP2_IO_ADDRESS (OMAP44XX_LOCAL_TWD_BASE ); + twd_base =OMAP2_L4_IO_ADDRESS (OMAP44XX_LOCAL_TWD_BASE );#endif omap_dm_timer_init ();
arch/arm/plat-omap/common.c +22 -22
68 lines not on this page · raw message
arch/arm/plat-omap/dma.c +3 -3
@@ -2340,13 +2340,13 @@ static int __init omap_init_dma(void) 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 =OMAP2_IO_ADDRESS (OMAP24XX_DMA4_BASE ); + omap_dma_base =OMAP2_L4_IO_ADDRESS (OMAP24XX_DMA4_BASE ); dma_lch_count =OMAP_DMA4_LOGICAL_DMA_CH_COUNT ; }else if (cpu_is_omap34xx ()) { - omap_dma_base =OMAP2_IO_ADDRESS (OMAP34XX_DMA4_BASE ); + omap_dma_base =OMAP2_L4_IO_ADDRESS (OMAP34XX_DMA4_BASE ); dma_lch_count =OMAP_DMA4_LOGICAL_DMA_CH_COUNT ; }else if (cpu_is_omap44xx ()) { - omap_dma_base =OMAP2_IO_ADDRESS (OMAP44XX_DMA4_BASE ); + omap_dma_base =OMAP2_L4_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 +1 -1
@@ -777,7 +777,7 @@ int __init omap_dm_timer_init(void)if (cpu_class_is_omap1 ()) timer->io_base =OMAP1_IO_ADDRESS (timer->phys_base);else - timer->io_base =OMAP2_IO_ADDRESS (timer->phys_base); + timer->io_base =OMAP2_L4_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 +21 -21
59 lines not on this page · raw message
arch/arm/plat-omap/include/mach/control.h +9 -6
@@ -20,15 +20,18 @@#ifndef __ASSEMBLY__#define OMAP242X_CTRL_REGADDR (reg) \ - OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))#define OMAP243X_CTRL_REGADDR (reg) \ - OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg))#define OMAP343X_CTRL_REGADDR (reg) \ - OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) + OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))#else -#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)) +#define OMAP242X_CTRL_REGADDR (reg) \ + OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) +#define OMAP243X_CTRL_REGADDR (reg) \ + OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) +#define OMAP343X_CTRL_REGADDR (reg) \ + OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))#endif /* __ASSEMBLY__ */ /*
arch/arm/plat-omap/include/mach/entry-macro.S +2 -2
@@ -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 OMAP2_IO_ADDRESS(OMAP24XX_IC_BASE) +#define OMAP2_VA_IC_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) #elif defined(CONFIG_ARCH_OMAP34XX) -#define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP34XX_IC_BASE) +#define OMAP2_VA_IC_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) #endif #if defined(CONFIG_ARCH_OMAP4) #include <mach/omap44xx.h>
arch/arm/plat-omap/include/mach/io.h +4 -2
@@ -63,9 +63,11 @@#define OMAP1_IO_OFFSET 0x01000000/* Virtual IO = 0xfefb0000 */ #define OMAP1_IO_ADDRESS (pa) IOMEM((pa) - OMAP1_IO_OFFSET) -#define OMAP2_IO_OFFSET 0x90000000 -#define OMAP2_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_IO_OFFSET)/* L3 and L4 */ +#define OMAP2_L3_IO_OFFSET 0x90000000 +#define OMAP2_L3_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L3_IO_OFFSET)/* L3 */ +#define OMAP2_L4_IO_OFFSET 0x90000000 +#define OMAP2_L4_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET)/* L4 */ /* * ---------------------------------------------------------------------------- * Omap1 specific IO mapping
arch/arm/plat-omap/include/mach/omap44xx.h +7 -4
@@ -33,14 +33,17 @@#define IRQ_SIR_IRQ 0x0040#define OMAP44XX_GIC_DIST_BASE 0x48241000#define OMAP44XX_GIC_CPU_BASE 0x48240100 -#define OMAP44XX_VA_GIC_CPU_BASE OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) +#define OMAP44XX_VA_GIC_CPU_BASE \ + OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE)#define OMAP44XX_SCU_BASE 0x48240000 -#define OMAP44XX_VA_SCU_BASE OMAP2_IO_ADDRESS(OMAP44XX_SCU_BASE) +#define OMAP44XX_VA_SCU_BASE OMAP2_L4_IO_ADDRESS(OMAP44XX_SCU_BASE)#define OMAP44XX_LOCAL_TWD_BASE 0x48240600 -#define OMAP44XX_VA_LOCAL_TWD_BASE OMAP2_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE) +#define OMAP44XX_VA_LOCAL_TWD_BASE \ + OMAP2_L4_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE)#define OMAP44XX_LOCAL_TWD_SIZE 0x00000100#define OMAP44XX_WKUPGEN_BASE 0x48281000 -#define OMAP44XX_VA_WKUPGEN_BASE OMAP2_IO_ADDRESS(OMAP44XX_WKUPGEN_BASE) +#define OMAP44XX_VA_WKUPGEN_BASE \ + OMAP2_L4_IO_ADDRESS(OMAP44XX_WKUPGEN_BASE)#endif /* __ASM_ARCH_OMAP44XX_H */
arch/arm/plat-omap/include/mach/sdrc.h +3 -3
@@ -71,11 +71,11 @@*/ #define OMAP242X_SMS_REGADDR (reg) \ - (void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE + reg) + (void __iomem *)OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE + reg)#define OMAP243X_SMS_REGADDR (reg) \ - (void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE + reg) + (void __iomem *)OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE + reg)#define OMAP343X_SMS_REGADDR (reg) \ - (void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE + reg) + (void __iomem *)OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE + reg)/* SMS register offsets - read/write with sms_{read,write}_reg() */
arch/arm/plat-omap/io.c +6 -6
@@ -142,7 +142,7 @@ u8 omap_readb(u32 pa)if (cpu_class_is_omap1 ())return __raw_readb (OMAP1_IO_ADDRESS (pa));else -return __raw_readb (OMAP2_IO_ADDRESS (pa)); +return __raw_readb (OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_readb);
@@ -151,7 +151,7 @@ u16 omap_readw(u32 pa)if (cpu_class_is_omap1 ())return __raw_readw (OMAP1_IO_ADDRESS (pa));else -return __raw_readw (OMAP2_IO_ADDRESS (pa)); +return __raw_readw (OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_readw);
@@ -160,7 +160,7 @@ u32 omap_readl(u32 pa)if (cpu_class_is_omap1 ())return __raw_readl (OMAP1_IO_ADDRESS (pa));else -return __raw_readl (OMAP2_IO_ADDRESS (pa)); +return __raw_readl (OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_readl);
@@ -169,7 +169,7 @@ void omap_writeb(u8 v, u32 pa)if (cpu_class_is_omap1 ())__raw_writeb (v,OMAP1_IO_ADDRESS (pa));else -__raw_writeb (v,OMAP2_IO_ADDRESS (pa)); +__raw_writeb (v,OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_writeb);
@@ -178,7 +178,7 @@ void omap_writew(u16 v, u32 pa)if (cpu_class_is_omap1 ())__raw_writew (v,OMAP1_IO_ADDRESS (pa));else -__raw_writew (v,OMAP2_IO_ADDRESS (pa)); +__raw_writew (v,OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_writew);
@@ -187,6 +187,6 @@ void omap_writel(u32 v, u32 pa)if (cpu_class_is_omap1 ())__raw_writel (v,OMAP1_IO_ADDRESS (pa));else -__raw_writel (v,OMAP2_IO_ADDRESS (pa)); +__raw_writel (v,OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_writel);
arch/arm/plat-omap/sram.c +10 -10
@@ -56,16 +56,16 @@#define SRAM_BOOTLOADER_SZ 0x80#endif -#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 OMAP24XX_VA_REQINFOPERM0 OMAP2_L3_IO_ADDRESS(0x68005048) +#define OMAP24XX_VA_READPERM0 OMAP2_L3_IO_ADDRESS(0x68005050) +#define OMAP24XX_VA_WRITEPERM0 OMAP2_L3_IO_ADDRESS(0x68005058) + +#define OMAP34XX_VA_REQINFOPERM0 OMAP2_L3_IO_ADDRESS(0x68012848) +#define OMAP34XX_VA_READPERM0 OMAP2_L3_IO_ADDRESS(0x68012850) +#define OMAP34XX_VA_WRITEPERM0 OMAP2_L3_IO_ADDRESS(0x68012858) +#define OMAP34XX_VA_ADDR_MATCH2 OMAP2_L3_IO_ADDRESS(0x68012880) +#define OMAP34XX_VA_SMS_RG_ATT0 OMAP2_L3_IO_ADDRESS(0x6C000048) +#define OMAP34XX_VA_CONTROL_STAT OMAP2_L4_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 (OMAP2_IO_ADDRESS (RFBI_CONTROL )); + l =__raw_readl (OMAP2_L4_IO_ADDRESS (RFBI_CONTROL )); l |= enable ?0 : (1 <<1 ); -__raw_writel (l,OMAP2_IO_ADDRESS (RFBI_CONTROL )); +__raw_writel (l,OMAP2_L4_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 ,OMAP2_IO_ADDRESS (0x680050a0 )); +__raw_writel (0x402000b0 ,OMAP2_L3_IO_ADDRESS (0x680050a0 ));if ((r =alloc_palette_ram ()) <0 ) goto fail2;
Signature · 1 line
1.5.4.7
PATCH 2/5 ARM: OMAP2/3/4: Remap L3, L4 to get more kernel io address space
This patch remap L3 and L4 io space to get more kernel address space. With this patch, 512 MB of IO space is reclaimed.
Some more combinations are possible but to make it uniform across OMAP24XX, OMAP34XX and OMAP4430, these io combinations are chosen
Once this is reviewed and tested sufficiently, a documentation entry can be created to ease up reading and debugging.
Like "Documentation/arm/omap/io_map.txt"
--- arch/arm/plat-omap/include/mach/io.h | 97 +++++++++++++++++----------- arch/arm/plat-omap/include/mach/vmalloc.h | 2 +- 2 files changed, 60 insertions(+), 39 deletions(-)
arch/arm/plat-omap/include/mach/io.h +59 -38
@@ -66,8 +66,18 @@#define OMAP2_L3_IO_OFFSET 0x90000000#define OMAP2_L3_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L3_IO_OFFSET)/* L3 */ -#define OMAP2_L4_IO_OFFSET 0x90000000 +#define OMAP4_L3_IO_OFFSET 0xb4000000 +#define OMAP4_L3_IO_ADDRESS (pa) IOMEM((pa) + OMAP4_L3_IO_OFFSET)/* L3 */ + +#define OMAP4_GPMC_IO_OFFSET 0xa9000000 +#define OMAP4_GPMC_IO_ADDRESS (pa) IOMEM((pa) + OMAP4_GPMC_IO_OFFSET) + +#define OMAP2_L4_IO_OFFSET 0xb2000000#define OMAP2_L4_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET)/* L4 */ + +/* EMU mapping is not used anywhere in OMAP. Still mapping incase needed */ +#define OMAP2_EMU_IO_OFFSET 0xaa800000/* Emulation */ +#define OMAP2_EMU_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_EMU_IO_OFFSET)/* * ---------------------------------------------------------------------------- * Omap1 specific IO mapping
@@ -85,24 +95,27 @@*/ /* We map both L3 and L4 on OMAP2 */ -#define L3_24XX_PHYS L3_24XX_BASE/* 0x68000000 */ -#define L3_24XX_VIRT 0xf8000000 +#define L3_24XX_PHYS L3_24XX_BASE/* 0x68000000 --> 0xf8000000*/ +#define L3_24XX_VIRT (L3_24XX_PHYS + OMAP2_L3_IO_OFFSET)#define L3_24XX_SIZE SZ_1M/* 44kB of 128MB used, want 1MB sect */ -#define L4_24XX_PHYS L4_24XX_BASE/* 0x48000000 */ -#define L4_24XX_VIRT 0xd8000000 +#define L4_24XX_PHYS L4_24XX_BASE/* 0x48000000 --> 0xfa000000 */ +#define L4_24XX_VIRT (L4_24XX_PHYS + OMAP2_L4_IO_OFFSET)#define L4_24XX_SIZE SZ_1M/* 1MB of 128MB used, want 1MB sect */ -#define L4_WK_243X_PHYS L4_WK_243X_BASE/* 0x49000000 */ -#define L4_WK_243X_VIRT 0xd9000000 +#define L4_WK_243X_PHYS L4_WK_243X_BASE/* 0x49000000 --> 0xfb000000 */ +#define L4_WK_243X_VIRT (L4_WK_243X_PHYS + OMAP2_L4_IO_OFFSET)#define L4_WK_243X_SIZE SZ_1M -#define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE/* 0x49000000 */ -#define OMAP243X_GPMC_VIRT 0xFE000000 +#define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE +#define OMAP243X_GPMC_VIRT (OMAP243X_GPMC_PHYS + OMAP2_L3_IO_OFFSET) +/* 0x6e000000 --> 0xfe000000 */ #define OMAP243X_GPMC_SIZE SZ_1M#define OMAP243X_SDRC_PHYS OMAP243X_SDRC_BASE -#define OMAP243X_SDRC_VIRT 0xFD000000 +/* 0x6D000000 --> 0xfd000000 */ +#define OMAP243X_SDRC_VIRT (OMAP243X_SDRC_PHYS + OMAP2_L3_IO_OFFSET)#define OMAP243X_SDRC_SIZE SZ_1M#define OMAP243X_SMS_PHYS OMAP243X_SMS_BASE -#define OMAP243X_SMS_VIRT 0xFC000000 +/* 0x6c000000 --> 0xfc000000 */ +#define OMAP243X_SMS_VIRT (OMAP243X_SMS_PHYS + OMAP2_L3_IO_OFFSET)#define OMAP243X_SMS_SIZE SZ_1M/* DSP */
@@ -123,12 +136,12 @@*/ /* We map both L3 and L4 on OMAP3 */ -#define L3_34XX_PHYS L3_34XX_BASE/* 0x68000000 */ -#define L3_34XX_VIRT 0xf8000000 +#define L3_34XX_PHYS L3_34XX_BASE/* 0x68000000 --> 0xf8000000 */ +#define L3_34XX_VIRT (L3_34XX_PHYS + OMAP2_L3_IO_OFFSET)#define L3_34XX_SIZE SZ_1M/* 44kB of 128MB used, want 1MB sect */ -#define L4_34XX_PHYS L4_34XX_BASE/* 0x48000000 */ -#define L4_34XX_VIRT 0xd8000000 +#define L4_34XX_PHYS L4_34XX_BASE/* 0x48000000 --> 0xfa000000 */ +#define L4_34XX_VIRT (L4_34XX_PHYS + OMAP2_L4_IO_OFFSET)#define L4_34XX_SIZE SZ_4M/* 1MB of 128MB used, want 1MB sect */ /*
@@ -136,28 +149,33 @@* VPOM3430 was not working for Int controller */ -#define L4_WK_34XX_PHYS L4_WK_34XX_BASE/* 0x48300000 */ -#define L4_WK_34XX_VIRT 0xd8300000 +#define L4_WK_34XX_PHYS L4_WK_34XX_BASE/* 0x48300000 --> 0xfa300000 */ +#define L4_WK_34XX_VIRT (L4_WK_34XX_PHYS + OMAP2_L4_IO_OFFSET)#define L4_WK_34XX_SIZE SZ_1M -#define L4_PER_34XX_PHYS L4_PER_34XX_BASE/* 0x49000000 */ -#define L4_PER_34XX_VIRT 0xd9000000 +#define L4_PER_34XX_PHYS L4_PER_34XX_BASE +/* 0x49000000 --> 0xfb000000 */ +#define L4_PER_34XX_VIRT (L4_PER_34XX_PHYS + OMAP2_L4_IO_OFFSET)#define L4_PER_34XX_SIZE SZ_1M -#define L4_EMU_34XX_PHYS L4_EMU_34XX_BASE/* 0x54000000 */ -#define L4_EMU_34XX_VIRT 0xe4000000 -#define L4_EMU_34XX_SIZE SZ_64M +#define L4_EMU_34XX_PHYS L4_EMU_34XX_BASE +/* 0x54000000 --> 0xfe800000 */ +#define L4_EMU_34XX_VIRT (L4_EMU_34XX_PHYS + OMAP2_EMU_IO_OFFSET) +#define L4_EMU_34XX_SIZE SZ_8M -#define OMAP34XX_GPMC_PHYS OMAP34XX_GPMC_BASE/* 0x6E000000 */ -#define OMAP34XX_GPMC_VIRT 0xFE000000 +#define OMAP34XX_GPMC_PHYS OMAP34XX_GPMC_BASE +/* 0x6e000000 --> 0xfe000000 */ +#define OMAP34XX_GPMC_VIRT (OMAP34XX_GPMC_PHYS + OMAP2_L3_IO_OFFSET)#define OMAP34XX_GPMC_SIZE SZ_1M -#define OMAP343X_SMS_PHYS OMAP343X_SMS_BASE/* 0x6C000000 */ -#define OMAP343X_SMS_VIRT 0xFC000000 +#define OMAP343X_SMS_PHYS OMAP343X_SMS_BASE +/* 0x6c000000 --> 0xfc000000 */ +#define OMAP343X_SMS_VIRT (OMAP343X_SMS_PHYS + OMAP2_L3_IO_OFFSET)#define OMAP343X_SMS_SIZE SZ_1M -#define OMAP343X_SDRC_PHYS OMAP343X_SDRC_BASE/* 0x6D000000 */ -#define OMAP343X_SDRC_VIRT 0xFD000000 +#define OMAP343X_SDRC_PHYS OMAP343X_SDRC_BASE +/* 0x6D000000 --> 0xfd000000 */ +#define OMAP343X_SDRC_VIRT (OMAP343X_SDRC_PHYS + OMAP2_L3_IO_OFFSET)#define OMAP343X_SDRC_SIZE SZ_1M/* DSP */
@@ -178,29 +196,32 @@*/ /* We map both L3 and L4 on OMAP4 */ -#define L3_44XX_PHYS L3_44XX_BASE -#define L3_44XX_VIRT 0xd4000000 +#define L3_44XX_PHYS L3_44XX_BASE/* 0x44000000 --> 0xf8000000 */ +#define L3_44XX_VIRT (L3_44XX_PHYS + OMAP4_L3_IO_OFFSET)#define L3_44XX_SIZE SZ_1M -#define L4_44XX_PHYS L4_44XX_BASE -#define L4_44XX_VIRT 0xda000000 +#define L4_44XX_PHYS L4_44XX_BASE/* 0x4a000000 --> 0xfc000000 */ +#define L4_44XX_VIRT (L4_44XX_PHYS + OMAP2_L4_IO_OFFSET)#define L4_44XX_SIZE SZ_4M -#define L4_WK_44XX_PHYS L4_WK_44XX_BASE -#define L4_WK_44XX_VIRT 0xda300000 +#define L4_WK_44XX_PHYS L4_WK_44XX_BASE/* 0x4a300000 --> 0xfc300000 */ +#define L4_WK_44XX_VIRT (L4_WK_44XX_PHYS + OMAP2_L4_IO_OFFSET)#define L4_WK_44XX_SIZE SZ_1M#define L4_PER_44XX_PHYS L4_PER_44XX_BASE -#define L4_PER_44XX_VIRT 0xd8000000 +/* 0x48000000 --> 0xfa000000 */ +#define L4_PER_44XX_VIRT (L4_PER_44XX_PHYS + OMAP2_L4_IO_OFFSET)#define L4_PER_44XX_SIZE SZ_4M#define L4_EMU_44XX_PHYS L4_EMU_44XX_BASE -#define L4_EMU_44XX_VIRT 0xe4000000 -#define L4_EMU_44XX_SIZE SZ_64M +/* 0x54000000 --> 0xfe800000 */ +#define L4_EMU_44XX_VIRT (L4_EMU_44XX_PHYS + OMAP2_EMU_IO_OFFSET) +#define L4_EMU_44XX_SIZE SZ_8M#define OMAP44XX_GPMC_PHYS OMAP44XX_GPMC_BASE -#define OMAP44XX_GPMC_VIRT 0xe0000000 +/* 0x50000000 --> 0xf9000000 */ +#define OMAP44XX_GPMC_VIRT (OMAP44XX_GPMC_PHYS + OMAP4_GPMC_IO_OFFSET)#define OMAP44XX_GPMC_SIZE SZ_1M
arch/arm/plat-omap/include/mach/vmalloc.h +1 -1
@@ -17,5 +17,5 @@* along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define VMALLOC_END (PAGE_OFFSET + 0x18000000) +#define VMALLOC_END (PAGE_OFFSET + 0x38000000)
Signature · 1 line
1.5.4.7
PATCH 3/5 ARM: OMAP2/3/4: Move SRAM map to claim more io space
This patch moves SRAM map to free up more kernel address io space.
--- arch/arm/plat-omap/sram.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/sram.c +3 -3
@@ -41,14 +41,14 @@#define OMAP1_SRAM_VA VMALLOC_END#define OMAP2_SRAM_PA 0x40200000#define OMAP2_SRAM_PUB_PA 0x4020f800 -#define OMAP2_SRAM_VA 0xe3000000 +#define OMAP2_SRAM_VA 0xfe400000#define OMAP2_SRAM_PUB_VA (OMAP2_SRAM_VA + 0x800)#define OMAP3_SRAM_PA 0x40200000 -#define OMAP3_SRAM_VA 0xe3000000 +#define OMAP3_SRAM_VA 0xfe400000#define OMAP3_SRAM_PUB_PA 0x40208000#define OMAP3_SRAM_PUB_VA (OMAP3_SRAM_VA + 0x8000)#define OMAP4_SRAM_PA 0x40200000/*0x402f0000*/ -#define OMAP4_SRAM_VA 0xd7000000/*0xd70f0000*/ +#define OMAP4_SRAM_VA 0xfe400000/*0xfe4f0000*/ #if defined(CONFIG_ARCH_OMAP24XX ) || defined(CONFIG_ARCH_OMAP34XX )#define SRAM_BOOTLOADER_SZ 0x00
Signature · 1 line
1.5.4.7
PATCH 4/5 ARM: OMAP2/3/4: Fix DEBUG_LL UART io address
This patch fixes the low level debug UART io address as per this series. The change is essential to have CONFIG_DEBUG_LL working.
--- arch/arm/mach-omap2/board-2430sdp.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-4430sdp.c | 2 +- arch/arm/mach-omap2/board-apollon.c | 2 +- arch/arm/mach-omap2/board-generic.c | 2 +- arch/arm/mach-omap2/board-h4.c | 2 +- arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 2 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/board-zoom2.c | 2 +- arch/arm/plat-omap/include/mach/debug-macro.S | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-)
arch/arm/mach-omap2/board-2430sdp.c +1 -1
@@ -227,7 +227,7 @@ static void __init omap_2430sdp_map_io(void)MACHINE_START (OMAP_2430SDP ,"OMAP2430 sdp2430 board" )/* Maintainer: Syed Khasim - Texas Instruments Inc */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap_2430sdp_map_io, .init_irq = omap_2430sdp_init_irq,
arch/arm/mach-omap2/board-3430sdp.c +1 -1
@@ -506,7 +506,7 @@ static void __init omap_3430sdp_map_io(void)MACHINE_START (OMAP_3430SDP ,"OMAP3430 3430SDP board" )/* Maintainer: Syed Khasim - Texas Instruments Inc */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap_3430sdp_map_io, .init_irq = omap_3430sdp_init_irq,
arch/arm/mach-omap2/board-4430sdp.c +1 -1
@@ -85,7 +85,7 @@ static void __init omap_4430sdp_map_io(void)MACHINE_START (OMAP_4430SDP ,"OMAP4430 4430SDP board" )/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap_4430sdp_map_io, .init_irq = omap_4430sdp_init_irq,
arch/arm/mach-omap2/board-apollon.c +1 -1
@@ -338,7 +338,7 @@ static void __init omap_apollon_map_io(void)MACHINE_START (OMAP_APOLLON ,"OMAP24xx Apollon" )/* Maintainer: Kyungmin Park <[email protected]> */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap_apollon_map_io, .init_irq = omap_apollon_init_irq,
arch/arm/mach-omap2/board-generic.c +1 -1
@@ -61,7 +61,7 @@ static void __init omap_generic_map_io(void)MACHINE_START (OMAP_GENERIC ,"Generic OMAP24xx" )/* Maintainer: Paul Mundt <[email protected]> */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap_generic_map_io, .init_irq = omap_generic_init_irq,
arch/arm/mach-omap2/board-h4.c +1 -1
@@ -381,7 +381,7 @@ static void __init omap_h4_map_io(void)MACHINE_START (OMAP_H4 ,"OMAP2420 H4 board" )/* Maintainer: Paul Mundt <[email protected]> */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap_h4_map_io, .init_irq = omap_h4_init_irq,
arch/arm/mach-omap2/board-ldp.c +1 -1
@@ -400,7 +400,7 @@ static void __init omap_ldp_map_io(void)MACHINE_START (OMAP_LDP ,"OMAP LDP board" ) .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap_ldp_map_io, .init_irq = omap_ldp_init_irq,
arch/arm/mach-omap2/board-omap3beagle.c +1 -1
@@ -424,7 +424,7 @@ static void __init omap3_beagle_map_io(void)MACHINE_START (OMAP3_BEAGLE ,"OMAP3 Beagle Board" )/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap3_beagle_map_io, .init_irq = omap3_beagle_init_irq,
arch/arm/mach-omap2/board-omap3evm.c +1 -1
@@ -325,7 +325,7 @@ static void __init omap3_evm_map_io(void)MACHINE_START (OMAP3EVM ,"OMAP3 EVM" )/* Maintainer: Syed Mohammed Khasim - Texas Instruments */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap3_evm_map_io, .init_irq = omap3_evm_init_irq,
arch/arm/mach-omap2/board-omap3pandora.c +1 -1
@@ -413,7 +413,7 @@ static void __init omap3pandora_map_io(void)MACHINE_START (OMAP3_PANDORA ,"Pandora Handheld Console" ) .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap3pandora_map_io, .init_irq = omap3pandora_init_irq,
arch/arm/mach-omap2/board-overo.c +1 -1
@@ -455,7 +455,7 @@ static void __init overo_map_io(void)MACHINE_START (OVERO ,"Gumstix Overo" ) .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = overo_map_io, .init_irq = overo_init_irq,
arch/arm/mach-omap2/board-rx51.c +1 -1
@@ -90,7 +90,7 @@ static void __init rx51_map_io(void)MACHINE_START (NOKIA_RX51 ,"Nokia RX-51 board" )/* Maintainer: Lauri Leukkunen <[email protected]> */ .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = rx51_map_io, .init_irq = rx51_init_irq,
arch/arm/mach-omap2/board-zoom2.c +1 -1
@@ -101,7 +101,7 @@ static void __init omap_zoom2_map_io(void)MACHINE_START (OMAP_ZOOM2 ,"OMAP Zoom2 board" ) .phys_io = 0x48000000, - .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, .boot_params = 0x80000100, .map_io = omap_zoom2_map_io, .init_irq = omap_zoom2_init_irq,
arch/arm/plat-omap/include/mach/debug-macro.S +2 -2
@@ -27,7 +27,7 @@ #elif CONFIG_ARCH_OMAP2 moveq \rx, #0x48000000 @ physical base address - movne \rx, #0xd8000000 @ virtual base + movne \rx, #0xfa000000 @ virtual base orr \rx, \rx, #0x0006a000 #ifdef CONFIG_OMAP_LL_DEBUG_UART2 add \rx, \rx, #0x00002000 @ UART 2
@@ -38,7 +38,7 @@ #elif defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) moveq \rx, #0x48000000 @ physical base address - movne \rx, #0xd8000000 @ virtual base + movne \rx, #0xfa000000 @ virtual base orr \rx, \rx, #0x0006a000 #ifdef CONFIG_OMAP_LL_DEBUG_UART2 add \rx, \rx, #0x00002000 @ UART 2
Signature · 1 line
1.5.4.7
PATCH 5/5 ARM: OMAP2/3/4: Add OMAP4 L3 and L4 peripherals.
This patch adds few necessary peripherals for OMAP4.
--- arch/arm/mach-omap2/io.c | 18 +++++++++++++++++ arch/arm/plat-omap/include/mach/io.h | 29 +++++++++++++++++++++++++-- arch/arm/plat-omap/include/mach/omap44xx.h | 3 ++ arch/arm/plat-omap/io.c | 8 +++++++ 4 files changed, 55 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/io.c +18 -0
@@ -197,6 +197,24 @@ static struct map_desc omap44xx_io_desc[] __initdata = { .type = MT_DEVICE, }, { + .virtual = OMAP44XX_EMIF1_VIRT, + .pfn = __phys_to_pfn(OMAP44XX_EMIF1_PHYS), + .length = OMAP44XX_EMIF1_SIZE, + .type = MT_DEVICE, + }, + { + .virtual = OMAP44XX_EMIF2_VIRT, + .pfn = __phys_to_pfn(OMAP44XX_EMIF2_PHYS), + .length = OMAP44XX_EMIF2_SIZE, + .type = MT_DEVICE, + }, + { + .virtual = OMAP44XX_DMM_VIRT, + .pfn = __phys_to_pfn(OMAP44XX_DMM_PHYS), + .length = OMAP44XX_DMM_SIZE, + .type = MT_DEVICE, + }, + { .virtual = L4_PER_44XX_VIRT, .pfn = __phys_to_pfn(L4_PER_44XX_PHYS), .length = L4_PER_44XX_SIZE,
arch/arm/plat-omap/include/mach/io.h +26 -3
@@ -66,15 +66,19 @@#define OMAP2_L3_IO_OFFSET 0x90000000#define OMAP2_L3_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L3_IO_OFFSET)/* L3 */ + +#define OMAP2_L4_IO_OFFSET 0xb2000000 +#define OMAP2_L4_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET)/* L4 */ +#define OMAP4_L3_IO_OFFSET 0xb4000000#define OMAP4_L3_IO_ADDRESS (pa) IOMEM((pa) + OMAP4_L3_IO_OFFSET)/* L3 */ +#define OMAP4_L3_PER_IO_OFFSET 0xb1100000 +#define OMAP4_L3_PER_IO_ADDRESS (pa) IOMEM((pa) + OMAP4_L3_PER_IO_OFFSET) +#define OMAP4_GPMC_IO_OFFSET 0xa9000000#define OMAP4_GPMC_IO_ADDRESS (pa) IOMEM((pa) + OMAP4_GPMC_IO_OFFSET) -#define OMAP2_L4_IO_OFFSET 0xb2000000 -#define OMAP2_L4_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET)/* L4 */ -/* EMU mapping is not used anywhere in OMAP. Still mapping incase needed */ #define OMAP2_EMU_IO_OFFSET 0xaa800000/* Emulation */ #define OMAP2_EMU_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_EMU_IO_OFFSET)
@@ -214,6 +218,11 @@#define L4_PER_44XX_VIRT (L4_PER_44XX_PHYS + OMAP2_L4_IO_OFFSET)#define L4_PER_44XX_SIZE SZ_4M +#define L4_ABE_44XX_PHYS L4_ABE_44XX_BASE +/* 0x49000000 --> 0xfb000000 */ +#define L4_ABE_44XX_VIRT (L4_ABE_44XX_PHYS + OMAP2_L4_IO_OFFSET) +#define L4_ABE_44XX_SIZE SZ_1M +#define L4_EMU_44XX_PHYS L4_EMU_44XX_BASE/* 0x54000000 --> 0xfe800000 */ #define L4_EMU_44XX_VIRT (L4_EMU_44XX_PHYS + OMAP2_EMU_IO_OFFSET)
@@ -225,6 +234,20 @@#define OMAP44XX_GPMC_SIZE SZ_1M +#define OMAP44XX_EMIF1_PHYS OMAP44XX_EMIF1_BASE +/* 0x4c000000 --> 0xfd100000 */ +#define OMAP44XX_EMIF1_VIRT (OMAP44XX_EMIF1_PHYS + OMAP4_L3_PER_IO_OFFSET) +#define OMAP44XX_EMIF1_SIZE SZ_1M + +#define OMAP44XX_EMIF2_PHYS OMAP44XX_EMIF2_BASE +/* 0x4d000000 --> 0xfd200000 */ +#define OMAP44XX_EMIF2_VIRT (OMAP44XX_EMIF2_PHYS + OMAP4_L3_PER_IO_OFFSET) +#define OMAP44XX_EMIF2_SIZE SZ_1M + +#define OMAP44XX_DMM_PHYS OMAP44XX_DMM_BASE +/* 0x4e000000 --> 0xfd300000 */ +#define OMAP44XX_DMM_VIRT (OMAP44XX_DMM_PHYS + OMAP4_L3_PER_IO_OFFSET) +#define OMAP44XX_DMM_SIZE SZ_1M/* * ---------------------------------------------------------------------------- * Omap specific register access
arch/arm/plat-omap/include/mach/omap44xx.h +3 -0
@@ -22,6 +22,9 @@#define L4_PER_44XX_BASE 0x48000000#define L4_EMU_44XX_BASE 0x54000000#define L3_44XX_BASE 0x44000000 +#define OMAP44XX_EMIF1_BASE 0x4c000000 +#define OMAP44XX_EMIF2_BASE 0x4d000000 +#define OMAP44XX_DMM_BASE 0x4e000000#define OMAP4430_32KSYNCT_BASE 0x4a304000#define OMAP4430_CM_BASE 0x4a004000#define OMAP4430_PRM_BASE 0x48306000
arch/arm/plat-omap/io.c +8 -0
@@ -114,6 +114,14 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)return XLATE (p,L4_WK_44XX_PHYS ,L4_WK_44XX_VIRT );if (BETWEEN (p,OMAP44XX_GPMC_PHYS ,OMAP44XX_GPMC_SIZE ))return XLATE (p,OMAP44XX_GPMC_PHYS ,OMAP44XX_GPMC_VIRT ); +if (BETWEEN (p,OMAP44XX_EMIF1_PHYS ,OMAP44XX_EMIF1_SIZE )) +return XLATE (p,OMAP44XX_EMIF1_PHYS , \ +OMAP44XX_EMIF1_VIRT ); +if (BETWEEN (p,OMAP44XX_EMIF2_PHYS ,OMAP44XX_EMIF2_SIZE )) +return XLATE (p,OMAP44XX_EMIF2_PHYS , \ +OMAP44XX_EMIF2_VIRT ); +if (BETWEEN (p,OMAP44XX_DMM_PHYS ,OMAP44XX_DMM_SIZE )) +return XLATE (p,OMAP44XX_DMM_PHYS ,OMAP44XX_DMM_VIRT );if (BETWEEN (p,L4_PER_44XX_PHYS ,L4_PER_44XX_SIZE ))return XLATE (p,L4_PER_44XX_PHYS ,L4_PER_44XX_VIRT );if (BETWEEN (p,L4_EMU_44XX_PHYS ,L4_EMU_44XX_SIZE ))
Signature · 1 line
1.5.4.7
Tony Lindgren
maintainerPATCH 5/5 ARM: OMAP2/3/4: Add OMAP4 L3 and L4 peripherals.
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Branch in linux-omap: omap-headers
Initial commit ID (Likely to change): dc171a614162c9857d0567878617a6b261278b53
PatchWorks
http://patchwork.kernel.org/patch/43501/
Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=dc171a614162c9857d0567878617a6b261278b53
Tony Lindgren
maintainerPATCH 4/5 ARM: OMAP2/3/4: Fix DEBUG_LL UART io address
In reply to Santosh ShilimkarThis patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Branch in linux-omap: omap-headers
Initial commit ID (Likely to change): 46eb041bc25a9f7c3511298efbc61ae3947115b2
PatchWorks
http://patchwork.kernel.org/patch/43502/
Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=46eb041bc25a9f7c3511298efbc61ae3947115b2
Tony Lindgren
maintainerPATCH 3/5 ARM: OMAP2/3/4: Move SRAM map to claim more io space
In reply to Santosh ShilimkarThis patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Branch in linux-omap: omap-headers
Initial commit ID (Likely to change): 852d65020549b1c379dd6e0338de7b9ac8970fd0
PatchWorks
http://patchwork.kernel.org/patch/43500/
Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=852d65020549b1c379dd6e0338de7b9ac8970fd0
Santosh
Quoted 7 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Shilimkar, Santosh
Sent: Sunday, August 23, 2009 8:35 AM
To: [email protected]; [email protected]
Cc: [email protected]; Shilimkar, Santosh
Subject: [PATCH 1/5] ARM: OMAP2/3/4: SplitOMAP2_IO_ADDRESSto L3 and L4
That sure is a big cleanup patch and would take patience to complete!!
Quoted 3 lines
This patch splits
OMAP2_IO_ADDRESStoOMAP2_L3_IO_ADDRESSandOMAP2_L4_IO_ADDRESSto reclaim more IO space.
There is no reclaim of space with this patch. Its done with [2/5]
This patch only changes the macro definitions but the offsets are still the same as in old code. So the description needs to be more explicit as to why you introduced L3/L4 macro split.
Another suggestion to minimize the so intrusive code change: As per the wiki approach: [1] Lot of code will remain un-touched if you re-used the existing IO_OFFSET macro as follows ---
---
#define L3_IO_OFFSET 0x90000000
#define __L3_IO_ADDRESS(pa) ((pa) + L3_IO_OFFSET)/* Works for L3 */
#define __OMAP2_L3_IO_ADDRESS(pa) ((pa) + L3_IO_OFFSET)/* Works for L3 */
#define l3_io_v2p(va) ((va) - L3_IO_OFFSET)/* Works for L3 */
#define IO_OFFSET 0xb2000000
#define __IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L4 */
#define __OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L4 */
#define io_v2p(va) ((va) - IO_OFFSET)/* Works for L4*/
---
This way you don't have to introduce new L4 macro at all => much lesser code impact.
[1] http://wiki.davincidsp.com/index.php/HOWTO_Support_512MB_SDRAM
Quoted 4 lines
The omap_read*() and omap_write*() functions will work only over L4 address space. Current omap kernel stack uses these functions only to access registers over L4 io address space
Since the patch touches all IP blocks in OMAP,
what if put a check in omap_read*/omap_write* if anyone passes an L3 address and return a KERN_ERR
Earlier code it was possible to pass L3 as well as L4 addresses to this function. An Error log will surely go a long way in debug.
Quoted 84 lines
Signed-off-by Santosh Shilimkar <[email protected]>---
arch/arm/plat-omap/io.c| 12 +++---23 files changed, 117 insertions(+), 105 deletions(-)arch/arm/plat-omap/include/mach/io.h +4
-2@@ -63,9 +63,11 @@#define OMAP1_IO_OFFSET 0x01000000/* Virtual IO = 0xfefb0000 */ #define OMAP1_IO_ADDRESS (pa) IOMEM((pa) - OMAP1_IO_OFFSET) -#define OMAP2_IO_OFFSET 0x90000000 -#define OMAP2_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_IO_OFFSET)/* L3 and L4 */ +#define OMAP2_L3_IO_OFFSET 0x90000000 +#define OMAP2_L3_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L3_IO_OFFSET)/* L3 */ +#define OMAP2_L4_IO_OFFSET 0x90000000 +#define OMAP2_L4_IO_ADDRESS (pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET)/* L4 */ /* * ----------------------------------------------------------------------------
* Omap1 specific IO mappingarch/arm/plat-omap/io.c +6
-6@@ -142,7 +142,7 @@ u8 omap_readb(u32 pa)if (cpu_class_is_omap1 ())return __raw_readb (OMAP1_IO_ADDRESS (pa));else -return __raw_readb (OMAP2_IO_ADDRESS (pa)); +return __raw_readb (OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_readb);@@ -151,7 +151,7 @@ u16 omap_readw(u32 pa)if (cpu_class_is_omap1 ())return __raw_readw (OMAP1_IO_ADDRESS (pa));else -return __raw_readw (OMAP2_IO_ADDRESS (pa)); +return __raw_readw (OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_readw);@@ -160,7 +160,7 @@ u32 omap_readl(u32 pa)if (cpu_class_is_omap1 ())return __raw_readl (OMAP1_IO_ADDRESS (pa));else -return __raw_readl (OMAP2_IO_ADDRESS (pa)); +return __raw_readl (OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_readl);@@ -169,7 +169,7 @@ void omap_writeb(u8 v, u32 pa)if (cpu_class_is_omap1 ())__raw_writeb (v,OMAP1_IO_ADDRESS (pa));else -__raw_writeb (v,OMAP2_IO_ADDRESS (pa)); +__raw_writeb (v,OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_writeb);@@ -178,7 +178,7 @@ void omap_writew(u16 v, u32 pa)if (cpu_class_is_omap1 ())__raw_writew (v,OMAP1_IO_ADDRESS (pa));else -__raw_writew (v,OMAP2_IO_ADDRESS (pa)); +__raw_writew (v,OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_writew);@@ -187,6 +187,6 @@ void omap_writel(u32 v, u32 pa)if (cpu_class_is_omap1 ())__raw_writel (v,OMAP1_IO_ADDRESS (pa));else -__raw_writel (v,OMAP2_IO_ADDRESS (pa)); +__raw_writel (v,OMAP2_L4_IO_ADDRESS (pa)); }EXPORT_SYMBOL (omap_writel);
Quoted 9 lines
-----Original Message-----
Quoted 1 line
From: [email protected] [mailto:linux-omap-
[email protected]] On Behalf Of
Quoted 5 lines
Shilimkar, Santosh
Sent: Sunday, August 23, 2009 8:35 AM
To: [email protected]; [email protected]
Cc: [email protected]; Shilimkar, Santosh
Subject: [PATCH 1/5] ARM: OMAP2/3/4: SplitOMAP2_IO_ADDRESSto L3 and L4
Quoted 7 lines
That sure is a big cleanup patch and would take patience to complete!!
Quoted 3 lines
This patch splits
OMAP2_IO_ADDRESStoOMAP2_L3_IO_ADDRESSandOMAP2_L4_IO_ADDRESSto reclaim more IO space.There is no reclaim of space with this patch. Its done with [2/5]
Yes comment is valid. I wanted to put - "This patch splits OMAP2_IO_ADDRESS to OMAP2_L3_IO_ADDRESS and OMAP2_L4_IO_ADDRESS to enable freeing up of more IO space.
Quoted 16 lines
This patch only changes the macro definitions but the offsets are still the same as in old code.
So the description needs to be more explicit as to why you introduced L3/L4 macro split.Another suggestion to minimize the so intrusive code change: As per the wiki approach: [1]
Lot of code will remain un-touched if you re-used the existingIO_OFFSETmacro as follows ---
---
#defineL3_IO_OFFSET0x90000000
#define__L3_IO_ADDRESS(pa)((pa) + L3_IO_OFFSET)/* Works for L3 */
#define__OMAP2_L3_IO_ADDRESS(pa)((pa) + L3_IO_OFFSET)/* Works for L3
*/
#definel3_io_v2p(va)((va) - L3_IO_OFFSET)/* Works for L3 */
Quoted 8 lines
#define
IO_OFFSET0xb2000000
#define__IO_ADDRESS(pa)((pa) + IO_OFFSET)/* Works for L4 */
#define__OMAP2_IO_ADDRESS(pa)((pa) + IO_OFFSET)/* Works for L4 */
#defineio_v2p(va)((va) - IO_OFFSET)/* Works for L4*/
---This way you don't have to introduce new L4 macro at all => much lesser code impact.
Initially I thought about this but later preferred to split it. The only change what you are suggesting is instead of calling "OMAP2_L4_IO_ADDRESS", we keep that as "OMAP2_IO_ADDRESS". But the idea was to differentiate between various IO accesses because at some point of time all these has to be removed in favor of ioremap() + read*()/write*() one by one and that time this would be beneficial.
----- Original Message ----- From: "Shilimkar, Santosh" <[email protected]>
Quoted 13 lines
Quoted 13 lines
---
#defineL3_IO_OFFSET0x90000000
#define__L3_IO_ADDRESS(pa)((pa) + L3_IO_OFFSET)/* Works for L3 */ #define__OMAP2_L3_IO_ADDRESS(pa)((pa) + L3_IO_OFFSET)/* Works for L3 */
#definel3_io_v2p(va)((va) - L3_IO_OFFSET)/* Works for L3 */#define
IO_OFFSET0xb2000000
#define__IO_ADDRESS(pa)((pa) + IO_OFFSET)/* Works for L4 */ #define__OMAP2_IO_ADDRESS(pa)((pa) + IO_OFFSET)/* Works for L4 */ #defineio_v2p(va)((va) - IO_OFFSET)/* Works for L4*/
---
Quoted 4 lines
Quoted 2 lines
This way you don't have to introduce new L4 macro at all => much lesser code impact.
Initially I thought about this but later preferred to split it. The only change what you are suggesting is instead of calling "
OMAP2_L4_IO_ADDRESS", we keep >that as "OMAP2_IO_ADDRESS". But the idea was to differentiate between various IO accesses because at some point of time all these has to be removed in favor ofioremap()+ read*()/write*() one by one and that time this would be beneficial.
Does that mean all drivers, including the ones in other trees like camera, dss etc need to be modified if they are using IO_ADDRESS macros. The idea of having a macro as below was to reduce this impact.
#define __IO_ADDRESS(pa) ((pa) >= L3_34XX_PHYS ? ((pa) + L3_IO_OFFSET) : ((pa) + IO_OFFSET))
Quoted 34 lines
-----Original Message-----
From: V, Hemanth
Sent: Monday, August 24, 2009 11:40 AM
To: Shilimkar, Santosh; Pandita, Vikram; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH 1/5] ARM: OMAP2/3/4: SplitOMAP2_IO_ADDRESSto L3 and L4----- Original Message -----
From: "Shilimkar, Santosh" <[email protected]>Quoted 13 lines
Quoted 13 lines
---
#defineL3_IO_OFFSET0x90000000
#define__L3_IO_ADDRESS(pa)((pa) + L3_IO_OFFSET)/* Works for L3 */ #define__OMAP2_L3_IO_ADDRESS(pa)((pa) + L3_IO_OFFSET)/* Works for L3 */
#definel3_io_v2p(va)((va) - L3_IO_OFFSET)/* Works for L3 */#define
IO_OFFSET0xb2000000
#define__IO_ADDRESS(pa)((pa) + IO_OFFSET)/* Works for L4 */ #define__OMAP2_IO_ADDRESS(pa)((pa) + IO_OFFSET)/* Works for L4 */ #defineio_v2p(va)((va) - IO_OFFSET)/* Works for L4*/
---Quoted 6 lines
Quoted 2 lines
This way you don't have to introduce new L4 macro at all => much lesser code impact.
Initially I thought about this but later preferred to split it. The only change what you are suggesting is instead of calling "
OMAP2_L4_IO_ADDRESS", we keep >that as "OMAP2_IO_ADDRESS". But the idea was to differentiate between various IO accesses because at some pointof
Quoted 2 lines
time all these has to be removed in
favor ofioremap()+ read*()/write*() one by one and that time this
Quoted 7 lines
would
Quoted 1 line
be beneficial.
Does that mean all drivers, including the ones in other trees like camera, dss etc need to be modified if they are using
IO_ADDRESSmacros. The idea of
having a macro as below was to reduce this impact.
Going forward yes. Refer the mailing thread comments from Tony/Kevin/Richard on below thread.
http://www.mail-archive.com/[email protected]/msg14015.html
Regards,
Santosh