Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3407194rwa; Tue, 23 Aug 2022 04:22:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR7T8u2CZXZa7IPNeCbZs5LCczoUrXNHC3JEUcR+w5Yhamd7DyulwTIomLDh0y4Xycuk+h85 X-Received: by 2002:a17:903:245:b0:16f:85be:f33b with SMTP id j5-20020a170903024500b0016f85bef33bmr23751693plh.96.1661253776391; Tue, 23 Aug 2022 04:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253776; cv=none; d=google.com; s=arc-20160816; b=iV1kb77bEFn2zpNATQgZsLBNx+eXRDbTLz5sOMr8wqC7UEV4tZ9MirmxlSMV35Kueb oqtvd16Xd16Lg7Nh85LZPEkB+lI7ugqvom1ByaCoEN6xSonkuK8n4TPP6wMV7YKtvUiW NgPykf6+WItkfeu9wvm9sAasY1TgckIYNkRtqAxRfxOiwKBaL4gK+IOAoqBaLYJ97iPj NImyYlgNhRWfaYpl5tOx5Bcynyb+TeQWiaK9G35n3WuVCGn6Zfkt5Hwi5TFtxda+6kO8 64Hnu1yH/Ht7z3aPJ+3H6HK3dDVPBqwNCK3Wva+mxs2IXs7oWuezc+NAAngo2FDjZizy yGcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IgylumhtyqvkNhKq+NajJF42X/pi61KWKQHlQFCiJWI=; b=YKc1E97daUueo7NAh842Pv3jyqQUMi00qe+xJVmlhn1U+Kk8VSXQ8eb8NimkC4yC3s HppSZj1n8LI1T80X1QeANE+a043mX6fEMrPeJPCaNXUpYCGE1V6RuA0MFh1OdDhS8l6v FtEmHkOVwCDls/vHlzjjHkePwTyJ78GAELBK+U5XbYExNXUE3NgTmNg96JmnPcgmmoIL 1rBNsUKKT1fYLNMOtDaLXXp4Zhr8+SXxAbDgH8wcc1jlwtfHF0EgCmaXuVAaunJqD6tP HOSppZRwHO4n2F0YZFQ2Mk5KbYoXhWugz/UiKi7awd4Yq6kvnvm2BQ8Jok0zHlMBj2aR VZWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yf0Pdhf+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 80-20020a630553000000b00429a6db308dsi16463460pgf.359.2022.08.23.04.22.45; Tue, 23 Aug 2022 04:22:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yf0Pdhf+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356088AbiHWKl0 (ORCPT + 99 others); Tue, 23 Aug 2022 06:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354224AbiHWK0g (ORCPT ); Tue, 23 Aug 2022 06:26:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CD9783BD6; Tue, 23 Aug 2022 02:05:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E332DB81C65; Tue, 23 Aug 2022 09:05:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51E64C433C1; Tue, 23 Aug 2022 09:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245545; bh=vhTZXx3XlzR/oqCUMJod53DzesE6knwy2xhxKkg2TDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yf0Pdhf+L8424Ank4G66evK5nsPT1IFcmRPwFIGqRPVpV91On8O7Ol71Y767vYrFG WgR2SCM9l9GXOnEcOZuyCC6r/x/0C+5n6sMAUPfGc8JlTXacZh2NeX8sz+xMUnIvmR pq/P8228feHHA9REdvpJtDGT3CfDCzOheKri/1OM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ralph Siemsen , Phil Edworthy , Geert Uytterhoeven , Sasha Levin Subject: [PATCH 4.19 113/287] clk: renesas: r9a06g032: Fix UART clkgrp bitsel Date: Tue, 23 Aug 2022 10:24:42 +0200 Message-Id: <20220823080104.180473298@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ralph Siemsen [ Upstream commit 2dee50ab9e72a3cae75b65e5934c8dd3e9bf01bc ] There are two UART clock groups, each having a mux to select its upstream clock source. The register/bit definitions for accessing these two muxes appear to have been reversed since introduction. Correct them so as to match the hardware manual. Fixes: 4c3d88526eba ("clk: renesas: Renesas R9A06G032 clock driver") Signed-off-by: Ralph Siemsen Reviewed-by: Phil Edworthy Link: https://lore.kernel.org/r/20220518182527.1693156-1-ralph.siemsen@linaro.org Signed-off-by: Geert Uytterhoeven Signed-off-by: Sasha Levin --- drivers/clk/renesas/r9a06g032-clocks.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c index 6e03b467395b..ec48b5516e17 100644 --- a/drivers/clk/renesas/r9a06g032-clocks.c +++ b/drivers/clk/renesas/r9a06g032-clocks.c @@ -277,8 +277,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] __initconst = { .name = "uart_group_012", .type = K_BITSEL, .source = 1 + R9A06G032_DIV_UART, - /* R9A06G032_SYSCTRL_REG_PWRCTRL_PG1_PR2 */ - .dual.sel = ((0xec / 4) << 5) | 24, + /* R9A06G032_SYSCTRL_REG_PWRCTRL_PG0_0 */ + .dual.sel = ((0x34 / 4) << 5) | 30, .dual.group = 0, }, { @@ -286,8 +286,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] __initconst = { .name = "uart_group_34567", .type = K_BITSEL, .source = 1 + R9A06G032_DIV_P2_PG, - /* R9A06G032_SYSCTRL_REG_PWRCTRL_PG0_0 */ - .dual.sel = ((0x34 / 4) << 5) | 30, + /* R9A06G032_SYSCTRL_REG_PWRCTRL_PG1_PR2 */ + .dual.sel = ((0xec / 4) << 5) | 24, .dual.group = 1, }, D_UGATE(CLK_UART0, "clk_uart0", UART_GROUP_012, 0, 0, 0x1b2, 0x1b3, 0x1b4, 0x1b5), -- 2.35.1