aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-04-07 01:23:03 -0400
committerPaul Mackerras <paulus@samba.org>2006-04-22 04:45:05 -0400
commitc256f4b9598c71afd8eb0b7d3d3790a38734cf43 (patch)
tree7366b0e03b5d9f1b0abfaa38230246f6d3875735 /include/asm-powerpc
parent81bbbe92949b069c101e13d3acbd4bc7d088cb79 (diff)
[PATCH] powerpc: remove io_page_mask
Cleanup patch which removes the io_page_mask. It fixes the reset on some e1000 devices which is needed for clean kexec reboots. The legacy devices which broke with this patch (parallel port and PC speaker) have now been fixed in Linus' tree. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/eeh.h15
-rw-r--r--include/asm-powerpc/io.h6
2 files changed, 3 insertions, 18 deletions
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h
index 868c7139dbff..2c3dc4a2b12a 100644
--- a/include/asm-powerpc/eeh.h
+++ b/include/asm-powerpc/eeh.h
@@ -293,8 +293,6 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src,
293static inline u8 eeh_inb(unsigned long port) 293static inline u8 eeh_inb(unsigned long port)
294{ 294{
295 u8 val; 295 u8 val;
296 if (!_IO_IS_VALID(port))
297 return ~0;
298 val = in_8((u8 __iomem *)(port+pci_io_base)); 296 val = in_8((u8 __iomem *)(port+pci_io_base));
299 if (EEH_POSSIBLE_ERROR(val, u8)) 297 if (EEH_POSSIBLE_ERROR(val, u8))
300 return eeh_check_failure((void __iomem *)(port), val); 298 return eeh_check_failure((void __iomem *)(port), val);
@@ -303,15 +301,12 @@ static inline u8 eeh_inb(unsigned long port)
303 301
304static inline void eeh_outb(u8 val, unsigned long port) 302static inline void eeh_outb(u8 val, unsigned long port)
305{ 303{
306 if (_IO_IS_VALID(port)) 304 out_8((u8 __iomem *)(port+pci_io_base), val);
307 out_8((u8 __iomem *)(port+pci_io_base), val);
308} 305}
309 306
310static inline u16 eeh_inw(unsigned long port) 307static inline u16 eeh_inw(unsigned long port)
311{ 308{
312 u16 val; 309 u16 val;
313 if (!_IO_IS_VALID(port))
314 return ~0;
315 val = in_le16((u16 __iomem *)(port+pci_io_base)); 310 val = in_le16((u16 __iomem *)(port+pci_io_base));
316 if (EEH_POSSIBLE_ERROR(val, u16)) 311 if (EEH_POSSIBLE_ERROR(val, u16))
317 return eeh_check_failure((void __iomem *)(port), val); 312 return eeh_check_failure((void __iomem *)(port), val);
@@ -320,15 +315,12 @@ static inline u16 eeh_inw(unsigned long port)
320 315
321static inline void eeh_outw(u16 val, unsigned long port) 316static inline void eeh_outw(u16 val, unsigned long port)
322{ 317{
323 if (_IO_IS_VALID(port)) 318 out_le16((u16 __iomem *)(port+pci_io_base), val);
324 out_le16((u16 __iomem *)(port+pci_io_base), val);
325} 319}
326 320
327static inline u32 eeh_inl(unsigned long port) 321static inline u32 eeh_inl(unsigned long port)
328{ 322{
329 u32 val; 323 u32 val;
330 if (!_IO_IS_VALID(port))
331 return ~0;
332 val = in_le32((u32 __iomem *)(port+pci_io_base)); 324 val = in_le32((u32 __iomem *)(port+pci_io_base));
333 if (EEH_POSSIBLE_ERROR(val, u32)) 325 if (EEH_POSSIBLE_ERROR(val, u32))
334 return eeh_check_failure((void __iomem *)(port), val); 326 return eeh_check_failure((void __iomem *)(port), val);
@@ -337,8 +329,7 @@ static inline u32 eeh_inl(unsigned long port)
337 329
338static inline void eeh_outl(u32 val, unsigned long port) 330static inline void eeh_outl(u32 val, unsigned long port)
339{ 331{
340 if (_IO_IS_VALID(port)) 332 out_le32((u32 __iomem *)(port+pci_io_base), val);
341 out_le32((u32 __iomem *)(port+pci_io_base), val);
342} 333}
343 334
344/* in-string eeh macros */ 335/* in-string eeh macros */
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index 68efbea379c9..4840fbf89c32 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -37,12 +37,6 @@
37 37
38extern unsigned long isa_io_base; 38extern unsigned long isa_io_base;
39extern unsigned long pci_io_base; 39extern unsigned long pci_io_base;
40extern unsigned long io_page_mask;
41
42#define MAX_ISA_PORT 0x10000
43
44#define _IO_IS_VALID(port) ((port) >= MAX_ISA_PORT || (1 << (port>>PAGE_SHIFT)) \
45 & io_page_mask)
46 40
47#ifdef CONFIG_PPC_ISERIES 41#ifdef CONFIG_PPC_ISERIES
48/* __raw_* accessors aren't supported on iSeries */ 42/* __raw_* accessors aren't supported on iSeries */