diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-07-29 13:49:01 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-08-01 03:42:42 -0400 |
commit | 22ae782f86b726f9cea752c0f269ff6dcdf2f6e1 (patch) | |
tree | 9458a01b24d65fa2eab27ad5bdb2fa399b3c389f /arch/microblaze/include | |
parent | 12b15e83289bc7cf2ec9a342412e0c955beeb395 (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')
-rw-r--r-- | arch/microblaze/include/asm/prom.h | 33 |
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 | */ | ||
59 | extern const u32 *of_get_address(struct device_node *dev, int index, | ||
60 | u64 *size, unsigned int *flags); | ||
61 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, | ||
62 | u64 *size, unsigned int *flags); | ||
63 | |||
64 | extern 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 |
68 | extern unsigned long pci_address_to_pio(phys_addr_t address); | 51 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
69 | #else | 52 | #define pci_address_to_pio pci_address_to_pio |
70 | static 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 | */ |
101 | struct pci_dev; | 80 | struct pci_dev; |
81 | struct of_irq; | ||
102 | extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); | 82 | extern 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 */ |