Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332307
b: refs/heads/master
c: 02f3774
h: refs/heads/master
i:
  332305: e83e462
  332303: fc114b6
v: v3
  • Loading branch information
Max Filippov authored and Chris Zankel committed Oct 3, 2012
1 parent 396ca07 commit 2f0f859
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af42e970b6097a34cb2b93ec4c12c2a226b1d008
refs/heads/master: 02f3774877382bac52972a677c2c5fbd3532a1a1
20 changes: 14 additions & 6 deletions trunk/arch/xtensa/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ static inline void * phys_to_virt(unsigned long address)
* Return the virtual (cached) address for the specified bus memory.
* Note that we currently don't support any address outside the KIO segment.
*/

static inline void *ioremap(unsigned long offset, unsigned long size)
static inline void __iomem *ioremap_nocache(unsigned long offset,
unsigned long size)
{
#ifdef CONFIG_MMU
if (offset >= XCHAL_KIO_PADDR
&& offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
&& offset - XCHAL_KIO_PADDR < XCHAL_KIO_SIZE)
return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR);
else
BUG();
Expand All @@ -81,11 +81,12 @@ static inline void *ioremap(unsigned long offset, unsigned long size)
#endif
}

static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
static inline void __iomem *ioremap_cache(unsigned long offset,
unsigned long size)
{
#ifdef CONFIG_MMU
if (offset >= XCHAL_KIO_PADDR
&& offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE)
&& offset - XCHAL_KIO_PADDR < XCHAL_KIO_SIZE)
return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR);
else
BUG();
Expand All @@ -94,7 +95,14 @@ static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
#endif
}

static inline void iounmap(void *addr)
#define ioremap_wc ioremap_nocache

static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
{
return ioremap_nocache(offset, size);
}

static inline void iounmap(volatile void __iomem *addr)
{
}

Expand Down

0 comments on commit 2f0f859

Please sign in to comment.