Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91201
b: refs/heads/master
c: 1419468
h: refs/heads/master
i:
  91199: 8e6c4e5
v: v3
  • Loading branch information
Lennert Buytenhek authored and Nicolas Pitre committed Mar 27, 2008
1 parent ca008f8 commit 921c71f
Show file tree
Hide file tree
Showing 2 changed files with 27 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: b590bc5cd0ced1019f02ca7c9b8594482304987f
refs/heads/master: 1419468ab548f990b172740d77b5c1032a790114
26 changes: 26 additions & 0 deletions trunk/include/asm-arm/arch-orion/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,37 @@
#define IO_SPACE_LIMIT 0xffffffff
#define IO_SPACE_REMAP ORION_PCI_SYS_IO_BASE

static inline void __iomem *
__arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
{
void __iomem *retval;

if (mtype == MT_DEVICE && size && paddr >= ORION_REGS_PHYS_BASE &&
paddr + size <= ORION_REGS_PHYS_BASE + ORION_REGS_SIZE) {
retval = (void __iomem *)ORION_REGS_VIRT_BASE +
(paddr - ORION_REGS_PHYS_BASE);
} else {
retval = __arm_ioremap(paddr, size, mtype);
}

return retval;
}

static inline void
__arch_iounmap(void __iomem *addr)
{
if (addr < (void __iomem *)ORION_REGS_VIRT_BASE ||
addr >= (void __iomem *)(ORION_REGS_VIRT_BASE + ORION_REGS_SIZE))
__iounmap(addr);
}

static inline void __iomem *__io(unsigned long addr)
{
return (void __iomem *)addr;
}

#define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m)
#define __arch_iounmap(a) __arch_iounmap(a)
#define __io(a) __io(a)
#define __mem_pci(a) (a)

Expand Down

0 comments on commit 921c71f

Please sign in to comment.