From patchwork Tue Jan 26 12:44:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kochetkov X-Patchwork-Id: 8121211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2A4469F1C0 for ; Tue, 26 Jan 2016 12:46:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 52E3320272 for ; Tue, 26 Jan 2016 12:46:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8146620270 for ; Tue, 26 Jan 2016 12:46:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aO2zb-0001In-4E; Tue, 26 Jan 2016 12:45:07 +0000 Received: from mail-lb0-x241.google.com ([2a00:1450:4010:c04::241]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aO2zX-0000e4-JQ; Tue, 26 Jan 2016 12:45:04 +0000 Received: by mail-lb0-x241.google.com with SMTP id bc4so8272299lbc.0; Tue, 26 Jan 2016 04:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=WdVxAA/3dl2gzHdkCAsziMyJ4X+fC/tGCUgYotqW2oA=; b=S3oRTwzOJ8A5oIlnzFqg5/z0G56GfBB8n0tcbqGSX7fdx/KUBS/fpbcuDdRJR8R2rK b/8ngQDqvNbJkRY3yzv2UpyqFIpMOQZlPipDMUU0w3gxie1srtaPOH3x6OnKRpnfZXPV tZxNtiZrQFwSotrakYOjSk87gKbKPWFbe1eMBis8qQms5Y3CV6fS+mGpW03Y1ttdqbFs dddxN948x+5iS64YOduHk9+4kHulDvvJdLhh/yLw5zAc9//Uf8AHG8XcT6VjqQ0MMD5X 742CECt6lN38/1nyF3Py2y+eLqFwqvxdfdwLH/BqskRJye2aM53okA2mFtleNGYA47yy Wx4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WdVxAA/3dl2gzHdkCAsziMyJ4X+fC/tGCUgYotqW2oA=; b=iez5Kj7vTzvLFrRJEwmpe29VP61g2ZO236kOzoqh6neBAarhst7hsOHVik/9fCvBYA xMjguG2r/zYwQVpDAXGlLz8Q8zoRl88Js6UNnS944RLLrmyw1w6vv880iScShzz8SMaD FJm8+XcmjEstsUP976yCuwCYDfRxGTvK4df9uqmJU8jT5C8hfQrLa5B8lnNXjKfQpoBU LyQWlQotJ2ae56OQIm2q1lgCKUwPC9z+STQMpu11Y08xMj+HPdXkuWPuU9yNMmWPP7cG +4X4jlhk2Ub78tYNIJjAr24AnkBNZXomFVFU+kP1zf74Q87Zt+oCje6SXwCIVIH4xVz6 KPNw== X-Gm-Message-State: AG10YOR0+m9sI4Q1h6mhr7KpaYgUy4qTr8Wn8x+lGflO1WMhMi5IUZJ/Po5ZJcvt2GdMUQ== X-Received: by 10.112.161.65 with SMTP id xq1mr8581087lbb.82.1453812281528; Tue, 26 Jan 2016 04:44:41 -0800 (PST) Received: from ubuntu.lintech.ru ([185.35.119.87]) by smtp.gmail.com with ESMTPSA id zk9sm174854lbb.3.2016.01.26.04.44.40 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jan 2016 04:44:40 -0800 (PST) From: Alexander Kochetkov To: Heiko Stuebner Subject: [PATCH] clk: rockchip: Reparent hclk_rom, hclk_i2s0 and hclk_spdif to hclk_cpubus on RK3066/RK3188 Date: Tue, 26 Jan 2016 15:44:10 +0300 Message-Id: <1453812250-11819-1-git-send-email-al.kochet@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160126_044503_867870_4D3D26F6 X-CRM114-Status: UNSURE ( 9.24 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.6 (/) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Kochetkov , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SBL_CSS, RP_MATCHES_RCVD, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to make peripherals (rom, i2s0 or spdif) accessible via cpu, hclk_cpubus gate must be opened. Without that all accesses (readl/writel) return wrong data. The patch fixes regression introduced by recent clock code. Fixes: 78eaf6095cc763c ("clk: rockchip: disable unused clocks") Signed-off-by: Alexander Kochetkov CC: linux-clk@vger.kernel.org CC: linux-arm-kernel@lists.infradead.org CC: linux-rockchip@lists.infradead.org CC: linux-kernel@vger.kernel.org CC: stable@vger.kernel.org # 4.1.x- --- drivers/clk/rockchip/clk-rk3188.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c index abb4760..54b88a6 100644 --- a/drivers/clk/rockchip/clk-rk3188.c +++ b/drivers/clk/rockchip/clk-rk3188.c @@ -429,10 +429,10 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = { GATE(0, "aclk_strc_sys", "aclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(4), 10, GFLAGS), /* hclk_cpu gates */ - GATE(HCLK_ROM, "hclk_rom", "hclk_cpu", 0, RK2928_CLKGATE_CON(5), 6, GFLAGS), - GATE(HCLK_I2S0, "hclk_i2s0", "hclk_cpu", 0, RK2928_CLKGATE_CON(7), 2, GFLAGS), - GATE(HCLK_SPDIF, "hclk_spdif", "hclk_cpu", 0, RK2928_CLKGATE_CON(7), 1, GFLAGS), GATE(0, "hclk_cpubus", "hclk_cpu", 0, RK2928_CLKGATE_CON(4), 8, GFLAGS), + GATE(HCLK_ROM, "hclk_rom", "hclk_cpubus", 0, RK2928_CLKGATE_CON(5), 6, GFLAGS), + GATE(HCLK_I2S0, "hclk_i2s0", "hclk_cpubus", 0, RK2928_CLKGATE_CON(7), 2, GFLAGS), + GATE(HCLK_SPDIF, "hclk_spdif", "hclk_cpubus", 0, RK2928_CLKGATE_CON(7), 1, GFLAGS), /* hclk_ahb2apb is part of a clk branch */ GATE(0, "hclk_vio_bus", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 12, GFLAGS), GATE(HCLK_LCDC0, "hclk_lcdc0", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 1, GFLAGS),