Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3024779rwb; Mon, 15 Aug 2022 16:22:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR5K93y2+zLdcA02sTp01xKZ8xDLx6h2pJkdfCgmaGIJnm+oCP8YQRQfbslVuslqS5mA3al6 X-Received: by 2002:a17:907:a047:b0:730:e4e7:5127 with SMTP id gz7-20020a170907a04700b00730e4e75127mr11973588ejc.707.1660605767104; Mon, 15 Aug 2022 16:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605767; cv=none; d=google.com; s=arc-20160816; b=hKJtHx/oEZS/yoPYjZE98lBv+JrsUcZz+TVHHz2NOBa4LxMvWfQZZjR3OcNjiKCzao IUsCCReT66tOy451xOXVm8JuGWrlg0Lj3uFV253sbRALrOe6pq2p/uqxaOGFWe1T0Vmc WXjm9MYeasA9v8g5FJRLdQrsesNKbJ/hJWZruokyKbKttqTUprNNqIVJmgX8hWdPLb9p dGgpR8tqkfnlLWoD4uHRMw0wx2PRjt97ajBwdCD+bvftd1oAaw7673zo8+HiQPf3PdDW 0anXzTSAxFLp651QQ1eohu+v6RaHAf38JY+rJxFJJ2VspaVEN8JL/CcMagzimnbviIZb 3GJw== 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=J8vmUvLU8wYqk7Qhn1KGtmh8gU6P71195sPRHGsIsqM=; b=IuovqtiVRxvG/yRsEIFK9J2AFYln4UrHfoh9i8EfYBzoXjnmFOW1aXZDGB9XxQBXF7 OWaaXQJiRMU5gDEu1Az05sQXZcyRHaw+wg+J8THwIVr9Qo9TdvHI+4btaqDm+83BP1T4 I+PJWAVSe3ttrpYN5m8aDNQda8DHCRb+KNSon5KzVbfJ3dTHWd1iVZddDYsIhRcv8vG2 iZJOMXz2CRepf+RInqH1kdEaIaHnTYPlarTw2x3UJQQGHAIXGimrw/tiBSVXEBx4HMKa tbsKGkBs7cqg28ZdX/I4xSccvYwbmm00ggJbM3iyi5YZLQq4vdkmjiq8t6l/tbbZGNfh c/bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KEK+z9H4; 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 hp10-20020a1709073e0a00b0073040248a76si8562326ejc.700.2022.08.15.16.22.20; Mon, 15 Aug 2022 16:22:47 -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=KEK+z9H4; 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 S1348448AbiHOVdW (ORCPT + 99 others); Mon, 15 Aug 2022 17:33:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348341AbiHOVax (ORCPT ); Mon, 15 Aug 2022 17:30:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78511EEF1A; Mon, 15 Aug 2022 12:24:00 -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 dfw.source.kernel.org (Postfix) with ESMTPS id AD1C761029; Mon, 15 Aug 2022 19:23:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D98DC433D6; Mon, 15 Aug 2022 19:23:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591439; bh=hVpoeMwUvpglwrk2FaC7xACVbQKklXD3rXGWF/M7v7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KEK+z9H4WBMpqsH4TjMsiJS6BuPTujO5OH50NJbwSXGbwBtOXj0omrzymoQE/CsCv nsOBu6Q9gssY0YkZLFOXOHIHCmDm/PpK3Dyjx9m3cGuVEpP/AH2bgAW1q6iWBkaJP+ 90KWYHH+9MzMVgUdtpc/PsRS9JI9WvPVvXzonJSs= 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 5.18 0541/1095] clk: renesas: r9a06g032: Fix UART clkgrp bitsel Date: Mon, 15 Aug 2022 19:59:00 +0200 Message-Id: <20220815180451.920275250@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 c99942f0e4d4..abc0891fd96d 100644 --- a/drivers/clk/renesas/r9a06g032-clocks.c +++ b/drivers/clk/renesas/r9a06g032-clocks.c @@ -286,8 +286,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = { .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, }, { @@ -295,8 +295,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = { .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