aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-04-30 05:32:58 -0400
committerRalf Baechle <ralf@linux-mips.org>2012-05-15 11:49:19 -0400
commit0a4c531c2124cbb700484787327c516abbd76e70 (patch)
tree0e83fa3e46661acbafa682cd55d4a158363b4e3c /arch/mips
parenta48cf37ac8a77ddd2370be3c9af411c622ebc425 (diff)
MIPS: Provide pci_address_to_pio.
Without I/O ports won't work. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3697/
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/prom.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/include/asm/prom.h b/arch/mips/include/asm/prom.h
index 7a6e82ef449b..40ed25952e6b 100644
--- a/arch/mips/include/asm/prom.h
+++ b/arch/mips/include/asm/prom.h
@@ -12,6 +12,9 @@
12#define __ASM_PROM_H 12#define __ASM_PROM_H
13 13
14#ifdef CONFIG_OF 14#ifdef CONFIG_OF
15#include <linux/bug.h>
16#include <linux/io.h>
17#include <linux/types.h>
15#include <asm/bootinfo.h> 18#include <asm/bootinfo.h>
16 19
17extern int early_init_dt_scan_memory_arch(unsigned long node, 20extern int early_init_dt_scan_memory_arch(unsigned long node,
@@ -21,6 +24,18 @@ extern int reserve_mem_mach(unsigned long addr, unsigned long size);
21extern void free_mem_mach(unsigned long addr, unsigned long size); 24extern void free_mem_mach(unsigned long addr, unsigned long size);
22 25
23extern void device_tree_init(void); 26extern void device_tree_init(void);
27
28static inline unsigned long pci_address_to_pio(phys_addr_t address)
29{
30 /*
31 * The ioport address can be directly used by inX() / outX()
32 */
33 BUG_ON(address > IO_SPACE_LIMIT);
34
35 return (unsigned long) address;
36}
37#define pci_address_to_pio pci_address_to_pio
38
24#else /* CONFIG_OF */ 39#else /* CONFIG_OF */
25static inline void device_tree_init(void) { } 40static inline void device_tree_init(void) { }
26#endif /* CONFIG_OF */ 41#endif /* CONFIG_OF */