diff options
-rw-r--r-- | arch/microblaze/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/of_platform.c | 49 | ||||
-rw-r--r-- | arch/powerpc/kernel/of_platform.c | 24 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/qpace_setup.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/setup.c | 14 | ||||
-rw-r--r-- | drivers/of/platform.c | 4 | ||||
-rw-r--r-- | include/linux/of_platform.h | 2 |
7 files changed, 28 insertions, 81 deletions
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile index 727e2cbff9c6..7fcc5f7b5a46 100644 --- a/arch/microblaze/kernel/Makefile +++ b/arch/microblaze/kernel/Makefile | |||
@@ -16,7 +16,7 @@ extra-y := head.o vmlinux.lds | |||
16 | 16 | ||
17 | obj-y += dma.o exceptions.o \ | 17 | obj-y += dma.o exceptions.o \ |
18 | hw_exception_handler.o init_task.o intc.o irq.o \ | 18 | hw_exception_handler.o init_task.o intc.o irq.o \ |
19 | of_platform.o process.o prom.o prom_parse.o ptrace.o \ | 19 | process.o prom.o prom_parse.o ptrace.o \ |
20 | setup.o signal.o sys_microblaze.o timer.o traps.o reset.o | 20 | setup.o signal.o sys_microblaze.o timer.o traps.o reset.o |
21 | 21 | ||
22 | obj-y += cpu/ | 22 | obj-y += cpu/ |
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c deleted file mode 100644 index 6cffadbe2fcd..000000000000 --- a/arch/microblaze/kernel/of_platform.c +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. | ||
3 | * <benh@kernel.crashing.org> | ||
4 | * and Arnd Bergmann, IBM Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #undef DEBUG | ||
14 | |||
15 | #include <linux/string.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/module.h> | ||
19 | #include <linux/mod_devicetable.h> | ||
20 | #include <linux/pci.h> | ||
21 | #include <linux/of.h> | ||
22 | #include <linux/of_device.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | |||
25 | #include <linux/errno.h> | ||
26 | #include <linux/topology.h> | ||
27 | #include <asm/atomic.h> | ||
28 | |||
29 | /* | ||
30 | * The list of OF IDs below is used for matching bus types in the | ||
31 | * system whose devices are to be exposed as of_platform_devices. | ||
32 | * | ||
33 | * This is the default list valid for most platforms. This file provides | ||
34 | * functions who can take an explicit list if necessary though | ||
35 | * | ||
36 | * The search is always performed recursively looking for children of | ||
37 | * the provided device_node and recursively if such a children matches | ||
38 | * a bus type in the list | ||
39 | */ | ||
40 | |||
41 | const struct of_device_id of_default_bus_ids[] = { | ||
42 | { .type = "soc", }, | ||
43 | { .compatible = "soc", }, | ||
44 | { .type = "plb5", }, | ||
45 | { .type = "plb4", }, | ||
46 | { .type = "opb", }, | ||
47 | { .type = "simple", }, | ||
48 | {}, | ||
49 | }; | ||
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 760a7af7fdb5..b2c363ef38ad 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -28,30 +28,6 @@ | |||
28 | #include <asm/ppc-pci.h> | 28 | #include <asm/ppc-pci.h> |
29 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
30 | 30 | ||
31 | /* | ||
32 | * The list of OF IDs below is used for matching bus types in the | ||
33 | * system whose devices are to be exposed as of_platform_devices. | ||
34 | * | ||
35 | * This is the default list valid for most platforms. This file provides | ||
36 | * functions who can take an explicit list if necessary though | ||
37 | * | ||
38 | * The search is always performed recursively looking for children of | ||
39 | * the provided device_node and recursively if such a children matches | ||
40 | * a bus type in the list | ||
41 | */ | ||
42 | |||
43 | const struct of_device_id of_default_bus_ids[] = { | ||
44 | { .type = "soc", }, | ||
45 | { .compatible = "soc", }, | ||
46 | { .type = "spider", }, | ||
47 | { .type = "axon", }, | ||
48 | { .type = "plb5", }, | ||
49 | { .type = "plb4", }, | ||
50 | { .type = "opb", }, | ||
51 | { .type = "ebc", }, | ||
52 | {}, | ||
53 | }; | ||
54 | |||
55 | #ifdef CONFIG_PPC_OF_PLATFORM_PCI | 31 | #ifdef CONFIG_PPC_OF_PLATFORM_PCI |
56 | 32 | ||
57 | /* The probing of PCI controllers from of_platform is currently | 33 | /* The probing of PCI controllers from of_platform is currently |
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c index c5ce02e84c8e..1b5749042756 100644 --- a/arch/powerpc/platforms/cell/qpace_setup.c +++ b/arch/powerpc/platforms/cell/qpace_setup.c | |||
@@ -61,12 +61,24 @@ static void qpace_progress(char *s, unsigned short hex) | |||
61 | printk("*** %04x : %s\n", hex, s ? s : ""); | 61 | printk("*** %04x : %s\n", hex, s ? s : ""); |
62 | } | 62 | } |
63 | 63 | ||
64 | static const struct of_device_id qpace_bus_ids[] __initdata = { | ||
65 | { .type = "soc", }, | ||
66 | { .compatible = "soc", }, | ||
67 | { .type = "spider", }, | ||
68 | { .type = "axon", }, | ||
69 | { .type = "plb5", }, | ||
70 | { .type = "plb4", }, | ||
71 | { .type = "opb", }, | ||
72 | { .type = "ebc", }, | ||
73 | {}, | ||
74 | }; | ||
75 | |||
64 | static int __init qpace_publish_devices(void) | 76 | static int __init qpace_publish_devices(void) |
65 | { | 77 | { |
66 | int node; | 78 | int node; |
67 | 79 | ||
68 | /* Publish OF platform devices for southbridge IOs */ | 80 | /* Publish OF platform devices for southbridge IOs */ |
69 | of_platform_bus_probe(NULL, NULL, NULL); | 81 | of_platform_bus_probe(NULL, qpace_bus_ids, NULL); |
70 | 82 | ||
71 | /* There is no device for the MIC memory controller, thus we create | 83 | /* There is no device for the MIC memory controller, thus we create |
72 | * a platform device for it to attach the EDAC driver to. | 84 | * a platform device for it to attach the EDAC driver to. |
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index 50385db586bd..691995761b3d 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c | |||
@@ -141,6 +141,18 @@ static int __devinit cell_setup_phb(struct pci_controller *phb) | |||
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
143 | 143 | ||
144 | static const struct of_device_id cell_bus_ids[] __initdata = { | ||
145 | { .type = "soc", }, | ||
146 | { .compatible = "soc", }, | ||
147 | { .type = "spider", }, | ||
148 | { .type = "axon", }, | ||
149 | { .type = "plb5", }, | ||
150 | { .type = "plb4", }, | ||
151 | { .type = "opb", }, | ||
152 | { .type = "ebc", }, | ||
153 | {}, | ||
154 | }; | ||
155 | |||
144 | static int __init cell_publish_devices(void) | 156 | static int __init cell_publish_devices(void) |
145 | { | 157 | { |
146 | struct device_node *root = of_find_node_by_path("/"); | 158 | struct device_node *root = of_find_node_by_path("/"); |
@@ -148,7 +160,7 @@ static int __init cell_publish_devices(void) | |||
148 | int node; | 160 | int node; |
149 | 161 | ||
150 | /* Publish OF platform devices for southbridge IOs */ | 162 | /* Publish OF platform devices for southbridge IOs */ |
151 | of_platform_bus_probe(NULL, NULL, NULL); | 163 | of_platform_bus_probe(NULL, cell_bus_ids, NULL); |
152 | 164 | ||
153 | /* On spider based blades, we need to manually create the OF | 165 | /* On spider based blades, we need to manually create the OF |
154 | * platform devices for the PCI host bridges | 166 | * platform devices for the PCI host bridges |
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index f79f40b516c6..033a224a9fda 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -701,9 +701,7 @@ int of_platform_bus_probe(struct device_node *root, | |||
701 | struct platform_device *dev; | 701 | struct platform_device *dev; |
702 | int rc = 0; | 702 | int rc = 0; |
703 | 703 | ||
704 | if (matches == NULL) | 704 | if (WARN_ON(!matches || matches == OF_NO_DEEP_PROBE)) |
705 | matches = of_default_bus_ids; | ||
706 | if (matches == OF_NO_DEEP_PROBE) | ||
707 | return -EINVAL; | 705 | return -EINVAL; |
708 | if (root == NULL) | 706 | if (root == NULL) |
709 | root = of_find_node_by_path("/"); | 707 | root = of_find_node_by_path("/"); |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index b24c5a5b0426..4e6d989c06df 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -19,8 +19,6 @@ | |||
19 | #include <linux/of_device.h> | 19 | #include <linux/of_device.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | 21 | ||
22 | extern const struct of_device_id of_default_bus_ids[]; | ||
23 | |||
24 | /* | 22 | /* |
25 | * An of_platform_driver driver is attached to a basic of_device on | 23 | * An of_platform_driver driver is attached to a basic of_device on |
26 | * the "platform bus" (platform_bus_type). | 24 | * the "platform bus" (platform_bus_type). |