From patchwork Wed Feb 11 01:30:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Hershberger X-Patchwork-Id: 438629 X-Patchwork-Delegate: sjg@chromium.org 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 E142C1401AB for ; Wed, 11 Feb 2015 12:33:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B6604B7FE; Wed, 11 Feb 2015 02:33:27 +0100 (CET) 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 fRMiEiC6wbfm; Wed, 11 Feb 2015 02:33:27 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E76F74B810; Wed, 11 Feb 2015 02:32:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F29454B7E8 for ; Wed, 11 Feb 2015 02:32:33 +0100 (CET) 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 ELcMe_i89of4 for ; Wed, 11 Feb 2015 02:32:33 +0100 (CET) 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 ni.com (skprod3.natinst.com [130.164.80.24]) by theia.denx.de (Postfix) with ESMTPS id 80BF94B7EC for ; Wed, 11 Feb 2015 02:32:29 +0100 (CET) Received: from us-aus-mgwout2.amer.corp.natinst.com (nb-chan1-1338.natinst.com [130.164.19.134]) by us-aus-skprod3.natinst.com (8.15.0.59/8.15.0.59) with ESMTP id t1B1WQbD022315; Tue, 10 Feb 2015 19:32:26 -0600 Received: from linux-xvxi.natinst.com ([130.164.14.198]) by us-aus-mgwout2.amer.corp.natinst.com (Lotus Domino Release 8.5.3FP6) with ESMTP id 2015021019322646-1020585 ; Tue, 10 Feb 2015 19:32:26 -0600 From: Joe Hershberger To: u-boot@lists.denx.de Date: Tue, 10 Feb 2015 19:30:20 -0600 Message-Id: <1423618233-11397-2-git-send-email-joe.hershberger@ni.com> X-Mailer: git-send-email 1.7.11.5 In-Reply-To: <1423618233-11397-1-git-send-email-joe.hershberger@ni.com> References: <1422923925-5572-1-git-send-email-joe.hershberger@ni.com> <1423618233-11397-1-git-send-email-joe.hershberger@ni.com> X-MIMETrack: Itemize by SMTP Server on US-AUS-MGWOut2/AUS/H/NIC(Release 8.5.3FP6|November 21, 2013) at 02/10/2015 07:32:26 PM, Serialize by Router on US-AUS-MGWOut2/AUS/H/NIC(Release 8.5.3FP6|November 21, 2013) at 02/10/2015 07:32:26 PM, Serialize complete at 02/10/2015 07:32:26 PM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2015-02-11_01:, , signatures=0 Cc: Tom Rini , Joe Hershberger Subject: [U-Boot] [RFC PATCH v3 01/14] dm: core: Allow seq numbers to be resolved before probe 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Before this patch, if the sequence numbers were resolved before probe, this code would insist on defining new non-conflicting-with-itself seq numbers. Now any "non -1" seq number is accepted as already resolved. Signed-off-by: Joe Hershberger --- Changes in v3: -Add seq patch to dm core Changes in v2: None drivers/core/uclass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 289a5d2..2d8b6f8 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -366,7 +366,9 @@ int uclass_resolve_seq(struct udevice *dev) int seq; int ret; - assert(dev->seq == -1); + if (dev->seq != -1) + return dev->seq; + ret = uclass_find_device_by_seq(dev->uclass->uc_drv->id, dev->req_seq, false, &dup); if (!ret) {