Thread (50 messages) 50 messages, 5 authors, 2011-02-22

Re: [PATCH v2 TIP 09/14] x86/dtb: Add generic bus probe

From: Grant Likely <hidden>
Date: 2011-02-16 22:04:10
Also in: lkml

On Fri, Feb 04, 2011 at 11:21:52AM +0100, Sebastian Andrzej Siewior wrote:
For now we probe these busses and we change is to board dependent probes
once we have to.

Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Signed-off-by: Sebastian Andrzej Siewior <redacted>
Signed-off-by: Dirk Brandewie <redacted>
Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>

Historically for embedded platforms we leave calling
of_platform_bus_probe() to the bsp code so that weird boards can still
do weird stuff on the probe order.  However, I'm all for making more
code common, so we can start with this and switch to per-board (or
per-SoC) calls only if it becomes necessary.

g.

quoted hunk ↗ jump to hunk
---

 renamed -immr to -cp

 arch/x86/kernel/prom.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/prom.c b/arch/x86/kernel/prom.c
index 8525ca0..3eaab43 100644
--- a/arch/x86/kernel/prom.c
+++ b/arch/x86/kernel/prom.c
@@ -102,6 +102,25 @@ void __init add_dtb(u64 data)
 	initial_dtb = data + offsetof(struct setup_data, data);
 }
 
+/*
+ * CE4100 ids. Will be moved to machine_device_initcall() once we have it.
+ */
+static struct of_device_id __initdata ce4100_ids[] = {
+	{ .compatible = "intel,ce4100-cp", },
+	{ .compatible = "isa", },
+	{ .compatible = "pci", },
+	{},
+};
+
+static int __init add_bus_probe(void)
+{
+	if (!initial_boot_params)
+		return 0;
+
+	return of_platform_bus_probe(NULL, ce4100_ids, NULL);
+}
+module_init(add_bus_probe);
+
 #ifdef CONFIG_PCI
 static int x86_of_pci_irq_enable(struct pci_dev *dev)
 {
-- 
1.7.3.2

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help