From patchwork Sat Aug 16 00:47:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sierra X-Patchwork-Id: 380443 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B160E1400DE for ; Sat, 16 Aug 2014 10:51:32 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XISC5-0004Oi-Qj; Sat, 16 Aug 2014 00:50:05 +0000 Received: from xes-mad.com ([216.165.139.218]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XISC3-0003JA-Uc; Sat, 16 Aug 2014 00:50:04 +0000 Received: from zimbra.xes-mad.com (zimbra.xes-mad.com [10.52.0.127]) by xes-mad.com (8.13.8/8.13.8) with ESMTP id s7G0ldS6024566; Fri, 15 Aug 2014 19:47:39 -0500 Date: Fri, 15 Aug 2014 19:47:39 -0500 (CDT) From: Aaron Sierra To: David Woodhouse , Brian Norris Message-ID: <251532766.70336.1408150059026.JavaMail.zimbra@xes-inc.com> In-Reply-To: <2056273149.70335.1408150004992.JavaMail.zimbra@xes-inc.com> Subject: [PATCH 2/2] mtd: fsl_ifc_nand: Probe partitions OF node MIME-Version: 1.0 X-Originating-IP: [10.52.16.65] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - GC36 (Linux)/8.0.6_GA_5922) Thread-Topic: fsl_ifc_nand: Probe partitions OF node Thread-Index: S0N6iSOCGVC7rbaOZ8j62iLuOtB47Q== X-Virus-Scanned: clamav-milter 0.96 at mail X-Virus-Status: Clean X-Spam-Status: No, score=-6.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, SUBJECT_FUZZY_TION,XES_TECH_DRIVER autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.xes-mad.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140815_175004_158671_322E38A1 X-CRM114-Status: UNSURE ( 7.14 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Cc: linux-mtd@lists.infradead.org, Prabhakar Kushwaha X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Previously, the OF node defining the IFC NAND controller was being passed to mtd_device_parse_register(), not the node defining the partitions. This resulted in no OF-defined partitions being created. Signed-off-by: Aaron Sierra --- drivers/mtd/nand/fsl_ifc_nand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index 7861909..9aeb146 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c @@ -1029,7 +1029,6 @@ static int fsl_ifc_nand_probe(struct platform_device *dev) struct device_node *node = dev->dev.of_node; struct mtd_part_parser_data ppdata; - ppdata.of_node = dev->dev.of_node; if (!fsl_ifc_ctrl_dev || !fsl_ifc_ctrl_dev->regs) return -ENODEV; ifc = fsl_ifc_ctrl_dev->regs; @@ -1126,9 +1125,13 @@ static int fsl_ifc_nand_probe(struct platform_device *dev) /* First look for RedBoot table or partitions on the command * line, these take precedence over device tree information */ + ppdata.of_node = of_get_next_child(dev->dev.of_node, NULL); mtd_device_parse_register(&priv->mtd, part_probe_types, &ppdata, NULL, 0); + if (ppdata.of_node) + of_node_put(ppdata.of_node); + dev_info(priv->dev, "IFC NAND device at 0x%llx, bank %d\n", (unsigned long long)res.start, priv->bank); return 0;