diff options
author | Tony Lindgren <tony@atomide.com> | 2010-12-10 20:46:24 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-10 20:46:24 +0300 |
commit | df1e9d1c218ba696e376cad371b57c0109fe98c9 (patch) | |
tree | 76c0ec709eb544d94d9735a164592d96efd59247 /arch/arm/mach-omap2/io.c | |
parent | 67b738ef32df7ec429004866d2a739a3775894d2 (diff) | |
download | linux-df1e9d1c218ba696e376cad371b57c0109fe98c9.tar.xz |
omap: Split omap_read/write functions for omap1 and omap2+
Otherwise multi-omap1 support for omap1 won't work as the cpu_class_is_omap1()
won't work until the SoC is detected.
Note that eventually these will go away, please use ioremap + read/write instead.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/io.c')
-rw-r--r-- | arch/arm/mach-omap2/io.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 3d1834906293..9804385533e5 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -375,3 +375,43 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, omap_irq_base_init(); } + +/* + * NOTE: Please use ioremap + __raw_read/write where possible instead of these + */ + +u8 omap_readb(u32 pa) +{ + return __raw_readb(OMAP2_L4_IO_ADDRESS(pa)); +} +EXPORT_SYMBOL(omap_readb); + +u16 omap_readw(u32 pa) +{ + return __raw_readw(OMAP2_L4_IO_ADDRESS(pa)); +} +EXPORT_SYMBOL(omap_readw); + +u32 omap_readl(u32 pa) +{ + return __raw_readl(OMAP2_L4_IO_ADDRESS(pa)); +} +EXPORT_SYMBOL(omap_readl); + +void omap_writeb(u8 v, u32 pa) +{ + __raw_writeb(v, OMAP2_L4_IO_ADDRESS(pa)); +} +EXPORT_SYMBOL(omap_writeb); + +void omap_writew(u16 v, u32 pa) +{ + __raw_writew(v, OMAP2_L4_IO_ADDRESS(pa)); +} +EXPORT_SYMBOL(omap_writew); + +void omap_writel(u32 v, u32 pa) +{ + __raw_writel(v, OMAP2_L4_IO_ADDRESS(pa)); +} +EXPORT_SYMBOL(omap_writel); |