Thread (43 messages) 43 messages, 8 authors, 2010-04-28
STALE5894d
Revisions (3)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v3 current

[PATCH v3 05/11] powerpc/mpc5121: create and register NFC device

From: Anatolij Gustschin <agust@denx.de>
Date: 2010-02-05 13:44:16
Subsystem: linux for powerpc (32-bit and 64-bit), linux for powerpc embedded mpc5xxx, the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Anatolij Gustschin, Linus Torvalds

Instantiate NAND Flash Controller device if it's
description is found in the device tree.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Grant Likely <redacted>
---
 arch/powerpc/platforms/512x/mpc512x_shared.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
index ac0400e..8bb34b2 100644
--- a/arch/powerpc/platforms/512x/mpc512x_shared.c
+++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
@@ -86,9 +86,17 @@ static struct of_device_id __initdata of_bus_ids[] = {
 
 void __init mpc512x_declare_of_platform_devices(void)
 {
+	struct device_node *np;
+
 	if (of_platform_bus_probe(NULL, of_bus_ids, NULL))
 		printk(KERN_ERR __FILE__ ": "
 			"Error while probing of_platform bus\n");
+
+	np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-nfc");
+	if (np) {
+		of_platform_device_create(np, NULL, NULL);
+		of_node_put(np);
+	}
 }
 
 void __init mpc512x_init(void)
-- 
1.6.3.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help