diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-23 23:50:55 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-24 08:08:59 -0400 |
commit | 8c8dc322486d5394dc981bef9276dd0ce6c8d1ce (patch) | |
tree | 2275c19196414da08a3834c4b56a1da72e1e3715 /arch/powerpc/platforms/chrp | |
parent | 112466b4d0036b3244509d01dbbf3c8caec52a23 (diff) |
[POWERPC] Remove old interface find_path_device
Replaced by of_find_node_by_path.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/chrp')
-rw-r--r-- | arch/powerpc/platforms/chrp/pci.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 9 |
2 files changed, 10 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index b23e39796a0b..de776e3889e3 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -185,10 +185,9 @@ setup_python(struct pci_controller *hose, struct device_node *dev) | |||
185 | /* Marvell Discovery II based Pegasos 2 */ | 185 | /* Marvell Discovery II based Pegasos 2 */ |
186 | static void __init setup_peg2(struct pci_controller *hose, struct device_node *dev) | 186 | static void __init setup_peg2(struct pci_controller *hose, struct device_node *dev) |
187 | { | 187 | { |
188 | struct device_node *root = find_path_device("/"); | 188 | struct device_node *root = of_find_node_by_path("/"); |
189 | struct device_node *rtas; | 189 | struct device_node *rtas; |
190 | 190 | ||
191 | of_node_get(root); | ||
192 | rtas = of_find_node_by_name (root, "rtas"); | 191 | rtas = of_find_node_by_name (root, "rtas"); |
193 | if (rtas) { | 192 | if (rtas) { |
194 | hose->ops = &rtas_pci_ops; | 193 | hose->ops = &rtas_pci_ops; |
@@ -198,6 +197,7 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d | |||
198 | " your firmware\n"); | 197 | " your firmware\n"); |
199 | } | 198 | } |
200 | pci_assign_all_buses = 1; | 199 | pci_assign_all_buses = 1; |
200 | /* keep the reference to the root node */ | ||
201 | } | 201 | } |
202 | 202 | ||
203 | void __init | 203 | void __init |
@@ -210,7 +210,7 @@ chrp_find_bridges(void) | |||
210 | const unsigned int *dma; | 210 | const unsigned int *dma; |
211 | const char *model, *machine; | 211 | const char *model, *machine; |
212 | int is_longtrail = 0, is_mot = 0, is_pegasos = 0; | 212 | int is_longtrail = 0, is_mot = 0, is_pegasos = 0; |
213 | struct device_node *root = find_path_device("/"); | 213 | struct device_node *root = of_find_node_by_path("/"); |
214 | struct resource r; | 214 | struct resource r; |
215 | /* | 215 | /* |
216 | * The PCI host bridge nodes on some machines don't have | 216 | * The PCI host bridge nodes on some machines don't have |
@@ -309,6 +309,7 @@ chrp_find_bridges(void) | |||
309 | printk("pci_dram_offset = %lx\n", pci_dram_offset); | 309 | printk("pci_dram_offset = %lx\n", pci_dram_offset); |
310 | } | 310 | } |
311 | } | 311 | } |
312 | of_node_put(root); | ||
312 | } | 313 | } |
313 | 314 | ||
314 | /* SL82C105 IDE Control/Status Register */ | 315 | /* SL82C105 IDE Control/Status Register */ |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 05d1bc0c8918..e46c4d4a5804 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -110,7 +110,7 @@ void chrp_show_cpuinfo(struct seq_file *m) | |||
110 | struct device_node *root; | 110 | struct device_node *root; |
111 | const char *model = ""; | 111 | const char *model = ""; |
112 | 112 | ||
113 | root = find_path_device("/"); | 113 | root = of_find_node_by_path("/"); |
114 | if (root) | 114 | if (root) |
115 | model = of_get_property(root, "model", NULL); | 115 | model = of_get_property(root, "model", NULL); |
116 | seq_printf(m, "machine\t\t: CHRP %s\n", model); | 116 | seq_printf(m, "machine\t\t: CHRP %s\n", model); |
@@ -160,6 +160,7 @@ void chrp_show_cpuinfo(struct seq_file *m) | |||
160 | gg2_cachetypes[(t>>2) & 3], | 160 | gg2_cachetypes[(t>>2) & 3], |
161 | gg2_cachemodes[t & 3]); | 161 | gg2_cachemodes[t & 3]); |
162 | } | 162 | } |
163 | of_node_put(root); | ||
163 | } | 164 | } |
164 | 165 | ||
165 | /* | 166 | /* |
@@ -204,7 +205,7 @@ static void __init sio_init(void) | |||
204 | { | 205 | { |
205 | struct device_node *root; | 206 | struct device_node *root; |
206 | 207 | ||
207 | if ((root = find_path_device("/")) && | 208 | if ((root = of_find_node_by_path("/")) && |
208 | !strncmp(of_get_property(root, "model", NULL), | 209 | !strncmp(of_get_property(root, "model", NULL), |
209 | "IBM,LongTrail", 13)) { | 210 | "IBM,LongTrail", 13)) { |
210 | /* logical device 0 (KBC/Keyboard) */ | 211 | /* logical device 0 (KBC/Keyboard) */ |
@@ -212,6 +213,7 @@ static void __init sio_init(void) | |||
212 | /* select logical device 1 (KBC/Mouse) */ | 213 | /* select logical device 1 (KBC/Mouse) */ |
213 | sio_fixup_irq("mouse", 1, 12, 2); | 214 | sio_fixup_irq("mouse", 1, 12, 2); |
214 | } | 215 | } |
216 | of_node_put(root); | ||
215 | } | 217 | } |
216 | 218 | ||
217 | 219 | ||
@@ -250,7 +252,7 @@ static void briq_restart(char *cmd) | |||
250 | 252 | ||
251 | void __init chrp_setup_arch(void) | 253 | void __init chrp_setup_arch(void) |
252 | { | 254 | { |
253 | struct device_node *root = find_path_device ("/"); | 255 | struct device_node *root = of_find_node_by_path("/"); |
254 | const char *machine = NULL; | 256 | const char *machine = NULL; |
255 | 257 | ||
256 | /* init to some ~sane value until calibrate_delay() runs */ | 258 | /* init to some ~sane value until calibrate_delay() runs */ |
@@ -273,6 +275,7 @@ void __init chrp_setup_arch(void) | |||
273 | /* Let's assume it is an IBM chrp if all else fails */ | 275 | /* Let's assume it is an IBM chrp if all else fails */ |
274 | _chrp_type = _CHRP_IBM; | 276 | _chrp_type = _CHRP_IBM; |
275 | } | 277 | } |
278 | of_node_put(root); | ||
276 | printk("chrp type = %x [%s]\n", _chrp_type, chrp_names[_chrp_type]); | 279 | printk("chrp type = %x [%s]\n", _chrp_type, chrp_names[_chrp_type]); |
277 | 280 | ||
278 | rtas_initialize(); | 281 | rtas_initialize(); |