diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2008-01-02 14:14:28 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-16 22:57:14 -0500 |
commit | d518b71784c6fa4c8eafb334236883f763f8e296 (patch) | |
tree | a2d941c07b285d0d947fdc1739680d7772e6a722 /arch/powerpc/platforms | |
parent | 97759e494e2bfccc23ffc7b236196cb5c1703e2e (diff) |
[POWERPC] powermac: Use machine_*_initcall() hooks in platform code
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/powermac/low_i2c.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pfunc_base.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pic.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/setup.c | 12 |
4 files changed, 6 insertions, 19 deletions
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 864fbf4744c0..21226b74c9b2 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -1461,9 +1461,6 @@ int __init pmac_i2c_init(void) | |||
1461 | return 0; | 1461 | return 0; |
1462 | i2c_inited = 1; | 1462 | i2c_inited = 1; |
1463 | 1463 | ||
1464 | if (!machine_is(powermac)) | ||
1465 | return 0; | ||
1466 | |||
1467 | /* Probe keywest-i2c busses */ | 1464 | /* Probe keywest-i2c busses */ |
1468 | kw_i2c_probe(); | 1465 | kw_i2c_probe(); |
1469 | 1466 | ||
@@ -1482,7 +1479,7 @@ int __init pmac_i2c_init(void) | |||
1482 | 1479 | ||
1483 | return 0; | 1480 | return 0; |
1484 | } | 1481 | } |
1485 | arch_initcall(pmac_i2c_init); | 1482 | machine_arch_initcall(powermac, pmac_i2c_init); |
1486 | 1483 | ||
1487 | /* Since pmac_i2c_init can be called too early for the platform device | 1484 | /* Since pmac_i2c_init can be called too early for the platform device |
1488 | * registration, we need to do it at a later time. In our case, subsys | 1485 | * registration, we need to do it at a later time. In our case, subsys |
@@ -1514,4 +1511,4 @@ static int __init pmac_i2c_create_platform_devices(void) | |||
1514 | 1511 | ||
1515 | return 0; | 1512 | return 0; |
1516 | } | 1513 | } |
1517 | subsys_initcall(pmac_i2c_create_platform_devices); | 1514 | machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices); |
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c index 45d54b9ad9e0..db20de512f3e 100644 --- a/arch/powerpc/platforms/powermac/pfunc_base.c +++ b/arch/powerpc/platforms/powermac/pfunc_base.c | |||
@@ -363,8 +363,7 @@ int __init pmac_pfunc_base_install(void) | |||
363 | 363 | ||
364 | return 0; | 364 | return 0; |
365 | } | 365 | } |
366 | 366 | machine_arch_initcall(powermac, pmac_pfunc_base_install); | |
367 | arch_initcall(pmac_pfunc_base_install); | ||
368 | 367 | ||
369 | #ifdef CONFIG_PM | 368 | #ifdef CONFIG_PM |
370 | 369 | ||
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 999f5e160897..cd7216437416 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -690,6 +690,5 @@ static int __init init_pmacpic_sysfs(void) | |||
690 | sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic); | 690 | sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic); |
691 | return 0; | 691 | return 0; |
692 | } | 692 | } |
693 | 693 | machine_subsys_initcall(powermac, init_pmacpic_sysfs); | |
694 | subsys_initcall(init_pmacpic_sysfs); | ||
695 | 694 | ||
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index adad4e976381..36ff1b6b7fac 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -397,17 +397,13 @@ static int initializing = 1; | |||
397 | 397 | ||
398 | static int pmac_late_init(void) | 398 | static int pmac_late_init(void) |
399 | { | 399 | { |
400 | if (!machine_is(powermac)) | ||
401 | return -ENODEV; | ||
402 | |||
403 | initializing = 0; | 400 | initializing = 0; |
404 | /* this is udbg (which is __init) and we can later use it during | 401 | /* this is udbg (which is __init) and we can later use it during |
405 | * cpu hotplug (in smp_core99_kick_cpu) */ | 402 | * cpu hotplug (in smp_core99_kick_cpu) */ |
406 | ppc_md.progress = NULL; | 403 | ppc_md.progress = NULL; |
407 | return 0; | 404 | return 0; |
408 | } | 405 | } |
409 | 406 | machine_late_initcall(powermac, pmac_late_init); | |
410 | late_initcall(pmac_late_init); | ||
411 | 407 | ||
412 | /* | 408 | /* |
413 | * This is __init_refok because we check for "initializing" before | 409 | * This is __init_refok because we check for "initializing" before |
@@ -534,9 +530,6 @@ static int __init pmac_declare_of_platform_devices(void) | |||
534 | if (machine_is(chrp)) | 530 | if (machine_is(chrp)) |
535 | return -1; | 531 | return -1; |
536 | 532 | ||
537 | if (!machine_is(powermac)) | ||
538 | return 0; | ||
539 | |||
540 | np = of_find_node_by_name(NULL, "valkyrie"); | 533 | np = of_find_node_by_name(NULL, "valkyrie"); |
541 | if (np) | 534 | if (np) |
542 | of_platform_device_create(np, "valkyrie", NULL); | 535 | of_platform_device_create(np, "valkyrie", NULL); |
@@ -551,8 +544,7 @@ static int __init pmac_declare_of_platform_devices(void) | |||
551 | 544 | ||
552 | return 0; | 545 | return 0; |
553 | } | 546 | } |
554 | 547 | machine_device_initcall(powermac, pmac_declare_of_platform_devices); | |
555 | device_initcall(pmac_declare_of_platform_devices); | ||
556 | 548 | ||
557 | /* | 549 | /* |
558 | * Called very early, MMU is off, device-tree isn't unflattened | 550 | * Called very early, MMU is off, device-tree isn't unflattened |