Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4593236pja; Thu, 21 Nov 2019 22:29:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzxdfSsgVR1h+5RDUwtf5Z8o63XdgPpqX0HXjTT7wuZpJ6FrsKdQqVl1PnCHyM0RnOE/m5v X-Received: by 2002:a17:906:e087:: with SMTP id gh7mr19761510ejb.278.1574404159048; Thu, 21 Nov 2019 22:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574404159; cv=none; d=google.com; s=arc-20160816; b=aLAabaEO34nAQ4ruTCsS9QY58vQnq3cw1s6QSwrz5FWxCc+K6tndVpadNWp2NfGiw1 RwhPsi+CNVlIBey06EwbbJxmq+k+gDPTQuwRrUlgR+5XL3TKWwJl5K8Cm0pdxnb+r9Ph Lx+6q5r5BrAiBl7+5VZEJ59IWA9FNlsd1n1jj1N4+XSXF//0gPrJkmLeU3beK4Zrgr8h Di4bWlZOZECdnEro/SZ8U4fSNwaV/drTEeV10NQNUoILKeYt0aXlD53bbQgXZNho2R++ eajFgAGNjxf21+ccbQDeXbXZfNiibCGHrNrPbZs9YFmeNpLNyc095NY4K5mI2LRDr2Ci nNhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2Btuj8EEv12v8nKJE2Tddi4Qb+wc6RdOfrhv4RpOL7k=; b=jXoTz8/YNkUAgqBcH3A+Z11lJ50ND/4IVsYuK2omIydauqb2FnZ1gqEy56uAOJSgU8 OKywmrVhQ72hHRFcFFnKUc2FY+mHCYI8LtYAIVu2Fr6SES6mtFeSs5Ymrf6ZN0daPum1 ZqTw/eN7ZAtTaaocvwwJC1CTY974iwcQEFJOPpgDXmJ48lsVB+K3fwTQKWepW0CFN/Rd as6XKEXWEAncDET1k6kGBj5OuiZhksOAAfje7xh/yPVcJsArzCzOvA1xPM+5g6yU4RME CqLiqPQSTNk/YHup/p3nn2pe0S/Jl4cyLiHFkmLcwwtLOqUQnVlTjRELi3OBClahBHAQ E7Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tVzen5CM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h37si2311739eda.249.2019.11.21.22.28.55; Thu, 21 Nov 2019 22:29:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tVzen5CM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729292AbfKVGZu (ORCPT + 99 others); Fri, 22 Nov 2019 01:25:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:55840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726714AbfKVFu6 (ORCPT ); Fri, 22 Nov 2019 00:50:58 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E834620726; Fri, 22 Nov 2019 05:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401857; bh=7DS8nQvITiDoPvFXUkkqn4Bs2erk92HkQ7idQB7DNKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tVzen5CMgELAgivuF50Dd0DugidYIwJDvntPJuh3SLat4nMpFh4f7PVogQEKtI5f1 J850y1nFXhE5VN9knTYOfappAgxkS6wy9GTr3nVTaTqFFHcbgogERHpZkSPLFPzDSP Icrhe1mCIm6YBxQ9j64iwRQTqXGY6a9UlLr96LNI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Geert Uytterhoeven , Simon Horman , Sasha Levin , linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 094/219] pinctrl: sh-pfc: r8a77990: Fix MOD_SEL0 SEL_I2C1 field width Date: Fri, 22 Nov 2019 00:47:06 -0500 Message-Id: <20191122054911.1750-87-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit 755a5b805fa7ff22e2934d67501efd92109f41ea ] The SEL_I2C1 (MOD_SEL0[21:20]) field in Module Select Register 0 has a width of 2 bits, i.e. it allows programming one out of 4 different configurations. However, the MOD_SEL0_21_20 macro contains 8 values instead of 4, overflowing into the subsequent fields in the register, and thus breaking the configuration of the latter. Fix this by dropping the bogus last 4 values, including the non-existent SEL_I2C1_4 configuration. Fixes: 6d4036a1e3b3ac0f ("pinctrl: sh-pfc: Initial R8A77990 PFC support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Sasha Levin --- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c index b81c807ac54d5..d2fcf7f7b9668 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c @@ -395,7 +395,7 @@ FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM #define MOD_SEL0_24 FM(SEL_HSCIF0_0) FM(SEL_HSCIF0_1) #define MOD_SEL0_23 FM(SEL_HSCIF1_0) FM(SEL_HSCIF1_1) #define MOD_SEL0_22 FM(SEL_HSCIF2_0) FM(SEL_HSCIF2_1) -#define MOD_SEL0_21_20 FM(SEL_I2C1_0) FM(SEL_I2C1_1) FM(SEL_I2C1_2) FM(SEL_I2C1_3) FM(SEL_I2C1_4) F_(0, 0) F_(0, 0) F_(0, 0) +#define MOD_SEL0_21_20 FM(SEL_I2C1_0) FM(SEL_I2C1_1) FM(SEL_I2C1_2) FM(SEL_I2C1_3) #define MOD_SEL0_19_18_17 FM(SEL_I2C2_0) FM(SEL_I2C2_1) FM(SEL_I2C2_2) FM(SEL_I2C2_3) FM(SEL_I2C2_4) F_(0, 0) F_(0, 0) F_(0, 0) #define MOD_SEL0_16 FM(SEL_NDFC_0) FM(SEL_NDFC_1) #define MOD_SEL0_15 FM(SEL_PWM0_0) FM(SEL_PWM0_1) -- 2.20.1