Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272923
b: refs/heads/master
c: 8aca3ab
h: refs/heads/master
i:
  272921: 06c6c87
  272919: 9a410c7
v: v3
  • Loading branch information
Tony Lindgren committed Oct 19, 2011
1 parent 29f4d89 commit 3608494
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c3cf90117f1f4906d5975aeccc5ffd414807fd2
refs/heads/master: 8aca3ab5865f8cfbde841b6daf9442cc2279ced3
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap1/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ void __init omap16xx_map_io(void)
void omap1_init_early(void)
{
omap_check_revision();
omap_ioremap_init();

/* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
* on a Posted Write in the TIPB Bridge".
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-omap2/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ void __iomem *omap_irq_base;
static void __init omap_common_init_early(void)
{
omap2_check_revision();
omap_ioremap_init();
}

static void __init omap_hwmod_init_postsetup(void)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-omap/include/plat/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@
* NOTE: Please use ioremap + __raw_read/write where possible instead of these
*/

void omap_ioremap_init(void);

extern u8 omap_readb(u32 pa);
extern u16 omap_readw(u32 pa);
extern u32 omap_readl(u32 pa);
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/arm/plat-omap/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@
#define BETWEEN(p,st,sz) ((p) >= (st) && (p) < ((st) + (sz)))
#define XLATE(p,pst,vst) ((void __iomem *)((p) - (pst) + (vst)))

static int initialized;

/*
* Intercept ioremap() requests for addresses in our fixed mapping regions.
*/
void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
{

WARN(!initialized, "Do not use ioremap before init_early\n");

#ifdef CONFIG_ARCH_OMAP1
if (cpu_class_is_omap1()) {
if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE))
Expand Down Expand Up @@ -139,3 +144,8 @@ void omap_iounmap(volatile void __iomem *addr)
__iounmap(addr);
}
EXPORT_SYMBOL(omap_iounmap);

void __init omap_ioremap_init(void)
{
initialized++;
}

0 comments on commit 3608494

Please sign in to comment.