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