Kelly Daly | ecb3ca2 | 2005-11-02 15:53:01 +1100 | [diff] [blame] | 1 | #ifndef _ASM_POWERPC_ISERIES_ISERIES_IO_H |
| 2 | #define _ASM_POWERPC_ISERIES_ISERIES_IO_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | |
| 5 | #ifdef CONFIG_PPC_ISERIES |
| 6 | #include <linux/types.h> |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 7 | /* |
Stephen Rothwell | 5110610 | 2006-01-12 13:51:42 +1100 | [diff] [blame] | 8 | * Created by Allan Trautman on Thu Dec 28 2000. |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 9 | * |
| 10 | * Remaps the io.h for the iSeries Io |
| 11 | * Copyright (C) 2000 Allan H Trautman, IBM Corporation |
| 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by |
| 15 | * the Free Software Foundation; either version 2 of the License, or |
| 16 | * (at your option) any later version. |
| 17 | * |
| 18 | * This program is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU General Public License |
| 24 | * along with this program; if not, write to the: |
| 25 | * Free Software Foundation, Inc., |
| 26 | * 59 Temple Place, Suite 330, |
| 27 | * Boston, MA 02111-1307 USA |
| 28 | * |
| 29 | * Change Activity: |
| 30 | * Created December 28, 2000 |
| 31 | * End Change Activity |
| 32 | */ |
| 33 | |
Stephen Rothwell | ee2cdec | 2006-01-12 13:54:20 +1100 | [diff] [blame] | 34 | #ifdef CONFIG_PCI |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress); |
| 36 | extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress); |
| 37 | extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress); |
| 38 | extern void iSeries_Write_Byte(u8 IoData, volatile void __iomem * IoAddress); |
| 39 | extern void iSeries_Write_Word(u16 IoData, volatile void __iomem * IoAddress); |
| 40 | extern void iSeries_Write_Long(u32 IoData, volatile void __iomem * IoAddress); |
| 41 | |
| 42 | extern void iSeries_memset_io(volatile void __iomem *dest, char x, size_t n); |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 43 | extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source, |
| 44 | size_t n); |
| 45 | extern void iSeries_memcpy_fromio(void *dest, |
| 46 | const volatile void __iomem *source, size_t n); |
Stephen Rothwell | ee2cdec | 2006-01-12 13:54:20 +1100 | [diff] [blame] | 47 | #else |
| 48 | static inline u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress) |
| 49 | { |
| 50 | return 0xff; |
| 51 | } |
| 52 | |
| 53 | static inline void iSeries_Write_Byte(u8 IoData, |
| 54 | volatile void __iomem *IoAddress) |
| 55 | { |
| 56 | } |
| 57 | #endif /* CONFIG_PCI */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | |
| 59 | #endif /* CONFIG_PPC_ISERIES */ |
Kelly Daly | ecb3ca2 | 2005-11-02 15:53:01 +1100 | [diff] [blame] | 60 | #endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */ |