IB/srp: Let srp_abort() return FAST_IO_FAIL if TL offline
[linux/fpc-iii.git] / arch / mips / include / asm / mach-bcm63xx / ioremap.h
blob94e3011ba7df99b55e5c6657e218a5cccc25e1e4
1 #ifndef BCM63XX_IOREMAP_H_
2 #define BCM63XX_IOREMAP_H_
4 #include <bcm63xx_cpu.h>
6 static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size)
8 return phys_addr;
11 static inline int is_bcm63xx_internal_registers(phys_t offset)
13 switch (bcm63xx_get_cpu_id()) {
14 case BCM6338_CPU_ID:
15 case BCM6345_CPU_ID:
16 case BCM6348_CPU_ID:
17 case BCM6358_CPU_ID:
18 if (offset >= 0xfff00000)
19 return 1;
20 break;
21 case BCM6328_CPU_ID:
22 case BCM6362_CPU_ID:
23 case BCM6368_CPU_ID:
24 if (offset >= 0xb0000000 && offset < 0xb1000000)
25 return 1;
26 break;
28 return 0;
31 static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size,
32 unsigned long flags)
34 if (is_bcm63xx_internal_registers(offset))
35 return (void __iomem *)offset;
36 return NULL;
39 static inline int plat_iounmap(const volatile void __iomem *addr)
41 return is_bcm63xx_internal_registers((unsigned long)addr);
44 #endif /* BCM63XX_IOREMAP_H_ */