From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C39CC433EF for ; Wed, 20 Apr 2022 18:27:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 380EB83E73; Wed, 20 Apr 2022 20:27:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=akkea.ca header.i=@akkea.ca header.b="Dlg6O0Jl"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="Dlg6O0Jl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 77BD683E73; Wed, 20 Apr 2022 20:27:20 +0200 (CEST) Received: from node.akkea.ca (li1434-30.members.linode.com [45.33.107.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B853983E63 for ; Wed, 20 Apr 2022 20:27:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=angus@akkea.ca Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 79DC44E200C; Wed, 20 Apr 2022 18:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1650479236; bh=h9PaW88tC+E/oBdeNzMpoFrcf6ukmEAEQ603I2dGPPI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Dlg6O0Jl4OX2yLSt/KDfaEzYpUAxJVm0YTusan5VWjZvZmqTkChabNPGF8sZnFEyH VMuTAUgkovFBOvKsmnwNBkTnODvbiXsd5A9y6n90gnrbu7R0rLaSAku1XuO2/4AAVm /ZbMQEC91YDUeXKJqiAHyktNTnuZQGXrD7+Q0Cvs= Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DZFRg2jO3JD8; Wed, 20 Apr 2022 18:27:16 +0000 (UTC) Received: from www.akkea.ca (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 47D614E2006; Wed, 20 Apr 2022 18:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1650479236; bh=h9PaW88tC+E/oBdeNzMpoFrcf6ukmEAEQ603I2dGPPI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Dlg6O0Jl4OX2yLSt/KDfaEzYpUAxJVm0YTusan5VWjZvZmqTkChabNPGF8sZnFEyH VMuTAUgkovFBOvKsmnwNBkTnODvbiXsd5A9y6n90gnrbu7R0rLaSAku1XuO2/4AAVm /ZbMQEC91YDUeXKJqiAHyktNTnuZQGXrD7+Q0Cvs= MIME-Version: 1.0 Date: Wed, 20 Apr 2022 11:27:16 -0700 From: Angus Ainslie To: "NXP i.MX U-Boot Team" , u-boot@lists.denx.de Cc: kernel@puri.sm Subject: Re: [PATCH] spl: spl_sdp: don't call board_usb_init twice In-Reply-To: <20220117141145.206012-1-angus@akkea.ca> References: <20220117141145.206012-1-angus@akkea.ca> Message-ID: <2e3fc5bef08e1c71b4bbd9b4bdf72157@akkea.ca> X-Sender: angus@akkea.ca User-Agent: Roundcube Webmail/1.3.17 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Hi On 2022-01-17 06:11, Angus Ainslie wrote: > When CONFIG_DM_USB is not defined then usb_gadget_initialize is just a > call > to board_usb_init. Calling board_usb_init twice causes the USB to fail > so > make sure the second invocation is not compiled in when CONFIG_DM_USB > is > not defined. > > Signed-off-by: Angus Ainslie > --- > common/spl/spl_sdp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c > index ae9c09883a..2a2bc8475d 100644 > --- a/common/spl/spl_sdp.c > +++ b/common/spl/spl_sdp.c > @@ -17,7 +17,8 @@ static int spl_sdp_load_image(struct spl_image_info > *spl_image, > int ret; > const int controller_index = CONFIG_SPL_SDP_USB_DEV; > > - usb_gadget_initialize(controller_index); > + if (IS_ENABLED(CONFIG_DM_USB)) > + usb_gadget_initialize(controller_index); > > board_usb_init(0, USB_INIT_DEVICE); Any comments on this patch ? Thanks Angus