From patchwork Thu Apr 18 11:12:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 10907061 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 3B3A317E0 for ; Thu, 18 Apr 2019 11:13:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E8E6287C8 for ; Thu, 18 Apr 2019 11:13:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12C3428C24; Thu, 18 Apr 2019 11:13:50 +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 B7B0B287C8 for ; Thu, 18 Apr 2019 11:13:49 +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=jW+m/hTj0XjxRJnZ+fPJ/RvgDfipfwUKb0+HWA+ZxvQ=; b=dyqGW56boXoB70/PcRhkb+6IOd SP7TE0/H2IwGbgn8ZsmN/7YD7ZuCrPFxQffCsOn+oHovMjeNGuDgx84uvlNMASzcKyyhVjtQYn+6Y ax4mFQ3M9spy//zz25Tl2zQcqO7C7M4EOo21yLXXxuRnDeZC+ihCoN4Kk5ulUIN5gieIXHaGYNCax +qYQXBePOs9iVLB+Xo3sa1iqsPdaTZnLPzPY+WwIFSfk1fzQybc6EQImas1ZVl6P03kHCyBbIL5Ex WBlujkLMoo+oDcemkd/SUk/jbRxLJ2WRAQkZGkhsragkn+0u+KlnAZ/ttrFli4OxUGpVsCvWmx4A6 UvW1zNyg==; 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 1hH4zC-0008Qn-5Z; Thu, 18 Apr 2019 11:13:46 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH4xs-0006ht-MY; Thu, 18 Apr 2019 11:12:31 +0000 Received: by mail-wm1-x341.google.com with SMTP id z11so2345431wmi.0; Thu, 18 Apr 2019 04:12:24 -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=7rH6QiINrW20jZKJQ9mHqe+acRM5fOnj0AeCibP7tdo=; b=nh5HIHVL+iaMdKswN/1VECmDUAsvHer42OH6xA6YeVOt3d002kWpK+8tVEU4/in2sy 5dKDBE0cey7kqrFDpfMO9f2GNGGciWLsaXPzGG5fpfNXIV46BQuprg2U/dfRr+SaKvKG 2yJHHGxOHyPy63rbRNTvLcc9MPEgztaTgQAV2YL2xDVvDy7ObSO056yCjBo1aXfpBuvg BjEcCn3yfXbhUT76eTLUj9z4tvQlF6gSLkKfR1JH6sUbmEfBLB9FrL5wOeT5Ct/o1ITQ 2mdgTcHGVqAQEdNoOPkWSmDTYz9HZ/rTiZ0sZ3NTGb93M2Qo5auH+q/CRrbv707/QE+t +46Q== 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=7rH6QiINrW20jZKJQ9mHqe+acRM5fOnj0AeCibP7tdo=; b=PeUEbmYVHBvrvqx/XsqWnQsVc/jLbbQZLxR6/7KBfFI/SlHIZVYIkFjdNnTbjvkSih osPQFkDyD3b+U74JsqGp1azLr1y5Eh1wzB+XgX5ZY/F0Ah+C8naorNvv03gHWiHEtg2B Fgf/lP2UXXfueQXdFe+if8JuO6q7LZKZJWIzYy04gZw2VUVQsQnLJh9MLiuH8Z/ZwsS6 3HZM34grmn1YTG9EMYomLK/X6Lw4evSK64sgXADmzePcwHHuoafFDZ+CkAyXWnaUji+I GWjnz/pz9rU1hgIPQvrJOh0T7fL4p7KyEC5jkRz3yEEsA52oQL0h91oMZSRUNgL578RV iuOQ== X-Gm-Message-State: APjAAAVobWK2wmxLd1zAjkP1UdnhOggrW61rEcoWuVymlamNVOBD1ZcW ZJJsP5BDXlsq5B888bQq0qw= X-Google-Smtp-Source: APXvYqyqtoymM85mY8yDZvpZvH8yQ3m231qFQRM7gMJHvVMU6OFaUJjhJvrdys5NJLtR6ZDHgzO3fw== X-Received: by 2002:a1c:43c2:: with SMTP id q185mr2724953wma.53.1555585943326; Thu, 18 Apr 2019 04:12:23 -0700 (PDT) Received: from localhost.localdomain ([2001:470:9e39::64]) by smtp.gmail.com with ESMTPSA id z63sm2005594wme.30.2019.04.18.04.12.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 04:12:22 -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 V3 6/8] powerpc/512x: mark clocks as big endian Date: Thu, 18 Apr 2019 13:12:09 +0200 Message-Id: <20190418111211.10474-7-jonas.gorski@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20190418111211.10474-1-jonas.gorski@gmail.com> References: <20190418111211.10474-1-jonas.gorski@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_041225_250070_7802B67A X-CRM114-Status: GOOD ( 11.89 ) 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 --- V2 -> V3: * slightly rework to avoid a line >80 chars V1 -> V2: * switch from global to local flags arch/powerpc/platforms/512x/clock-commonclk.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/512x/clock-commonclk.c b/arch/powerpc/platforms/512x/clock-commonclk.c index b3097fe6441b..af265ae40a61 100644 --- a/arch/powerpc/platforms/512x/clock-commonclk.c +++ b/arch/powerpc/platforms/512x/clock-commonclk.c @@ -239,6 +239,7 @@ static inline struct clk *mpc512x_clk_divider( const char *name, const char *parent_name, u8 clkflags, u32 __iomem *reg, u8 pos, u8 len, int divflags) { + divflags |= CLK_DIVIDER_BIG_ENDIAN; return clk_register_divider(NULL, name, parent_name, clkflags, reg, pos, len, divflags, &clklock); } @@ -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);