From patchwork Fri Sep 17 08:19:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 514170 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp2002293jao; Fri, 17 Sep 2021 01:20:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuZ/gsgZHvHyLfUlXEjWWXBFiKIsMmCtAQMi10+czI3mKBrhFR7A3to00rrlvugCZHIxIl X-Received: by 2002:a50:f197:: with SMTP id x23mr11259040edl.222.1631866831921; Fri, 17 Sep 2021 01:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631866831; cv=none; d=google.com; s=arc-20160816; b=jZDRxRV9uGegbkBUZCZkcMCijfcQPwH9z2XyaORRm1VyZKErqEZFpmOtTcB1INF74l 5aRyDWQwg3W8ro1EpGakiGRyh73lUqQtwvhq2ysDWULB/1w5ZvbNdIkCPNC0eitGsqco uNcZYHjCHV7WN4lBqe0ywRXlzJTsL9ZfCJTxfZ9UojA8USC+KKA6rixsyNsnQaveqpLf 8CkJV4iGEV9PUbFbXHsJ/gUL3VTzNiOpEK8K2yDkNdFNj/eO0TGq2+WxA4LgcUFRoQme ExeCV16dwUdlARtkW2isrUIpvVJx/9Ayx0Hd0DR89a15j5cjzl8zqRTYBkhJ9M8H3qHr Fk5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=bZ4cuBT6HwNLzjhzyBkSVg0vXD29SmtaVOu5yXt0z14=; b=1GwSOlvJoEx2GIl4/usRSriuyJFVfQ2pnLq2afE1asyyJtPMYfz6SZcQDJkZO+4nkV YEu2gdfBrEoALYyWmyvMDs2yVK46PTUjU85/dNA+x+mgWfzrKxvE2LeU2ZWn06WZeJBx mW/HHuW8BYqbGFdS9bTLvP1OVEpTHfy/L+uh0pVcCtTlmhT5ud3fJbJeO7D+lu5LqjNd jF5xgNeniowpYvR1129JV28Gaghv71E5ysSkH7LMiIIfkJFx+mpMsOtm/riG6E03Ls1v KbmpkKGD2a8HWChlUThFgdzWGgonRRcAvKtrnNCURhCk2FyrMZAUCkGtXE7ZYVLvLodu 4kUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=HiBgZYIR; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 11si6654478eje.729.2021.09.17.01.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 01:20:31 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=HiBgZYIR; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3B0238319C; Fri, 17 Sep 2021 10:20:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com 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=samsung.com header.i=@samsung.com header.b="HiBgZYIR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB3BC831C8; Fri, 17 Sep 2021 10:20:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_SPF_HELO_TEMPERROR autolearn=no autolearn_force=no version=3.4.2 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7B94182BC3 for ; Fri, 17 Sep 2021 10:20:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20210917081955euoutp01d85d5663f86504672a2b10dbe7f3b15f~ljjRPRnEp2825428254euoutp01_ for ; Fri, 17 Sep 2021 08:19:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20210917081955euoutp01d85d5663f86504672a2b10dbe7f3b15f~ljjRPRnEp2825428254euoutp01_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631866795; bh=bZ4cuBT6HwNLzjhzyBkSVg0vXD29SmtaVOu5yXt0z14=; h=From:To:Cc:Subject:Date:References:From; b=HiBgZYIRYfbKW7/sb74pVSryiPnNIweb961nP5+Yz6n8MGhMjIuZ6030itE0apTxY IFaoePmEwaPaqeltB7RgdQGjphFKT/dR5Qlv2Qn6nHMb6CB4juo54GyS10IAT3m5JJ Xw9Xx7R2KVyyclKr7aX3JLgcdBpz/KGZqsO3BGPM= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20210917081955eucas1p26d238c4abeaae55eb84c1503577e1d75~ljjRDGrNb2101521015eucas1p2u; Fri, 17 Sep 2021 08:19:55 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id A8.FA.56448.BAF44416; Fri, 17 Sep 2021 09:19:55 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20210917081954eucas1p21f21f427d33607535b34389885a85fbc~ljjQpqI_H0732207322eucas1p2w; Fri, 17 Sep 2021 08:19:54 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210917081954eusmtrp13e01d68e613d6d64ccddc71e92211e36~ljjQo5nrQ3047030470eusmtrp1E; Fri, 17 Sep 2021 08:19:54 +0000 (GMT) X-AuditID: cbfec7f5-d3bff7000002dc80-a8-61444faa35b8 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id F0.52.31287.AAF44416; Fri, 17 Sep 2021 09:19:54 +0100 (BST) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210917081954eusmtip2fdd9bb08728ff16fdc85e878fd2eb4fa~ljjQKWUX40483704837eusmtip2U; Fri, 17 Sep 2021 08:19:54 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Cc: Marek Szyprowski , Matthias Brugger , Nicolas Saenz Julienne , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH] arm: rpi: perform XHCI firmware upload only once Date: Fri, 17 Sep 2021 10:19:43 +0200 Message-Id: <20210917081943.13865-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4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wDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPLMWRmVeSWpSXmKPExsVy+t/xe7qr/F0SDd5tU7bYOGM9q8WNX22s FmuP3GW3WDD5CZD7UNvi7d5Odgc2j02rOtk8zt7ZwejRt2UVo8f6LVdZAlii9GyK8ktLUhUy 8otLbJWiDS2M9AwtLfSMTCz1DI3NY62MTJX07WxSUnMyy1KL9O0S9DJWTTvNUvCCrWLSrfnM DYx3WbsYOTkkBEwkjkzfCGRzcQgJLGWUmLZ+HVRCRuLktAYoW1jiz7UuNoiiT4wSi08uYQZJ sAkYSnS9BUlwcogISEj86r/KCFLELPCcUeLuuzawbmEBR4kL828xgdgsAqoSP/b/AGvgFbCV mPDxChPEBnmJ1RsOME9g5FnAyLCKUSS1tDg3PbfYUK84Mbe4NC9dLzk/dxMjMOS2Hfu5eQfj vFcf9Q4xMnEwHmKU4GBWEuG9UOOYKMSbklhZlVqUH19UmpNafIjRFGjfRGYp0eR8YNDnlcQb mhmYGpqYWRqYWpoZK4nzbp27Jl5IID2xJDU7NbUgtQimj4mDU6qBSVtGtUPdrGn33sgPSwtS t3Nf2rEon+XryYd3PbSjr293339fXuJp3M0HL8SnvNRLbFA4/PWTu9zRV5Ln7DelrGLYFPnh yv6ogkQND/PQ9TEJR66fZz51w94kPyf6urCz4oP+1FmFyQeOK+00X79GzPPyldurTH/MeOb4 9/3XY/aaOdcVpCzNjPbnfvj4g39j/PMDqucvvO9e23r/+rPd+Y52wgm5on7Jx0+9PCV9ovBw kdCvGBa/5as5On78/b9Ca9aS2kcCLw0+zdsj9+tT8Id4h1m9vwzquD12xhyI7nne2au/MW2V +d281IOeu65/MKj7eYEhJ+agy+ar/6zi5TL/HtXtWcH+OtCMa17gp49KLMUZiYZazEXFiQCX EbYYwgIAAA== X-CMS-MailID: 20210917081954eucas1p21f21f427d33607535b34389885a85fbc X-Msg-Generator: CA X-RootMTR: 20210917081954eucas1p21f21f427d33607535b34389885a85fbc X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210917081954eucas1p21f21f427d33607535b34389885a85fbc References: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean XHCI firmware upload must be performed only once after initializing the PCI bridge. This fixes USB stack initialization after calling "usb stop; usb start" on Raspberry Pi 4B. Signed-off-by: Marek Szyprowski --- arch/arm/mach-bcm283x/msg.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 Reviewed-by: Nicolas Saenz Julienne diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c index 347aece3cd..345f7fe2b7 100644 --- a/arch/arm/mach-bcm283x/msg.c +++ b/arch/arm/mach-bcm283x/msg.c @@ -170,6 +170,12 @@ int bcm2711_notify_vl805_reset(void) ALLOC_CACHE_ALIGN_BUFFER(struct msg_notify_vl805_reset, msg_notify_vl805_reset, 1); int ret; + static int done = false; + + if (done) + return 0; + + done = true; BCM2835_MBOX_INIT_HDR(msg_notify_vl805_reset); BCM2835_MBOX_INIT_TAG(&msg_notify_vl805_reset->dev_addr,