diff options
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r-- | include/asm-sparc64/of_device.h | 20 | ||||
-rw-r--r-- | include/asm-sparc64/pbm.h | 5 | ||||
-rw-r--r-- | include/asm-sparc64/prom.h | 20 | ||||
-rw-r--r-- | include/asm-sparc64/sbus.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/starfire.h | 2 |
5 files changed, 33 insertions, 15 deletions
diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h index 024088ef9d27..a62c7b997d66 100644 --- a/include/asm-sparc64/of_device.h +++ b/include/asm-sparc64/of_device.h | |||
@@ -4,11 +4,13 @@ | |||
4 | 4 | ||
5 | #include <linux/device.h> | 5 | #include <linux/device.h> |
6 | #include <linux/mod_devicetable.h> | 6 | #include <linux/mod_devicetable.h> |
7 | #include <asm/openprom.h> | ||
7 | #include <asm/prom.h> | 8 | #include <asm/prom.h> |
8 | 9 | ||
9 | extern struct bus_type isa_bus_type; | 10 | extern struct bus_type isa_bus_type; |
10 | extern struct bus_type ebus_bus_type; | 11 | extern struct bus_type ebus_bus_type; |
11 | extern struct bus_type sbus_bus_type; | 12 | extern struct bus_type sbus_bus_type; |
13 | extern struct bus_type of_bus_type; | ||
12 | 14 | ||
13 | /* | 15 | /* |
14 | * The of_device is a kind of "base class" that is a superset of | 16 | * The of_device is a kind of "base class" that is a superset of |
@@ -17,11 +19,25 @@ extern struct bus_type sbus_bus_type; | |||
17 | */ | 19 | */ |
18 | struct of_device | 20 | struct of_device |
19 | { | 21 | { |
20 | struct device_node *node; /* OF device node */ | 22 | struct device_node *node; |
21 | struct device dev; /* Generic device interface */ | 23 | struct device dev; |
24 | struct resource resource[PROMREG_MAX]; | ||
25 | unsigned int irqs[PROMINTR_MAX]; | ||
26 | int num_irqs; | ||
27 | |||
28 | void *sysdata; | ||
29 | |||
30 | int slot; | ||
31 | int portid; | ||
32 | int clock_freq; | ||
22 | }; | 33 | }; |
23 | #define to_of_device(d) container_of(d, struct of_device, dev) | 34 | #define to_of_device(d) container_of(d, struct of_device, dev) |
24 | 35 | ||
36 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); | ||
37 | extern void of_iounmap(void __iomem *base, unsigned long size); | ||
38 | |||
39 | extern struct of_device *of_find_device_by_node(struct device_node *); | ||
40 | |||
25 | extern const struct of_device_id *of_match_device( | 41 | extern const struct of_device_id *of_match_device( |
26 | const struct of_device_id *matches, const struct of_device *dev); | 42 | const struct of_device_id *matches, const struct of_device *dev); |
27 | 43 | ||
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index cebe80b1da6c..dcfa7629358c 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/oplib.h> | 17 | #include <asm/oplib.h> |
18 | #include <asm/prom.h> | 18 | #include <asm/prom.h> |
19 | #include <asm/of_device.h> | ||
19 | #include <asm/iommu.h> | 20 | #include <asm/iommu.h> |
20 | 21 | ||
21 | /* The abstraction used here is that there are PCI controllers, | 22 | /* The abstraction used here is that there are PCI controllers, |
@@ -209,7 +210,6 @@ struct pci_controller_info { | |||
209 | 210 | ||
210 | /* Operations which are controller specific. */ | 211 | /* Operations which are controller specific. */ |
211 | void (*scan_bus)(struct pci_controller_info *); | 212 | void (*scan_bus)(struct pci_controller_info *); |
212 | unsigned int (*irq_build)(struct pci_pbm_info *, struct pci_dev *, unsigned int); | ||
213 | void (*base_address_update)(struct pci_dev *, int); | 213 | void (*base_address_update)(struct pci_dev *, int); |
214 | void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); | 214 | void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); |
215 | 215 | ||
@@ -217,8 +217,6 @@ struct pci_controller_info { | |||
217 | struct pci_ops *pci_ops; | 217 | struct pci_ops *pci_ops; |
218 | unsigned int pci_first_busno; | 218 | unsigned int pci_first_busno; |
219 | unsigned int pci_last_busno; | 219 | unsigned int pci_last_busno; |
220 | |||
221 | void *starfire_cookie; | ||
222 | }; | 220 | }; |
223 | 221 | ||
224 | /* PCI devices which are not bridges have this placed in their pci_dev | 222 | /* PCI devices which are not bridges have this placed in their pci_dev |
@@ -228,6 +226,7 @@ struct pci_controller_info { | |||
228 | struct pcidev_cookie { | 226 | struct pcidev_cookie { |
229 | struct pci_pbm_info *pbm; | 227 | struct pci_pbm_info *pbm; |
230 | struct device_node *prom_node; | 228 | struct device_node *prom_node; |
229 | struct of_device *op; | ||
231 | struct linux_prom_pci_registers prom_regs[PROMREG_MAX]; | 230 | struct linux_prom_pci_registers prom_regs[PROMREG_MAX]; |
232 | int num_prom_regs; | 231 | int num_prom_regs; |
233 | struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; | 232 | struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; |
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h index 265614d497c4..99671ed6625d 100644 --- a/include/asm-sparc64/prom.h +++ b/include/asm-sparc64/prom.h | |||
@@ -25,11 +25,6 @@ | |||
25 | typedef u32 phandle; | 25 | typedef u32 phandle; |
26 | typedef u32 ihandle; | 26 | typedef u32 ihandle; |
27 | 27 | ||
28 | struct interrupt_info { | ||
29 | int line; | ||
30 | int sense; /* +ve/-ve logic, edge or level, etc. */ | ||
31 | }; | ||
32 | |||
33 | struct property { | 28 | struct property { |
34 | char *name; | 29 | char *name; |
35 | int length; | 30 | int length; |
@@ -39,13 +34,11 @@ struct property { | |||
39 | unsigned int unique_id; | 34 | unsigned int unique_id; |
40 | }; | 35 | }; |
41 | 36 | ||
37 | struct of_irq_controller; | ||
42 | struct device_node { | 38 | struct device_node { |
43 | char *name; | 39 | char *name; |
44 | char *type; | 40 | char *type; |
45 | phandle node; | 41 | phandle node; |
46 | phandle linux_phandle; | ||
47 | int n_intrs; | ||
48 | struct interrupt_info *intrs; | ||
49 | char *path_component_name; | 42 | char *path_component_name; |
50 | char *full_name; | 43 | char *full_name; |
51 | 44 | ||
@@ -61,6 +54,13 @@ struct device_node { | |||
61 | unsigned long _flags; | 54 | unsigned long _flags; |
62 | void *data; | 55 | void *data; |
63 | unsigned int unique_id; | 56 | unsigned int unique_id; |
57 | |||
58 | struct of_irq_controller *irq_trans; | ||
59 | }; | ||
60 | |||
61 | struct of_irq_controller { | ||
62 | unsigned int (*irq_build)(struct device_node *, unsigned int, void *); | ||
63 | void *data; | ||
64 | }; | 64 | }; |
65 | 65 | ||
66 | /* flag descriptions */ | 66 | /* flag descriptions */ |
@@ -69,6 +69,8 @@ struct device_node { | |||
69 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | 69 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) |
70 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | 70 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) |
71 | 71 | ||
72 | #define OF_BAD_ADDR ((u64)-1) | ||
73 | |||
72 | static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) | 74 | static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) |
73 | { | 75 | { |
74 | dn->pde = de; | 76 | dn->pde = de; |
@@ -101,6 +103,8 @@ extern int of_set_property(struct device_node *node, const char *name, void *val | |||
101 | extern int of_getintprop_default(struct device_node *np, | 103 | extern int of_getintprop_default(struct device_node *np, |
102 | const char *name, | 104 | const char *name, |
103 | int def); | 105 | int def); |
106 | extern int of_n_addr_cells(struct device_node *np); | ||
107 | extern int of_n_size_cells(struct device_node *np); | ||
104 | 108 | ||
105 | extern void prom_build_devicetree(void); | 109 | extern void prom_build_devicetree(void); |
106 | 110 | ||
diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h index 56ee985e4605..7efd49d31bb8 100644 --- a/include/asm-sparc64/sbus.h +++ b/include/asm-sparc64/sbus.h | |||
@@ -80,7 +80,6 @@ struct sbus_bus { | |||
80 | int num_sbus_ranges; | 80 | int num_sbus_ranges; |
81 | 81 | ||
82 | int portid; | 82 | int portid; |
83 | void *starfire_cookie; | ||
84 | }; | 83 | }; |
85 | #define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev) | 84 | #define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev) |
86 | 85 | ||
diff --git a/include/asm-sparc64/starfire.h b/include/asm-sparc64/starfire.h index b606cb2b32a8..48b50b5e35b0 100644 --- a/include/asm-sparc64/starfire.h +++ b/include/asm-sparc64/starfire.h | |||
@@ -14,7 +14,7 @@ extern int this_is_starfire; | |||
14 | extern void check_if_starfire(void); | 14 | extern void check_if_starfire(void); |
15 | extern void starfire_cpu_setup(void); | 15 | extern void starfire_cpu_setup(void); |
16 | extern int starfire_hard_smp_processor_id(void); | 16 | extern int starfire_hard_smp_processor_id(void); |
17 | extern void *starfire_hookup(int); | 17 | extern void starfire_hookup(int); |
18 | extern unsigned int starfire_translate(unsigned long imap, unsigned int upaid); | 18 | extern unsigned int starfire_translate(unsigned long imap, unsigned int upaid); |
19 | 19 | ||
20 | #endif | 20 | #endif |