From patchwork Fri Apr 24 07:49:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ying.zhang@freescale.com X-Patchwork-Id: 464309 X-Patchwork-Delegate: yorksun@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 99ECB140134 for ; Sat, 25 Apr 2015 03:45:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 197714BEAD; Fri, 24 Apr 2015 19:42:02 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ciA4St48Dzid; Fri, 24 Apr 2015 19:42:01 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 872714BC3E; Fri, 24 Apr 2015 19:41:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 342F33B76 for ; Fri, 24 Apr 2015 10:58:45 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XxMp0Mcw4nyT for ; Fri, 24 Apr 2015 10:58:45 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0146.outbound.protection.outlook.com [65.55.169.146]) by theia.denx.de (Postfix) with ESMTPS id A40703B54 for ; Fri, 24 Apr 2015 10:58:40 +0200 (CEST) Received: from CO2PR03CA0026.namprd03.prod.outlook.com (10.141.194.153) by BL2PR03MB145.namprd03.prod.outlook.com (10.255.230.13) with Microsoft SMTP Server (TLS) id 15.1.148.16; Fri, 24 Apr 2015 08:43:12 +0000 Received: from BY2FFO11FD026.protection.gbl (2a01:111:f400:7c0c::167) by CO2PR03CA0026.outlook.office365.com (2a01:111:e400:1414::25) with Microsoft SMTP Server (TLS) id 15.1.112.19 via Frontend Transport; Fri, 24 Apr 2015 08:43:12 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD026.mail.protection.outlook.com (10.1.15.215) with Microsoft SMTP Server (TLS) id 15.1.154.14 via Frontend Transport; Fri, 24 Apr 2015 08:43:10 +0000 Received: from Tank.ap.freescale.net (tank.ap.freescale.net [10.193.20.104]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t3O8h6VL016731; Fri, 24 Apr 2015 01:43:09 -0700 From: To: Date: Fri, 24 Apr 2015 15:49:15 +0800 Message-ID: <1429861755-27457-1-git-send-email-ying.zhang@freescale.com> X-Mailer: git-send-email 1.8.4.1 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(189002)(199003)(86152002)(48376002)(105606002)(104016003)(50466002)(87936001)(46102003)(106466001)(85426001)(2351001)(33646002)(19580395003)(47776003)(19580405001)(110136001)(62966003)(50986999)(36756003)(77156002)(77096005)(50226001)(450100001)(6806004)(86362001)(229853001)(92566002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB145; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB145; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010)(3002001); SRVR:BL2PR03MB145; BCL:0; PCL:0; RULEID:; SRVR:BL2PR03MB145; X-Forefront-PRVS: 05568D1FF7 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2015 08:43:10.8983 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB145 Cc: yorksun@freescale.com, Ying Zhang Subject: [U-Boot] [PATCH v2] board/p2020rdb: fix the FDT_ERR_NOTFOUND issue X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Ying Zhang Because the function ft_board_setup() delete the USB2 device node, it leads to can't find the device node and hung up. In fact only P1020RDB needs to delete the USB2 node, this patch fixes this issue. Signed-off-by: Ying Zhang --- Change from v1: - To define the parameter "err" to eliminate the compiling error. board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index 3f47cfb..61b7a91 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -428,8 +428,13 @@ int ft_board_setup(void *blob, bd_t *bd) { phys_addr_t base; phys_size_t size; +#if defined(CONFIG_P1020RDB_PD) || defined(CONFIG_P1020RDB_PC) const char *soc_usb_compat = "fsl-usb2-dr"; - int err, usb1_off, usb2_off; + int usb_err, usb1_off, usb2_off; +#endif +#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH) + int err; +#endif ft_cpu_setup(blob, bd); @@ -473,6 +478,7 @@ int ft_board_setup(void *blob, bd_t *bd) } #endif +#if defined(CONFIG_P1020RDB_PD) || defined(CONFIG_P1020RDB_PC) /* Delete USB2 node as it is muxed with eLBC */ usb1_off = fdt_node_offset_by_compatible(blob, -1, soc_usb_compat); @@ -488,11 +494,12 @@ int ft_board_setup(void *blob, bd_t *bd) soc_usb_compat); return usb2_off; } - err = fdt_del_node(blob, usb2_off); - if (err < 0) { + usb_err = fdt_del_node(blob, usb2_off); + if (usb_err < 0) { printf("WARNING: could not remove %s\n", soc_usb_compat); - return err; + return usb_err; } +#endif return 0; }