From patchwork Wed Oct 28 12:56:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 1389255 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=kT8FZXSA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLpW16w5jz9sVt for ; Wed, 28 Oct 2020 23:56:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 04FAC82430; Wed, 28 Oct 2020 13:56:37 +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="kT8FZXSA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3A0C5823F4; Wed, 28 Oct 2020 13:56:35 +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-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 AAAFB823F4 for ; Wed, 28 Oct 2020 13:56:32 +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-x341.google.com with SMTP id 13so4456078wmf.0 for ; Wed, 28 Oct 2020 05:56:32 -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:mime-version :content-transfer-encoding; bh=ebHHzkf2mgVDhCKvhAPEpDKM7soaBmY8UVTqlqpKUm0=; b=kT8FZXSA0oEtU20a2x/PDe06F3GzPA9p7zsdwyMGnhZtDFfBhEK9TDGalCe3C7x/xP qs0pwAly8VXgaWLV3F36gWRzgVztpYJyjrAvJEUl7mRwf8kNgvetpLLjkTJ1kHZTrn6R jcXRxo7RlJml8bqoURCeMjUqFoxOJBMsFP0B5n5CPKt3S+Ti950CKFIcFqjbyeRF5/M9 QZAj4qO5YYUxohd3MIG7QWwDovEBmt1qMfs1e6ii0vnKjFexRZs1NR4gkECw3G8p3Q22 aPsEVUb7QIpxfSdQ952IsgSQO8bBlkZhGdG+QzhsGLANcikSlHTY1wkW1hD5kmCgSWYE jP0Q== 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:mime-version :content-transfer-encoding; bh=ebHHzkf2mgVDhCKvhAPEpDKM7soaBmY8UVTqlqpKUm0=; b=rN6txyIAXpfIzx4LQYS3Vcw1+4NbZjXlORTmZHm622GF51GVXwfkbE/VZz8d7jxFfb F6xnrmJmIaFFZgWV/gM6IffIHJxzN/qHMei14F5zsxQ2z6sN5/vgoBnrifgBs/QO5wDv 5BqEMu4VnhNzhzh2KpKozMq0gUQJd/eAWOjXQhO5ltoyuQZCPE6XV77IvV9B2chbX91q TaPnGNNTFWom9TWKwVeGsa3TTDZ9i/ya4Zn6xL6y8P1XGjonTAxByEJXRrKc4guGYJZT qH9oyrlCPiDxkSxHbq5dptAYaU5Cip1RfMsPZpXJMrj6yI8q0TCWUW71yw4O2tH45HJg QF4Q== X-Gm-Message-State: AOAM531ZYBVjIKltsGAVEOadovKwmJOR6G8lcszAI1kZk7FYalOmTOOB j4W1pzW5C/1IHMCln1vmAnejtFqy2xeT+OLCRCtjkPLamLbJMmaGIEpozWgKc7BUNdJsKB59yru jG/rOJoyiClD10YBuRNSgXdvai9DpBY/8YO6USw/ZSDrEJPjtaORSbf53ckpLuCB6NhAdoc77 X-Google-Smtp-Source: ABdhPJwOEf4qqB8bZrMCJwS9aa/4L428As5OThRu+sM7pu3C+3jHPNA4ks0Tkt/2jOdjWUCleG5QtQ== X-Received: by 2002:a1c:a90e:: with SMTP id s14mr8356229wme.46.1603889791923; Wed, 28 Oct 2020 05:56:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 05:56:31 -0700 (PDT) From: Robert Marko To: u-boot@lists.denx.de Cc: Robert Marko , Luka Perkov Subject: [PATCH 1/4] IPQ40xx: clk: use dev_read_addr() Date: Wed, 28 Oct 2020 13:56:23 +0100 Message-Id: <20201028125626.40067-1-robert.marko@sartura.hr> X-Mailer: git-send-email 2.28.0 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 Lets convert the driver to use dev_read_addr() instead of the devfdt_get_addr(). While we are here, lets also alphabetise the includes. Signed-off-by: Robert Marko Cc: Luka Perkov --- arch/arm/mach-ipq40xx/clock-ipq4019.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c b/arch/arm/mach-ipq40xx/clock-ipq4019.c index 31ae9719e8..1f385665cc 100644 --- a/arch/arm/mach-ipq40xx/clock-ipq4019.c +++ b/arch/arm/mach-ipq40xx/clock-ipq4019.c @@ -8,8 +8,8 @@ * */ -#include #include +#include #include #include @@ -35,7 +35,7 @@ static int msm_clk_probe(struct udevice *dev) { struct msm_clk_priv *priv = dev_get_priv(dev); - priv->base = devfdt_get_addr(dev); + priv->base = dev_read_addr(dev); if (priv->base == FDT_ADDR_T_NONE) return -EINVAL; From patchwork Wed Oct 28 12:56:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 1389254 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=ESl/IiLm; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLpW13zh8z9sVN for ; Wed, 28 Oct 2020 23:57:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 770F682423; Wed, 28 Oct 2020 13:56:41 +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="ESl/IiLm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B12D682423; Wed, 28 Oct 2020 13:56:37 +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-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 33FA382423 for ; Wed, 28 Oct 2020 13:56:35 +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-wr1-x444.google.com with SMTP id a9so1762283wrg.12 for ; Wed, 28 Oct 2020 05:56:35 -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=vqR9w9VrizQoYIzyZjur7E0fto/EUEzyIkKoWfzT/J4=; b=ESl/IiLml+Iq/eaObtx9lRn7ezm18BG2kzTxczBQNcbbiNDj3qMtLu4qCYniEq7Yq5 7qXcAPAmVHYhOAJ2rZ2/Oanq1QHYewwO38/iKyqADBn9sY9I4IwgKCO4054mzdmEmGMO ngtAaDVuWZ4CF8KNFlVvYP91MbJF0MEu/X6WgnurLcIQVkTHyixhCwSMOyiEyejxnylg oD/F/OQ/Q14aVNRQBioU4FuAFxfSnO5Bd4rg2sTpEoJEUe1OImYgLQvn5IquhQKetkgI rONIKtgvGBQI6kkgOXlS+Gy2zKAXy+IkU7WJ5Lq0yiXrKX50zLd6+J6GVSKo7/fWD2Bt nILg== 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=vqR9w9VrizQoYIzyZjur7E0fto/EUEzyIkKoWfzT/J4=; b=NFdH1idbnC+gJg59bcIu3R3M8V7Z4lFNyQG6n03F9uGlQ2lUKvOz10Wq4OyS+QvEbq mUSu/YLJuwVmKXNpepnoCEuxCShLUrSGqdQJ8bJqiiywC/Xc6zss9XrdhmXVgiR7YxW2 7NTPRMIPKko5Oarc1x8EwK+nBU3Fry9hedzmObgBCH6b4AZeoAz+FGfWSGxs6GaJdnZU hJmSuv/GJxdODCWaek3RtZ7zt0nDcgdbN0ZRKWQTxHgHvdRCjdl+GnHuhodbIxAMXV2f 5NqVn3GbxOileIJm285kgfMRLaYmberj5AV0lHPWPBTHWJ6G343oJ3hBsk/i5yVzhrCX +FnA== X-Gm-Message-State: AOAM531xYypHX7hKkO1b0ajbnrUzzHCOdQvtDUGZ2lhfqpA8rCjpVbC8 dOSiJKe+6wHyJSX+pdywhOLNcHp2bThKUhCr6ULM61gVOl0KQPRC3KGoYAeq4HNBSZPoEQJTzDm TFWGy3KiGt9szhy5Bya/EJMg7/WLaZ6O6pxL99gaEKwGt9tFAA3OYXFGTayeUoEv+lVTePoGV X-Google-Smtp-Source: ABdhPJw615yD2oTyJdpg0I0UgVn3uGsE3qoPfKkqCZ+2pEkL8M684EuwR+SGkapurGDhM1BOf3ArHQ== X-Received: by 2002:adf:fd47:: with SMTP id h7mr8778776wrs.245.1603889794300; Wed, 28 Oct 2020 05:56:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 05:56:33 -0700 (PDT) From: Robert Marko To: u-boot@lists.denx.de Cc: Robert Marko , Luka Perkov Subject: [PATCH 2/4] IPQ40xx: clk: drop breaks in switch case Date: Wed, 28 Oct 2020 13:56:24 +0100 Message-Id: <20201028125626.40067-2-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 There is no point in having break statements in the switch case as there is already a return before break. So lets drop them from the driver. Signed-off-by: Robert Marko Cc: Luka Perkov --- arch/arm/mach-ipq40xx/clock-ipq4019.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c b/arch/arm/mach-ipq40xx/clock-ipq4019.c index 1f385665cc..ac2b830353 100644 --- a/arch/arm/mach-ipq40xx/clock-ipq4019.c +++ b/arch/arm/mach-ipq40xx/clock-ipq4019.c @@ -25,7 +25,6 @@ ulong msm_set_rate(struct clk *clk, ulong rate) case GCC_BLSP1_UART1_APPS_CLK: /*UART1*/ /* This clock is already initialized by SBL1 */ return 0; - break; default: return 0; } @@ -53,11 +52,9 @@ static int msm_enable(struct clk *clk) case GCC_BLSP1_QUP1_SPI_APPS_CLK: /*SPI1*/ /* This clock is already initialized by SBL1 */ return 0; - break; case GCC_PRNG_AHB_CLK: /*PRNG*/ /* This clock is already initialized by SBL1 */ return 0; - break; default: return 0; } From patchwork Wed Oct 28 12:56:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 1389256 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=C5xxZS+2; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4CLpW74c4Vz9sVw for ; Wed, 28 Oct 2020 23:57:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 60495824C5; Wed, 28 Oct 2020 13:56:43 +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="C5xxZS+2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 23D9682483; Wed, 28 Oct 2020 13:56:39 +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-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 A17A2823F4 for ; Wed, 28 Oct 2020 13:56:36 +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-x343.google.com with SMTP id v5so4462803wmh.1 for ; Wed, 28 Oct 2020 05:56:36 -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=ILcW873S4cJhckbc1/8XWearEDgK+JoOxElRxqR5YZw=; b=C5xxZS+2voIC61k0uWFj2VCbq4HvuLQ01WvlaUBGqPceLpH1PBxQvUnwx7O0we5gBe PO7QDU21EAeu11DqY2sw/fNNzuFwUzQ7ICSn4z754Rjgl3ZBcTPhs51Gd3Dx/V7Sd8rd /jC+b7UoZ+ZxKoHnoh2qQLn+EaFiEWwLPwxckMnoGvBb8lXojkzd+Hb7AYyBx75GCFzC tT3qUvrCidlzraUi4A7Qnx6EV0Y47nGN20iNU6bgfKDbv2bpZ8e1B3R+2/quwmz2gRs9 +vAjjVtqMnh8ICNGEuZA+VVfMJOiGVbJGNsEkwd2oI4n78vrKjs1Mwtep1frU5PJ0nkL mK+A== 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=ILcW873S4cJhckbc1/8XWearEDgK+JoOxElRxqR5YZw=; b=Da1YyZywDQjt/RLG/kodRB+mqBh7C1x2XvhaT3OgdZwg56CzZKA8GwG33IEF6XIaAd vxXfbXjA9auiI/KOgCqIKHstamQ3eJr23i+flN+8BBNJqGgoSYaGDdCSRnMnIGo1lZBQ Dj36/Avilwdfca6Tjy5NQg2Gcr7D3m8WHdEIJbiZQv/VbUjCKCREJ1d7UKmntsYDUMJS bFybuKp3QErFlXfO0uFaCnAyIUEeYR08z2PJvxbUVIwIWjtvhypjzuqnQCINEdhryC/J LvtEPCEMsQPNUTOjdVllrMqAoVJOB/7n/9PI5zlOEJvjRI7pqEXNFJNVhavK83V8R9Rf 4p4A== X-Gm-Message-State: AOAM532BwlYo6szCHXwQ23w5hAFWB3rfPSs7vpG3KABHC5404VtsjG18 TTE99HD7Y/oEuAeSsUl+PRUJPfE1Bve1CMcIjcgjoOxFZS6OKkoDLVATYs4IopA0PFcseFzYD+o AWAUpDrapJrkVs2DmqSuj4JPIlgSEFNahq5OnF4+H1G0p6UJ0BGVyCMsZpmlzqZEo0Sua2SJi X-Google-Smtp-Source: ABdhPJwl9R2gcPpJErMhyavZV21TRQMI/JVPhCkfozOyd9ncdpQnQd9dRxyPDMj3aJ20bWRNUyQnow== X-Received: by 2002:a1c:7707:: with SMTP id t7mr8589898wmi.54.1603889795911; Wed, 28 Oct 2020 05:56:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 05:56:35 -0700 (PDT) From: Robert Marko To: u-boot@lists.denx.de Cc: Robert Marko , Luka Perkov Subject: [PATCH 3/4] IPQ40xx: clk: dont always return 0 Date: Wed, 28 Oct 2020 13:56:25 +0100 Message-Id: <20201028125626.40067-3-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 Currently the driver will go through the clock ID-s and set/enable them as needed. But if the ID is unknown it will fall through the switch case to the default case which will always return 0. This is not correct and default cases should return a error code since clock ID is unknown. So lets return -EINVAL instead. Signed-off-by: Robert Marko Cc: Luka Perkov --- arch/arm/mach-ipq40xx/clock-ipq4019.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c b/arch/arm/mach-ipq40xx/clock-ipq4019.c index ac2b830353..7308563ad1 100644 --- a/arch/arm/mach-ipq40xx/clock-ipq4019.c +++ b/arch/arm/mach-ipq40xx/clock-ipq4019.c @@ -26,7 +26,7 @@ ulong msm_set_rate(struct clk *clk, ulong rate) /* This clock is already initialized by SBL1 */ return 0; default: - return 0; + return -EINVAL; } } @@ -56,7 +56,7 @@ static int msm_enable(struct clk *clk) /* This clock is already initialized by SBL1 */ return 0; default: - return 0; + return -EINVAL; } } 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; }