Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2152708ybm; Thu, 23 May 2019 12:13:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzn05cmN4actwhTOzAn2Ex1UlZ7w5WsHet8SI+0AlQtyUPdi66avAb66AbLRrJ1m9ZbBHSy X-Received: by 2002:a17:90a:7147:: with SMTP id g7mr3532475pjs.42.1558638820442; Thu, 23 May 2019 12:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558638820; cv=none; d=google.com; s=arc-20160816; b=qIGEhm0IZaBeaKlnjBtlnxH1cy2iTk1egMgcu7cBCGXkAsgtKXNo3vZw4loj2XH//o mTSvLygwqUbHWtQGfPE52IeKFWDLLmPg37/Sqb3LN6XTAdeCQtFGFpbYd41oMipTxSbv 3UIigusMGqUqAeRUOf85uXVizGeJRqI6+fZRMC7ZKKcGMCdmO4+fBStY5yGhlfVcJkQC npfqrUfL3pFAz9E3aqVdxA8JW4h5MHJUm4G3QRpHLDa3882xDUNq3E+MC+LndD9fBocb LoyDL9ts6VvINHjiUenz/jqNy+dbangF9uGPwKN4iba1ulLW9GxdIeQzBPc6Mx4CUqlX ew0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RRXLAeSc43a+vrte8shOddPhcEzeq6zx/hsZ44Dk0mQ=; b=MaBDOmbwK0qkWP52GI6Vz8DqSAZtYJsN8LG1Fa4DNWUC/78aO6MCDWfd7Gakx31gkK FtgYA29XhMqCYCdfr5fEPvGnw3SVfVGa16O7Hq2DaPv0VOC9UzZIxlsIaA26B5U/wHc2 zRendvSbTEjoBlqDLYOT0YEVgzZ2HEFT4nxMk+0l3F1sZLRRJefRY1IUjCgJjWRI3jKh EfeWT2DVUPdnQhlGGvPD5fwMixhuWPRh2Z8xXBegk9oBPl/znppvQrOhQCr46pVZFluG oC/Tqn3NnOVMH520XRZEsE/5pNrpH9pQwtVlCpgQoNzZJWYspi9dZ14dS1mh+POXStMl 2+QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bqPsVhwf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6si508948pgg.213.2019.05.23.12.13.25; Thu, 23 May 2019 12:13:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bqPsVhwf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388192AbfEWTL2 (ORCPT + 99 others); Thu, 23 May 2019 15:11:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:44888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388163AbfEWTL0 (ORCPT ); Thu, 23 May 2019 15:11:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7EAE72133D; Thu, 23 May 2019 19:11:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638686; bh=/qPQOaavt0NlqN/oIrdA0kL6wmDyBzKkrP+wc4M5NWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bqPsVhwfDUf+OTAqbZyPxF3W5oDgqoqiJMk8HGWP2OAiul62hqLnFpPHkmKDyOUj0 HSYiy0qiIOQYMryHm1uH8H1sXao0EBwV5e811uvfY5JXwFDjm+U91zhEyBR3KwXRP4 Nb13l+Prf2TXpoKurpmgTwlPpsyHlpN8Ey2qi8Gw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonas Karlman , Peter Geis , Heiko Stuebner Subject: [PATCH 4.14 27/77] clk: rockchip: fix wrong clock definitions for rk3328 Date: Thu, 23 May 2019 21:05:45 +0200 Message-Id: <20190523181724.028009472@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181719.982121681@linuxfoundation.org> References: <20190523181719.982121681@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonas Karlman commit fb903392131a324a243c7731389277db1cd9f8df upstream. This patch fixes definition of several clock gate and select register that is wrong for rk3328 referring to the TRM and vendor kernel. Also use correct number of softrst registers. Fix clock definition for: - clk_crypto - aclk_h265 - pclk_h265 - aclk_h264 - hclk_h264 - aclk_axisram - aclk_gmac - aclk_usb3otg Fixes: fe3511ad8a1c ("clk: rockchip: add clock controller for rk3328") Cc: stable@vger.kernel.org Signed-off-by: Jonas Karlman Tested-by: Peter Geis Signed-off-by: Heiko Stuebner Signed-off-by: Greg Kroah-Hartman --- drivers/clk/rockchip/clk-rk3328.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) --- a/drivers/clk/rockchip/clk-rk3328.c +++ b/drivers/clk/rockchip/clk-rk3328.c @@ -458,7 +458,7 @@ static struct rockchip_clk_branch rk3328 RK3328_CLKSEL_CON(35), 15, 1, MFLAGS, 8, 7, DFLAGS, RK3328_CLKGATE_CON(2), 12, GFLAGS), COMPOSITE(SCLK_CRYPTO, "clk_crypto", mux_2plls_p, 0, - RK3328_CLKSEL_CON(20), 7, 1, MFLAGS, 0, 7, DFLAGS, + RK3328_CLKSEL_CON(20), 7, 1, MFLAGS, 0, 5, DFLAGS, RK3328_CLKGATE_CON(2), 4, GFLAGS), COMPOSITE_NOMUX(SCLK_TSADC, "clk_tsadc", "clk_24m", 0, RK3328_CLKSEL_CON(22), 0, 10, DFLAGS, @@ -550,15 +550,15 @@ static struct rockchip_clk_branch rk3328 GATE(0, "hclk_rkvenc_niu", "hclk_rkvenc", CLK_IGNORE_UNUSED, RK3328_CLKGATE_CON(25), 1, GFLAGS), GATE(ACLK_H265, "aclk_h265", "aclk_rkvenc", 0, - RK3328_CLKGATE_CON(25), 0, GFLAGS), + RK3328_CLKGATE_CON(25), 2, GFLAGS), GATE(PCLK_H265, "pclk_h265", "hclk_rkvenc", 0, - RK3328_CLKGATE_CON(25), 1, GFLAGS), + RK3328_CLKGATE_CON(25), 3, GFLAGS), GATE(ACLK_H264, "aclk_h264", "aclk_rkvenc", 0, - RK3328_CLKGATE_CON(25), 0, GFLAGS), + RK3328_CLKGATE_CON(25), 4, GFLAGS), GATE(HCLK_H264, "hclk_h264", "hclk_rkvenc", 0, - RK3328_CLKGATE_CON(25), 1, GFLAGS), + RK3328_CLKGATE_CON(25), 5, GFLAGS), GATE(ACLK_AXISRAM, "aclk_axisram", "aclk_rkvenc", CLK_IGNORE_UNUSED, - RK3328_CLKGATE_CON(25), 0, GFLAGS), + RK3328_CLKGATE_CON(25), 6, GFLAGS), COMPOSITE(SCLK_VENC_CORE, "sclk_venc_core", mux_4plls_p, 0, RK3328_CLKSEL_CON(51), 14, 2, MFLAGS, 8, 5, DFLAGS, @@ -663,7 +663,7 @@ static struct rockchip_clk_branch rk3328 /* PD_GMAC */ COMPOSITE(ACLK_GMAC, "aclk_gmac", mux_2plls_hdmiphy_p, 0, - RK3328_CLKSEL_CON(35), 6, 2, MFLAGS, 0, 5, DFLAGS, + RK3328_CLKSEL_CON(25), 6, 2, MFLAGS, 0, 5, DFLAGS, RK3328_CLKGATE_CON(3), 2, GFLAGS), COMPOSITE_NOMUX(PCLK_GMAC, "pclk_gmac", "aclk_gmac", 0, RK3328_CLKSEL_CON(25), 8, 3, DFLAGS, @@ -733,7 +733,7 @@ static struct rockchip_clk_branch rk3328 /* PD_PERI */ GATE(0, "aclk_peri_noc", "aclk_peri", CLK_IGNORE_UNUSED, RK3328_CLKGATE_CON(19), 11, GFLAGS), - GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 0, RK3328_CLKGATE_CON(19), 4, GFLAGS), + GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 0, RK3328_CLKGATE_CON(19), 14, GFLAGS), GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 0, GFLAGS), GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 1, GFLAGS), @@ -894,7 +894,7 @@ static void __init rk3328_clk_init(struc &rk3328_cpuclk_data, rk3328_cpuclk_rates, ARRAY_SIZE(rk3328_cpuclk_rates)); - rockchip_register_softrst(np, 11, reg_base + RK3328_SOFTRST_CON(0), + rockchip_register_softrst(np, 12, reg_base + RK3328_SOFTRST_CON(0), ROCKCHIP_SOFTRST_HIWORD_MASK); rockchip_register_restart_notifier(ctx, RK3328_GLB_SRST_FST, NULL);