Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4872562yba; Tue, 30 Apr 2019 05:51:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLeCZ9ukEDy5M/OJ5dhchMoaQE0jT162bX6dwcXg92Br9+soiEbZggfn09kuwXU1pKQAeW X-Received: by 2002:a62:46c7:: with SMTP id o68mr10452879pfi.54.1556628719776; Tue, 30 Apr 2019 05:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556628719; cv=none; d=google.com; s=arc-20160816; b=XsdREbTW6p2pwWSVbHoM1EuQoIugJejkhBD2+habakMRJiD1VXKVqQg62Fn9KfffXO +iMQ6QrOR+ultqRDjAmMPgoLlOx/ojYvWUf2ehlUmmIuv4DJ6D1UCeGWZOjeDkIxeZrZ uvKGPUnZlQFJRHILVL7Ce4poeKFbNz7pS84qrDfKV8Ods5vUT8UYoFtHtYaLuCq6p1xX zvGUoaswywBvgUqFNm0Gp97Pnj8GAcFoyhfjOixkwx/K1pXIo6sYX6EaDdFyvahbR7BH ZdATlskltemADsD+a0J77WI1EZDs1WKtFC4lJy1U2gpxZYmreRHyfHD+0gypQe0p/pKg X3kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TOojfJNYHZUkexNwEj3TDMpLj9OGFgOTyXvU4UH9DYg=; b=0h5HSyuItcXAyt1D5bUbZu9oNYitW2Buiqi8G1m1xjGLT0qj95K1YI5NNb5en7Km8K j8/qkHSB9bG0q6BSBkwbSO2L5exhBl9WhU+Dp8aFPIOsxi1tZkPIOfVMkkBo0UyXcCy6 D5bSR4BB02XQmNzn+WmRqjSGwrlQ4UWofot3B6TOip30p1X9ZY97Ph/0mCL4E8JZHxyE 56j6jq+u2RI4V2kHD/NRW/WXmB4ShKmDjlzU1WFoq7vOcMKbMn62+IuOwnok08+OM2aL BEXGUF7y+lxFfdaqZ6QvLnpJHaQZsYe4qDhuwCFSeG+tFS0egpA31KAZuBa41LHZ0QYU QMUA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si37023168plb.346.2019.04.30.05.51.43; Tue, 30 Apr 2019 05:51:59 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727359AbfD3Mux (ORCPT + 99 others); Tue, 30 Apr 2019 08:50:53 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:50147 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726166AbfD3Mux (ORCPT ); Tue, 30 Apr 2019 08:50:53 -0400 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hLSDe-00022T-2M; Tue, 30 Apr 2019 14:50:46 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hLSDb-0001O9-43; Tue, 30 Apr 2019 14:50:43 +0200 Date: Tue, 30 Apr 2019 14:50:43 +0200 From: Sascha Hauer To: Chuanhua Han Cc: shawnguo@kernel.org, leoyang.li@nxp.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, festevam@gmail.com, linux-imx@nxp.com, wsa+renesas@sang-engineering.com, u.kleine-koenig@pengutronix.de, eha@deif.com, linux@rempel-privat.de, l.stach@pengutronix.de, peda@axentia.se, sumit.batra@nxp.com Subject: Re: [PATCH 1/2] i2c: imx: I2C Driver doesn't consider I2C_IPGCLK_SEL RCW bit when using ls1046a SoC Message-ID: <20190430125043.weqwzim4gpsvtkfe@pengutronix.de> References: <20190430044719.30720-1-chuanhua.han@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190430044719.30720-1-chuanhua.han@nxp.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 14:47:42 up 42 days, 23:58, 86 users, load average: 1.11, 1.13, 1.10 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 30, 2019 at 12:47:18PM +0800, Chuanhua Han wrote: > The current kernel driver does not consider I2C_IPGCLK_SEL (424 bit > of RCW) in deciding i2c_clk_rate in function i2c_imx_set_clk() > { 0 Platform clock/4, 1 Platform clock/2}. > > When using ls1046a SoC, this populates incorrect value in IBFD register > if I2C_IPGCLK_SEL = 0, which generates half of the desired Clock. > > Therefore, if ls1046a SoC is used, we need to set the i2c clock > according to the corresponding RCW. So the clock driver reports the wrong clock. Please fix the clock driver then. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |