Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5488148ybl; Tue, 14 Jan 2020 09:44:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzenBB/Z44XRbTY3oXcT/w1ZsUPjBpUbTKbqu1UZKMtGSznLzG/wO1n1S032S1sSTSPVN8H X-Received: by 2002:aca:39d6:: with SMTP id g205mr16430804oia.122.1579023882325; Tue, 14 Jan 2020 09:44:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579023882; cv=none; d=google.com; s=arc-20160816; b=s+ngkoGRPHtpJegbk9BU5t/htlvOzqEEEUog6e/rEcyDkf9El0hE0VtNtg4xs7Rpvc /qgYWK1Je3LL8jCvegSBftw50NBt+FHBm5rnmBiyl6lDw7Uqmp9twozl6CSfITTELiuR JqHGExI1jJsOAAxg1lHndBggkxhjtKEl5GepfwzRInerFizrMpJIRtM7r9j/b+gwswUP 6PfwNSFXxdgU4eD2fMnt9ILvRNRJnm+rR95cx0qEnsDHEeB4KwNDJVVY+fwMHoHGg5Bk EoQNjg09h77USY9r8KfNw8FA/SgPr1J7QS8fKpgyApXuv+u202/ZpdD6IaXKjzTX6cXX 3U6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=YhHGv0hYIVjQEkYqr0KPJTrW2MpJU/n9l8TWUPHPYo8=; b=CXME2JwnIAABGIYhbNT6VzerY27jA4OE0HVIwGGeLyn2LuJyjh1GEkGJqcw024YtbY 9BmvTwAm5K6BuTTd0iuWImZmRgE2jRsr2LTuaYw9/bMQqZdNqzwHCzhDYrib0mDUv25t L3fiq5G/T9yD9uBS6ZOBIpd267db/fB52DR9GigbuQtLmi2q7k/2STWvZ9lNAtWEm9fo qrmHAz6pf+SoekBkG72PcOrdGf4kpFW5qqIjXtkZ5HsABVlkyYvq3s8bAYZbU7AS4q+i TbOdQjZGRtGl7YLdid+H9kQ/qzrWkuvZAXpHeq1K8I1ZVWeYXKM6IDCKBz4dmtDsF9tL Enbw== ARC-Authentication-Results: i=1; mx.google.com; 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 p12si7547517otk.141.2020.01.14.09.44.30; Tue, 14 Jan 2020 09:44:42 -0800 (PST) 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; 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 S1728824AbgANRma (ORCPT + 99 others); Tue, 14 Jan 2020 12:42:30 -0500 Received: from outgoing18.flk.host-h.net ([197.242.87.52]:35085 "EHLO outgoing18.flk.host-h.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgANRm3 (ORCPT ); Tue, 14 Jan 2020 12:42:29 -0500 X-Greylist: delayed 4458 seconds by postgrey-1.27 at vger.kernel.org; Tue, 14 Jan 2020 12:42:28 EST Received: from www31.flk1.host-h.net ([188.40.1.173]) by antispam5-flk1.host-h.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1irP2z-0005f4-Ct; Tue, 14 Jan 2020 18:28:06 +0200 Received: from [130.255.73.16] (helo=v01.28459.vpscontrol.net) by www31.flk1.host-h.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1irP2v-0007ID-6N; Tue, 14 Jan 2020 18:28:01 +0200 From: Justin Swartz To: Michael Turquette , Stephen Boyd , Heiko Stuebner Cc: Justin Swartz , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: rockchip: fix incorrect configuration of rk3228 aclk_gpu* clocks Date: Tue, 14 Jan 2020 16:25:02 +0000 Message-Id: <20200114162503.7548-1-justin.swartz@risingedge.co.za> X-Mailer: git-send-email 2.11.0 X-Authenticated-Sender: justin.swartz@risingedge.co.za X-Virus-Scanned: Clear X-Originating-IP: 188.40.1.173 X-SpamExperts-Domain: risingedge.co.za X-SpamExperts-Username: Authentication-Results: host-h.net; auth=pass (login) smtp.auth=@risingedge.co.za X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.03) X-Recommended-Action: accept X-Filter-ID: Mvzo4OR0dZXEDF/gcnlw0YvzwMmgjmY0UwihWARy7g6pSDasLI4SayDByyq9LIhVQj5rfp7t2+1U Z1jMPOrlNUTNWdUk1Ol2OGx3IfrIJKyP9eGNFz9TW9u+Jt8z2T3K7uDjV/sFUXQr+CDrNQuIHgQg mAX8Bxy/iUu0ThNZg0h/RxVysY5Ye6+GGw0VqdJD7ren9RtRNyYim5e3GD8LGfWrcbYvelpuN/Pk qhBpvAyWwieZyauFYqHkIbFa+ipFJdVl2Qo16OdG/SgJyrKdw0Znvotuy3L4aSJjqFExmwGwvf6h PQx0fYKjNC9VXDo4KyWWo0k/XI0fGv8bNm7IfazUKrTRmPfW13HBdTouyUQiTqTLnMPwSR2klzqa C1hRfn6HuUe9L0a5vwf8PHac6dlnibl3vcBqVmvQB4A18acnPwH1VlXOoo++LXPjBzJ/AVXirbLu Jjy3NtnGWLbnBGfrUBEXB2fYGLNieGQuoHtJvp0r29Rf3ZjFwL+MhHEWw/0qBlNDp8uABz3dkWV+ tgmYFaNu+2UDArzT1gq7P+ZTycYLFeAN4+MGwnsp7SkU6CLbyF0Zq4b1/7rjUzETJrWks4pbbQJq 6gWopI3ep45X19ZysgQ+31LcAX8eoFXAhohfegXGH2GIVQVglJFbK771YV8YbC29CtmpcTqTfSIf CWq9oj7OiT8GwpAriB+3/81I3rvR8KJ2fK9jiDYgijyqqY0rATpzHKGfmtNsYTr4SmDZ/bGW8xZC RRs6ZD24UhFcZZEpLhnBCwImTQNvxaLyCc35VA7RvW/HGiGqxL09Cymermt8NAa/gGopT3kKfO4C gvcKmV0o9jYzsFpuc43pp/LzIs3ornuRuAAdgrkq+6l7ZLNYJcf7Z6PCydDzoYZgInuDxgFOs7AZ TwbwMWQbSR6Wmuan/Ls9Qsz9RDDIN7T0mcqBMddGdUDgESur38NrFoXSENXH6UXfnav35JPA4YfM 6tBkXsqvKY6zoLLTPpuFqUUQz+mM8JAD4ECWNo09vb0YLIRnK477e9Xake5PIWKjIXX7qe2zOXoS foyP6zRt50eEqxpBU45i9YX9FCnI0IkSddJcntdBoUG5LGbjO41FyBEqIaDudcVplPE6wCr6GXU1 lCw88ijyus1sGnWknJqS8gGhNQxpB5P3qu7c1xMljx2PG/R+pKBSKy8hXOgvE1zSS7XUhkYEQYeb 3jR5NeVaJQBh0uawl0Cg8j+knAzOA9mmoJvkuhKHiekUuskYaI6ERCKp8gXWqnT9kLHhStr5fiGK 7KncpWELuTEvuGslKTrRIXcXpFg5ivY= X-Report-Abuse-To: spam@antispammaster.host-h.net Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following changes prevent the unrecoverable freezes and rcu_sched stall warnings experienced in each of my attempts to take advantage of lima. Replace the COMPOSITE_NOGATE definition of aclk_gpu_pre with a COMPOSITE that retains the selection of HDMIPHY as the PLL source, but instead makes uses of the aclk_gpu PLL source gate and parent names defined by mux_pll_src_4plls_p rather than mux_aclk_gpu_pre_p. Remove the now unused mux_aclk_gpu_pre_p and the four named but also unused definitions (cpll_gpu, gpll_gpu, hdmiphy_gpu and usb480m_gpu) of the aclk_gpu PLL source gate. Use the correct gate offset for aclk_gpu and aclk_gpu_noc. Signed-off-by: Justin Swartz --- drivers/clk/rockchip/clk-rk3228.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c index d17cfb7a3..d7243c09c 100644 --- a/drivers/clk/rockchip/clk-rk3228.c +++ b/drivers/clk/rockchip/clk-rk3228.c @@ -156,8 +156,6 @@ PNAME(mux_i2s_out_p) = { "i2s1_pre", "xin12m" }; PNAME(mux_i2s2_p) = { "i2s2_src", "i2s2_frac", "xin12m" }; PNAME(mux_sclk_spdif_p) = { "sclk_spdif_src", "spdif_frac", "xin12m" }; -PNAME(mux_aclk_gpu_pre_p) = { "cpll_gpu", "gpll_gpu", "hdmiphy_gpu", "usb480m_gpu" }; - PNAME(mux_uart0_p) = { "uart0_src", "uart0_frac", "xin24m" }; PNAME(mux_uart1_p) = { "uart1_src", "uart1_frac", "xin24m" }; PNAME(mux_uart2_p) = { "uart2_src", "uart2_frac", "xin24m" }; @@ -468,16 +466,9 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = { RK2928_CLKSEL_CON(24), 6, 10, DFLAGS, RK2928_CLKGATE_CON(2), 8, GFLAGS), - GATE(0, "cpll_gpu", "cpll", 0, - RK2928_CLKGATE_CON(3), 13, GFLAGS), - GATE(0, "gpll_gpu", "gpll", 0, - RK2928_CLKGATE_CON(3), 13, GFLAGS), - GATE(0, "hdmiphy_gpu", "hdmiphy", 0, - RK2928_CLKGATE_CON(3), 13, GFLAGS), - GATE(0, "usb480m_gpu", "usb480m", 0, + COMPOSITE(0, "aclk_gpu_pre", mux_pll_src_4plls_p, 0, + RK2928_CLKSEL_CON(34), 5, 2, MFLAGS, 0, 5, DFLAGS, RK2928_CLKGATE_CON(3), 13, GFLAGS), - COMPOSITE_NOGATE(0, "aclk_gpu_pre", mux_aclk_gpu_pre_p, 0, - RK2928_CLKSEL_CON(34), 5, 2, MFLAGS, 0, 5, DFLAGS), COMPOSITE(SCLK_SPI0, "sclk_spi0", mux_pll_src_2plls_p, 0, RK2928_CLKSEL_CON(25), 8, 1, MFLAGS, 0, 7, DFLAGS, @@ -582,8 +573,8 @@ static struct rockchip_clk_branch rk3228_clk_branches[] __initdata = { GATE(0, "pclk_peri_noc", "pclk_peri", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(12), 2, GFLAGS), /* PD_GPU */ - GATE(ACLK_GPU, "aclk_gpu", "aclk_gpu_pre", 0, RK2928_CLKGATE_CON(13), 14, GFLAGS), - GATE(0, "aclk_gpu_noc", "aclk_gpu_pre", 0, RK2928_CLKGATE_CON(13), 15, GFLAGS), + GATE(ACLK_GPU, "aclk_gpu", "aclk_gpu_pre", 0, RK2928_CLKGATE_CON(7), 14, GFLAGS), + GATE(0, "aclk_gpu_noc", "aclk_gpu_pre", 0, RK2928_CLKGATE_CON(7), 15, GFLAGS), /* PD_BUS */ GATE(0, "sclk_initmem_mbist", "aclk_cpu", 0, RK2928_CLKGATE_CON(8), 1, GFLAGS), -- 2.11.0