[linux-yocto] [PATCH 151/161] axxia-nand: Use the right Machine Types in the Axxia NAND Driver

Cristian Bercaru cristian.bercaru at windriver.com
Thu May 21 12:22:13 PDT 2015


From: John Jacques <john.jacques at lsi.com>

Signed-off-by: John Jacques <john.jacques at lsi.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
---
 drivers/mtd/nand/lsi_acp_nand.c |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/mtd/nand/lsi_acp_nand.c b/drivers/mtd/nand/lsi_acp_nand.c
index 07c521e..2a84b96 100644
--- a/drivers/mtd/nand/lsi_acp_nand.c
+++ b/drivers/mtd/nand/lsi_acp_nand.c
@@ -3521,23 +3521,17 @@ lsi_nand_init(void)
 	  The ECC status register and mask are different on 344x, 342x, 35xx...
 	*/
 
-	np = of_find_compatible_node(NULL, NULL, "lsi,acp3500");
-
-	if (NULL != np) {
+	if (of_machine_is_compatible("lsi,acp3500")) {
 		pecc_busy_register = (gpreg_base + 0x8c);
 		pecc_busy_mask = (1 << 20);
 	} else {
-		np = of_find_compatible_node(NULL, NULL, "lsi,acp3420");
-
-		if (NULL != np) {
+		if (of_machine_is_compatible("lsi,acp3420")) {
 			pecc_busy_register = (gpreg_base + 0xc);
 			pecc_busy_mask = (1 << 28);
 		} else {
-			np = of_find_compatible_node(NULL, NULL, "lsi,acp3440");
-
-			if (NULL != np) {
+			if (of_machine_is_compatible("lsi,acp3440")) {
 				pecc_busy_register = (gpreg_base + 0xc);
-				pecc_busy_mask = (1 << 25);
+				pecc_busy_mask = (1 << 28);
 			} else {
 				printk(KERN_ERR "Unsupported NAND Target\n");
 
-- 
1.7.9.5



More information about the linux-yocto mailing list