From patchwork Mon Apr 15 10:10:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 10900471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 112781669 for ; Mon, 15 Apr 2019 10:12:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7C62284F5 for ; Mon, 15 Apr 2019 10:12:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E57FD2859E; Mon, 15 Apr 2019 10:12:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8EA2C288AE for ; Mon, 15 Apr 2019 10:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2b+Aa2ZwiJWV/B89vBX4Qpv1Ba347V13Ve9X6sejs6A=; b=q38ZirAhdxQzZ0HdRuCYq1AHVg HYvcCv/Fsbgkx9KAenC6s2lj3VtHTIteAfkrjH9j2Yxkz1+3o/0T4C5Awj74hqmI9Ux1pj2qSZAfe f9k+tuN7tgaKEgGOnYU5Q2zQHMp+YcxvfzWs5DVob7OuTaXKVobiuADZHDGHAHkhB4YU5e6h/phVI FmvtcvIKJvGrj067hceZq53OqfdfNjZib8IK9Dw8qzMYH8pKFhx9aSpKww1nmeVfUPzz0p6b2Rzos wDwHDL0w1U6gqdFHex8TQtwH0Upa2/gUmeGLKgUxdBsoX4JEs73+he69ZqlRx4CY8DrHrpZ8YoCKI OH6TCKEA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFyb5-0005LI-JW; Mon, 15 Apr 2019 10:12:19 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFyZs-0003sX-0O; Mon, 15 Apr 2019 10:11:07 +0000 Received: by mail-wr1-x442.google.com with SMTP id q1so21177836wrp.0; Mon, 15 Apr 2019 03:11:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1utUG9oo11jNXQpQkS4fRJ6SG9XxN3l3dVfTXDmhkww=; b=Qi8BP0AzvIj0CLEGzLnz/Oj66x7Dup5/AB4St3neDWs+l/i0yiEZGoj2S4lnmAo91j 6/Qv4T6XF36DDGNKBw+wk0oFjNaEZQipRQAFa25p/OHpCu/QtsYR1hcziqSoKRGMFM9K LCDXH/dTI5b0GTYpzcbOvk4ZRiG/pKpdi7ZvbIEGE5ISd8pPn04AmqjSYmOwOHhQ/pyo iSrtKlnKUuDzZUg6NFMOpDFbl737JjXPmWD/NW671VrdazNDzygD6zM8hh+3A1v2/wy8 MYN6yFc7198iiPRhhsd3HyhW8VLm+sFt6x6mgoeq7p7W2zSzm99BSUO+VEsNocKqwZ/m 08Eg== 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; bh=1utUG9oo11jNXQpQkS4fRJ6SG9XxN3l3dVfTXDmhkww=; b=H4KOLAGpFhJjLuRJZlSG2c9SIhrVqw0wnPisMpgnv1ANB6aRQPFPIRpglKG2UHkKuC mhWxr+E7DuZkcy9U0CbQCPczPhUrIBlgFg6Y0e9kiTMfeqpGYbyKdA1BxNAJT0Qh2g3L yIoOfiNTsCX2E/GW4/MvFZWUAsE47sC7lr54W6G2H0jdI53ZugIrvH1HYk5dlVOeASUh gUDi8Acnk29pXTcPSvn8QHQOJfhIHV1u1H7mLRwfSfKA9yiMfRGIyZAt/QdQ/jMA8+Bw ia+vis92VDDm8dHuEYRaThmPegU8hgokKT4BYmXIfQUlsFr5wgd7Tqts7mL3c+E3LUxx NndQ== X-Gm-Message-State: APjAAAX5CnJV0JeBAqPDx9xR/TIdx/sMQhXOz9ONYOm3a1rQQCbtjGwH LE46HrifwUoHcBPPWbiPhzM= X-Google-Smtp-Source: APXvYqzDXCPaXtO/0J6yWiR1mbQTpGNquiOsxi0UOZGLzVVoYvpAf+tZqDLVoX6afIm4E1NjyaPrJQ== X-Received: by 2002:a5d:6646:: with SMTP id f6mr25387wrw.68.1555323062247; Mon, 15 Apr 2019 03:11:02 -0700 (PDT) Received: from localhost.localdomain ([2001:470:9e39::64]) by smtp.gmail.com with ESMTPSA id d6sm11592214wrp.9.2019.04.15.03.11.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Apr 2019 03:11:01 -0700 (PDT) From: Jonas Gorski To: linux-clk@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org Subject: [PATCH RFT V2 6/8] powerpc/512x: mark clocks as big endian Date: Mon, 15 Apr 2019 12:10:44 +0200 Message-Id: <20190415101046.5872-7-jonas.gorski@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20190415101046.5872-1-jonas.gorski@gmail.com> References: <20190415101046.5872-1-jonas.gorski@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_031104_273648_FBC94736 X-CRM114-Status: GOOD ( 11.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter De Schrijver , Fabio Estevam , Heiko Stuebner , Stephen Boyd , Benjamin Herrenschmidt , Michael Turquette , Michal Simek , Jonathan Hunter , Prashant Gaikwad , Paul Mackerras , NXP Linux Team , Pengutronix Kernel Team , Michael Ellerman , Thierry Reding , Anatolij Gustschin , Shawn Guo , Sascha Hauer MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP These clocks' registers are accessed as big endian, so mark them as such. Signed-off-by: Jonas Gorski --- V1 -> V2: * switch from global to local flags arch/powerpc/platforms/512x/clock-commonclk.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/512x/clock-commonclk.c b/arch/powerpc/platforms/512x/clock-commonclk.c index b3097fe6441b..0072330350fa 100644 --- a/arch/powerpc/platforms/512x/clock-commonclk.c +++ b/arch/powerpc/platforms/512x/clock-commonclk.c @@ -240,7 +240,8 @@ static inline struct clk *mpc512x_clk_divider( u32 __iomem *reg, u8 pos, u8 len, int divflags) { return clk_register_divider(NULL, name, parent_name, clkflags, - reg, pos, len, divflags, &clklock); + reg, pos, len, + divflags | CLK_DIVIDER_BIG_ENDIAN, &clklock); } static inline struct clk *mpc512x_clk_divtable( @@ -250,7 +251,7 @@ static inline struct clk *mpc512x_clk_divtable( { u8 divflags; - divflags = 0; + divflags = CLK_DIVIDER_BIG_ENDIAN; return clk_register_divider_table(NULL, name, parent_name, 0, reg, pos, len, divflags, divtab, &clklock); @@ -261,10 +262,12 @@ static inline struct clk *mpc512x_clk_gated( u32 __iomem *reg, u8 pos) { int clkflags; + u8 gateflags; clkflags = CLK_SET_RATE_PARENT; + gateflags = CLK_GATE_BIG_ENDIAN; return clk_register_gate(NULL, name, parent_name, clkflags, - reg, pos, 0, &clklock); + reg, pos, gateflags, &clklock); } static inline struct clk *mpc512x_clk_muxed(const char *name, @@ -275,7 +278,7 @@ static inline struct clk *mpc512x_clk_muxed(const char *name, u8 muxflags; clkflags = CLK_SET_RATE_PARENT; - muxflags = 0; + muxflags = CLK_MUX_BIG_ENDIAN; return clk_register_mux(NULL, name, parent_names, parent_count, clkflags, reg, pos, len, muxflags, &clklock);