diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/boot/dts/p1021mds.dts | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_mds.c | 43 |
2 files changed, 38 insertions, 6 deletions
diff --git a/arch/powerpc/boot/dts/p1021mds.dts b/arch/powerpc/boot/dts/p1021mds.dts index 7fad2df25981..ad5b85269004 100644 --- a/arch/powerpc/boot/dts/p1021mds.dts +++ b/arch/powerpc/boot/dts/p1021mds.dts | |||
@@ -617,6 +617,7 @@ | |||
617 | bus-frequency = <0>; | 617 | bus-frequency = <0>; |
618 | fsl,qe-num-riscs = <1>; | 618 | fsl,qe-num-riscs = <1>; |
619 | fsl,qe-num-snums = <28>; | 619 | fsl,qe-num-snums = <28>; |
620 | status = "disabled"; /* no firmware loaded */ | ||
620 | 621 | ||
621 | qeic: interrupt-controller@80 { | 622 | qeic: interrupt-controller@80 { |
622 | interrupt-controller; | 623 | interrupt-controller; |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 35ab2b42d698..9dadcffd9947 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -158,6 +158,29 @@ static int mpc8568_mds_phy_fixups(struct phy_device *phydev) | |||
158 | extern void __init mpc85xx_smp_init(void); | 158 | extern void __init mpc85xx_smp_init(void); |
159 | #endif | 159 | #endif |
160 | 160 | ||
161 | #ifdef CONFIG_QUICC_ENGINE | ||
162 | static struct of_device_id mpc85xx_qe_ids[] __initdata = { | ||
163 | { .type = "qe", }, | ||
164 | { .compatible = "fsl,qe", }, | ||
165 | { }, | ||
166 | }; | ||
167 | |||
168 | static void __init mpc85xx_publish_qe_devices(void) | ||
169 | { | ||
170 | struct device_node *np; | ||
171 | |||
172 | np = of_find_compatible_node(NULL, NULL, "fsl,qe"); | ||
173 | if (!of_device_is_available(np)) { | ||
174 | of_node_put(np); | ||
175 | return; | ||
176 | } | ||
177 | |||
178 | of_platform_bus_probe(NULL, mpc85xx_qe_ids, NULL); | ||
179 | } | ||
180 | #else | ||
181 | static void __init mpc85xx_publish_qe_devices(void) { } | ||
182 | #endif /* CONFIG_QUICC_ENGINE */ | ||
183 | |||
161 | static void __init mpc85xx_mds_setup_arch(void) | 184 | static void __init mpc85xx_mds_setup_arch(void) |
162 | { | 185 | { |
163 | struct device_node *np; | 186 | struct device_node *np; |
@@ -218,6 +241,11 @@ static void __init mpc85xx_mds_setup_arch(void) | |||
218 | return; | 241 | return; |
219 | } | 242 | } |
220 | 243 | ||
244 | if (!of_device_is_available(np)) { | ||
245 | of_node_put(np); | ||
246 | return; | ||
247 | } | ||
248 | |||
221 | qe_reset(); | 249 | qe_reset(); |
222 | of_node_put(np); | 250 | of_node_put(np); |
223 | 251 | ||
@@ -369,8 +397,6 @@ static struct of_device_id mpc85xx_ids[] = { | |||
369 | { .type = "soc", }, | 397 | { .type = "soc", }, |
370 | { .compatible = "soc", }, | 398 | { .compatible = "soc", }, |
371 | { .compatible = "simple-bus", }, | 399 | { .compatible = "simple-bus", }, |
372 | { .type = "qe", }, | ||
373 | { .compatible = "fsl,qe", }, | ||
374 | { .compatible = "gianfar", }, | 400 | { .compatible = "gianfar", }, |
375 | { .compatible = "fsl,rapidio-delta", }, | 401 | { .compatible = "fsl,rapidio-delta", }, |
376 | { .compatible = "fsl,mpc8548-guts", }, | 402 | { .compatible = "fsl,mpc8548-guts", }, |
@@ -382,8 +408,6 @@ static struct of_device_id p1021_ids[] = { | |||
382 | { .type = "soc", }, | 408 | { .type = "soc", }, |
383 | { .compatible = "soc", }, | 409 | { .compatible = "soc", }, |
384 | { .compatible = "simple-bus", }, | 410 | { .compatible = "simple-bus", }, |
385 | { .type = "qe", }, | ||
386 | { .compatible = "fsl,qe", }, | ||
387 | { .compatible = "gianfar", }, | 411 | { .compatible = "gianfar", }, |
388 | {}, | 412 | {}, |
389 | }; | 413 | }; |
@@ -395,16 +419,16 @@ static int __init mpc85xx_publish_devices(void) | |||
395 | if (machine_is(mpc8569_mds)) | 419 | if (machine_is(mpc8569_mds)) |
396 | simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio"); | 420 | simple_gpiochip_init("fsl,mpc8569mds-bcsr-gpio"); |
397 | 421 | ||
398 | /* Publish the QE devices */ | ||
399 | of_platform_bus_probe(NULL, mpc85xx_ids, NULL); | 422 | of_platform_bus_probe(NULL, mpc85xx_ids, NULL); |
423 | mpc85xx_publish_qe_devices(); | ||
400 | 424 | ||
401 | return 0; | 425 | return 0; |
402 | } | 426 | } |
403 | 427 | ||
404 | static int __init p1021_publish_devices(void) | 428 | static int __init p1021_publish_devices(void) |
405 | { | 429 | { |
406 | /* Publish the QE devices */ | ||
407 | of_platform_bus_probe(NULL, p1021_ids, NULL); | 430 | of_platform_bus_probe(NULL, p1021_ids, NULL); |
431 | mpc85xx_publish_qe_devices(); | ||
408 | 432 | ||
409 | return 0; | 433 | return 0; |
410 | } | 434 | } |
@@ -443,12 +467,19 @@ static void __init mpc85xx_mds_pic_init(void) | |||
443 | mpic_init(mpic); | 467 | mpic_init(mpic); |
444 | 468 | ||
445 | #ifdef CONFIG_QUICC_ENGINE | 469 | #ifdef CONFIG_QUICC_ENGINE |
470 | np = of_find_compatible_node(NULL, NULL, "fsl,qe"); | ||
471 | if (!of_device_is_available(np)) { | ||
472 | of_node_put(np); | ||
473 | return; | ||
474 | } | ||
475 | |||
446 | np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); | 476 | np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); |
447 | if (!np) { | 477 | if (!np) { |
448 | np = of_find_node_by_type(NULL, "qeic"); | 478 | np = of_find_node_by_type(NULL, "qeic"); |
449 | if (!np) | 479 | if (!np) |
450 | return; | 480 | return; |
451 | } | 481 | } |
482 | |||
452 | if (machine_is(p1021_mds)) | 483 | if (machine_is(p1021_mds)) |
453 | qe_ic_init(np, 0, qe_ic_cascade_low_mpic, | 484 | qe_ic_init(np, 0, qe_ic_cascade_low_mpic, |
454 | qe_ic_cascade_high_mpic); | 485 | qe_ic_cascade_high_mpic); |