Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2204994iof; Tue, 7 Jun 2022 23:09:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygH6vo3CXYcH4xdqGBeFJIKf60IY+aqfZDdvqi5tYr+GEV0Qqqm9Ptm2ARjOQhu/Up0WaX X-Received: by 2002:a17:902:d4cd:b0:166:3bff:4473 with SMTP id o13-20020a170902d4cd00b001663bff4473mr32964643plg.79.1654668553102; Tue, 07 Jun 2022 23:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654668553; cv=none; d=google.com; s=arc-20160816; b=cNV4EMrZKw/eRYCorkHXU4F6jzdeX6NXelhYkmzFMsjrhrWgYKCy4u3DayY5OzDXiq t7wn3LDVP3Y4TIWY3zoOwZe0PBg4ZNesPyLyUHJiupZcT8jtk+KBLpDhdS2xDYMQA1qy /vYLeF3dqdysxiigLBW+Ol6tdoebv/VoH36lZU6lQfyYaeVWLU64dPdNox5LEWrNPqlt /RNfs5hKu41eR1cLv8ETdovbRpB8JjK9/X26W6xGkCoo68j4w4nNCx1XqX6lbKbo0SHa ie7PBkFoeGWDZm4wqyXz/gfGoaPZmT4pa/OOhm33Wvf9rxk5v2jv/zDrrAtV3xsfBSJV x5qg== 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=ISuB0LYtNZV3vYjV9+qFr5WoWw+yPo0OMbY3EhAJs1c=; b=c5WRCRGEUsT6PJi5LHDdwV/hMEIGib4m91qP4/QedtkOCX+olfOUbvsg+FHYHL20Nq HY5yinabndQhdE+JXcBcyiHQ5RI/sfBy1DeQQDtCj9sBNFKHo6OpHuSHL+GGew42+v7F 9zVtx6B6+ljoVp7MHh3bcY60W2TEetNM5FkLX5oi4bNRco0aCVtaGEWvvKWLoFa3ZOyB U31MudRZObrvpQ+zEg5EsBgttdfocQyGvYC239XceP/yAr5TwtrB6Y5pSEwExcwEtLKs jYil+D19bySXqfI/MX8AfYX2JklKa+Rqrk22MRQCxd8uHatWEptUn/QRlGT/DYHWKHqd YO2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gejimuzy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q128-20020a632a86000000b003fdd5d74dd6si9134634pgq.285.2022.06.07.23.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:09:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gejimuzy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 60D1D1732AA; Tue, 7 Jun 2022 22:33:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232674AbiFHBmY (ORCPT + 99 others); Tue, 7 Jun 2022 21:42:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383701AbiFGWGJ (ORCPT ); Tue, 7 Jun 2022 18:06:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7299252264; Tue, 7 Jun 2022 12:17:11 -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 81FEA61846; Tue, 7 Jun 2022 19:17:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91850C385A5; Tue, 7 Jun 2022 19:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629430; bh=Cv0wMyuoTYGWUIMmcHn0m83RQs4mj7Mm+wiH+i/sWpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gejimuzy4G6xa+T19RCDsTBJA1bB4+MimfJn7qV99qtKurydVaiQ/cW2/FiK0XM0e wSjPMlFGDfq4yi0ws4vVLDSwu2Ty6FZCrqp2mMsUzbDlYrGhKR2wMtIdI0FQUaz3qY e45IPyRhyNclMm3pXwW+LeQbt5nDA8dtJk2jJB6c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tyrone Ting , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Wolfram Sang , Sasha Levin Subject: [PATCH 5.18 689/879] i2c: npcm: Correct register access width Date: Tue, 7 Jun 2022 19:03:27 +0200 Message-Id: <20220607165022.848904236@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Tyrone Ting [ Upstream commit ea9f8426d17620214ee345ffb77ee6cc196ff14f ] The SMBnCTL3 register is 8-bit wide and the 32-bit access was always incorrect, but simply didn't cause a visible error on the 32-bit machine. On the 64-bit machine, the kernel message reports that ESR value is 0x96000021. Checking Arm Architecture Reference Manual Armv8 suggests that it's the alignment fault. SMBnCTL3's address is 0xE. Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Tyrone Ting Reviewed-by: Jonathan Neuschäfer Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-npcm7xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c index 635ebba52b08..2e466cd6cdfc 100644 --- a/drivers/i2c/busses/i2c-npcm7xx.c +++ b/drivers/i2c/busses/i2c-npcm7xx.c @@ -359,14 +359,14 @@ static int npcm_i2c_get_SCL(struct i2c_adapter *_adap) { struct npcm_i2c *bus = container_of(_adap, struct npcm_i2c, adap); - return !!(I2CCTL3_SCL_LVL & ioread32(bus->reg + NPCM_I2CCTL3)); + return !!(I2CCTL3_SCL_LVL & ioread8(bus->reg + NPCM_I2CCTL3)); } static int npcm_i2c_get_SDA(struct i2c_adapter *_adap) { struct npcm_i2c *bus = container_of(_adap, struct npcm_i2c, adap); - return !!(I2CCTL3_SDA_LVL & ioread32(bus->reg + NPCM_I2CCTL3)); + return !!(I2CCTL3_SDA_LVL & ioread8(bus->reg + NPCM_I2CCTL3)); } static inline u16 npcm_i2c_get_index(struct npcm_i2c *bus) -- 2.35.1