From patchwork Wed Oct 28 12:56:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 1389257 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sartura.hr Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sartura-hr.20150623.gappssmtp.com header.i=@sartura-hr.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=sarzdNVw; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLpWK3StMz9sVN for ; Wed, 28 Oct 2020 23:57:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2064E8248B; Wed, 28 Oct 2020 13:56:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sartura.hr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=sartura-hr.20150623.gappssmtp.com header.i=@sartura-hr.20150623.gappssmtp.com header.b="sarzdNVw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 012EE8247D; Wed, 28 Oct 2020 13:56:41 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6E7A282423 for ; Wed, 28 Oct 2020 13:56:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sartura.hr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=robert.marko@sartura.hr Received: by mail-wm1-x344.google.com with SMTP id e2so4676770wme.1 for ; Wed, 28 Oct 2020 05:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=abWw/rhbr+KGknjChx3yK7GypdtKFGfSyHX3tEUmldo=; b=sarzdNVwuPcrQMaoBoZ/GdJXoAYPr0Tb2sqMYc3gt9jw38dGifZkAwHDVUDaj1ZvPe PGEG60jgO96QV2JESWJgV4Vfk9ToMT6ZDBkshCVpLd+BcrssOJHPOp3xO/dPNcEq1IFb iOQunzlAMA06EitSL017ge+jdmfiG0vXAVicZuuus0Frbai2HgKoY9gEWt7syBxA3WUk CrdNgq6LqyTrbWjEfjJvxDhFeuM0eMba10U9j8nVNkekH+jpOrPbG7QnLBK1wLixPIMR MThS+P5aU3tbu4VR5w2iIkWgpdE74Su5cPB3ZEviCQt0SyiETgZaIC9C+x8zi8Di/Efu 7jkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=abWw/rhbr+KGknjChx3yK7GypdtKFGfSyHX3tEUmldo=; b=DP+h1TTWMcJabCJ7wAZ5x2xYJn53K6kTA4O4V4CeUxg8POhsWpKBvwKLQ9h0txePpt FlYaAHN3QKSXaZJLSNFxhy6oGqzZ1oFGtLmmwinO5e5gt0QCmxI/ux5E3uJuVi2btSHv 9dORSbNmx/c37BICIPIIPcWTkO4gbPitIQD8lIUhTLcZJKHAc5h5OTKKZd+obTYhwG3m WhtHAyYEsW+R0jinFQMowy0C8kgpsFtMajQSthMXQEmiJYm2JZ/9CbnI8p9xVo1VIrZh rTjM6ffJEKH8xXQl95GEimzvk/nKs4Jhx3UnjQQJYc8aSHvOZhV7q7Ru8+R9jVHSRisJ E+ZA== X-Gm-Message-State: AOAM530S7caQPe4SBd27+xU7iApVcw5UubP/y+cbz7T5LSi3/Tcixwuz T6isD0o1YyUA98CbFgiSE9cRU/gwmb2sN1yeEVHlDLBoO43pBvp1h1r3djN2baEh9pgSJgrdrCv K1/s5pBJVZUsZamhm9RVqm76b61YoxCmSKZVDnExC/eqiV7DKouZSaUv6QtO10WKMkrvCpNjo X-Google-Smtp-Source: ABdhPJyHgvA7RAnmwXb/c7Dw/+/WRHiMWqaHFsvVPU/HboNK5QFLC5x5C9HDX/LCCyHjhhXqTUIekw== X-Received: by 2002:a1c:dc8b:: with SMTP id t133mr8544005wmg.151.1603889797400; Wed, 28 Oct 2020 05:56:37 -0700 (PDT) Received: from localhost.localdomain (dh207-98-200.xnet.hr. [88.207.98.200]) by smtp.googlemail.com with ESMTPSA id q10sm6743233wrp.83.2020.10.28.05.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 05:56:36 -0700 (PDT) From: Robert Marko To: u-boot@lists.denx.de Cc: Robert Marko , Luka Perkov Subject: [PATCH 4/4] IPQ40xx: clk: add USB clock handling Date: Wed, 28 Oct 2020 13:56:26 +0100 Message-Id: <20201028125626.40067-4-robert.marko@sartura.hr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201028125626.40067-1-robert.marko@sartura.hr> References: <20201028125626.40067-1-robert.marko@sartura.hr> MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean USB clocks were completely forgotten as driver would always return 0 even if clock ID was unknown. This behaviour changed with "IPQ40xx: clk: dont always return 0" and this will now causes the USB-s to fail probing as clock enable will return -EINVAL. So to fix that lets add all of the USB clocks to the driver. Fixes: 430e1dcf ("IPQ40xx: Add USB nodes") Signed-off-by: Robert Marko Cc: Luka Perkov --- arch/arm/mach-ipq40xx/clock-ipq4019.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c b/arch/arm/mach-ipq40xx/clock-ipq4019.c index 7308563ad1..a3f872947d 100644 --- a/arch/arm/mach-ipq40xx/clock-ipq4019.c +++ b/arch/arm/mach-ipq40xx/clock-ipq4019.c @@ -55,6 +55,14 @@ static int msm_enable(struct clk *clk) case GCC_PRNG_AHB_CLK: /*PRNG*/ /* This clock is already initialized by SBL1 */ return 0; + case GCC_USB3_MASTER_CLK: + case GCC_USB3_SLEEP_CLK: + case GCC_USB3_MOCK_UTMI_CLK: + case GCC_USB2_MASTER_CLK: + case GCC_USB2_SLEEP_CLK: + case GCC_USB2_MOCK_UTMI_CLK: + /* These clocks is already initialized by SBL1 */ + return 0; default: return -EINVAL; }