aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-07-29 13:49:01 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-08-01 03:42:42 -0400
commit22ae782f86b726f9cea752c0f269ff6dcdf2f6e1 (patch)
tree9458a01b24d65fa2eab27ad5bdb2fa399b3c389f /arch/microblaze/include/asm
parent12b15e83289bc7cf2ec9a342412e0c955beeb395 (diff)
of/address: Clean up function declarations
This patch moves the declaration of of_get_address(), of_get_pci_address(), and of_pci_address_to_resource() out of arch code and into the common linux/of_address header file. This patch also fixes some of the asm/prom.h ordering issues. It still includes some header files that it ideally shouldn't be, but at least the ordering is consistent now so that of_* overrides work. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/microblaze/include/asm')
-rw-r--r--arch/microblaze/include/asm/prom.h33
1 files changed, 11 insertions, 22 deletions
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index cb9c3dd9a23b..101fa098f62a 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -20,11 +20,6 @@
20#ifndef __ASSEMBLY__ 20#ifndef __ASSEMBLY__
21 21
22#include <linux/types.h> 22#include <linux/types.h>
23#include <linux/of_address.h>
24#include <linux/of_irq.h>
25#include <linux/of_fdt.h>
26#include <linux/proc_fs.h>
27#include <linux/platform_device.h>
28#include <asm/irq.h> 23#include <asm/irq.h>
29#include <asm/atomic.h> 24#include <asm/atomic.h>
30 25
@@ -52,25 +47,9 @@ extern void pci_create_OF_bus_map(void);
52 * OF address retreival & translation 47 * OF address retreival & translation
53 */ 48 */
54 49
55/* Extract an address from a device, returns the region size and
56 * the address space flags too. The PCI version uses a BAR number
57 * instead of an absolute index
58 */
59extern const u32 *of_get_address(struct device_node *dev, int index,
60 u64 *size, unsigned int *flags);
61extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no,
62 u64 *size, unsigned int *flags);
63
64extern int of_pci_address_to_resource(struct device_node *dev, int bar,
65 struct resource *r);
66
67#ifdef CONFIG_PCI 50#ifdef CONFIG_PCI
68extern unsigned long pci_address_to_pio(phys_addr_t address); 51extern unsigned long pci_address_to_pio(phys_addr_t address);
69#else 52#define pci_address_to_pio pci_address_to_pio
70static inline unsigned long pci_address_to_pio(phys_addr_t address)
71{
72 return (unsigned long)-1;
73}
74#endif /* CONFIG_PCI */ 53#endif /* CONFIG_PCI */
75 54
76/* Parse the ibm,dma-window property of an OF node into the busno, phys and 55/* Parse the ibm,dma-window property of an OF node into the busno, phys and
@@ -99,8 +78,18 @@ extern const void *of_get_mac_address(struct device_node *np);
99 * resolving using the OF tree walking. 78 * resolving using the OF tree walking.
100 */ 79 */
101struct pci_dev; 80struct pci_dev;
81struct of_irq;
102extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); 82extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
103 83
104#endif /* __ASSEMBLY__ */ 84#endif /* __ASSEMBLY__ */
105#endif /* __KERNEL__ */ 85#endif /* __KERNEL__ */
86
87/* These includes are put at the bottom because they may contain things
88 * that are overridden by this file. Ideally they shouldn't be included
89 * by this file, but there are a bunch of .c files that currently depend
90 * on it. Eventually they will be cleaned up. */
91#include <linux/of_fdt.h>
92#include <linux/of_irq.h>
93#include <linux/platform_device.h>
94
106#endif /* _ASM_MICROBLAZE_PROM_H */ 95#endif /* _ASM_MICROBLAZE_PROM_H */