From patchwork Mon Jul 20 07:12:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 51268 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E56C7228F7 for ; Mon, 20 Jul 2015 07:12:45 +0000 (UTC) Received: by lbcjj5 with SMTP id jj5sf3617956lbc.1 for ; Mon, 20 Jul 2015 00:12:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=w4zliia+PMAi+oiV+rfCu4aPufs5qJsJJqLAaBUOQRw=; b=M5IHbbQSP04tAmXxFD70RFP3QHVXNq6spiSydIpC7+jLh94C3svUG+cPCi98XExgyC RMfDmqlWxM2g0UTZ/5ZMoyXibEUycXej2/PDogqxZ3OLOxLqZzdzDYfI4fLCfiolLNrb RXkUybb02XLmv0OwzQDX6dys+RCXGgkq2MjmZlPuVkGVe88lfukTyPfTLgDU+MKPGWRF JH5qu1+exbvkhJ5EGyK4MMAoG3RDFl9dapZSS9ZLvoVexhseM6kR+ndKCTqGzhrEt6c/ JcSTkO8nUhNoHpni7OxRnhclJtPAnJVfNW8kG0WJK2Ng3NCat1lOx8t5MwTPGDhLFope 9GJQ== X-Gm-Message-State: ALoCoQkJCLQJ24Y+Ny4iAXLOaRwHkQYMLVUQmWuJ5rGg9sUv3431T5YG3nLxCRyEzddg8bDlUHDf X-Received: by 10.180.216.12 with SMTP id om12mr5557325wic.1.1437376364876; Mon, 20 Jul 2015 00:12:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.67 with SMTP id q3ls677071laq.78.gmail; Mon, 20 Jul 2015 00:12:44 -0700 (PDT) X-Received: by 10.112.144.69 with SMTP id sk5mr26398256lbb.6.1437376364580; Mon, 20 Jul 2015 00:12:44 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id oq3si17139548lbb.125.2015.07.20.00.12.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jul 2015 00:12:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbyj8 with SMTP id yj8so89916358lbb.0 for ; Mon, 20 Jul 2015 00:12:44 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr26336744lbc.19.1437376364288; Mon, 20 Jul 2015 00:12:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp628184lba; Mon, 20 Jul 2015 00:12:43 -0700 (PDT) X-Received: by 10.107.162.142 with SMTP id l136mr30977806ioe.166.1437376362785; Mon, 20 Jul 2015 00:12:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gj3si33918345pac.14.2015.07.20.00.12.41; Mon, 20 Jul 2015 00:12:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755178AbbGTHMl (ORCPT + 8 others); Mon, 20 Jul 2015 03:12:41 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33088 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753896AbbGTHMk (ORCPT ); Mon, 20 Jul 2015 03:12:40 -0400 Received: by padck2 with SMTP id ck2so96904042pad.0 for ; Mon, 20 Jul 2015 00:12:39 -0700 (PDT) X-Received: by 10.66.66.173 with SMTP id g13mr57953583pat.155.1437376359487; Mon, 20 Jul 2015 00:12:39 -0700 (PDT) Received: from [192.168.0.102] ([202.62.77.106]) by smtp.googlemail.com with ESMTPSA id yd8sm4568517pab.46.2015.07.20.00.12.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jul 2015 00:12:38 -0700 (PDT) Message-ID: <55AC9F61.3090207@linaro.org> Date: Mon, 20 Jul 2015 12:42:33 +0530 From: Vaibhav Hiremath User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Robert Jarzmik CC: Wolfram Sang , linux-i2c@vger.kernel.org, robh+dt@kernel.org, yizhang@marvell.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH-v4 00/11] i2c: pxa: Fixes, cleanup and support for pxa910 family References: <1436859410-28878-1-git-send-email-vaibhav.hiremath@linaro.org> <20150714113436.GD1517@katana> <55A4F434.9080407@linaro.org> <87d1zqimyc.fsf@belgarion.home> <55AC9E05.7040308@linaro.org> <55AC9E8E.8080708@linaro.org> In-Reply-To: <55AC9E8E.8080708@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vaibhav.hiremath@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Monday 20 July 2015 12:39 PM, Vaibhav Hiremath wrote: > > > On Monday 20 July 2015 12:36 PM, Vaibhav Hiremath wrote: >> >> >> On Saturday 18 July 2015 01:19 AM, Robert Jarzmik wrote: >>> Vaibhav Hiremath writes: >>> >>>>> So, I applied patches 1-6 to for-next to make some progress. >>>>> >>>>> The others need more thought because of the bindings which shall be >>>>> discussed replying to the patches in question. >>>>> >>>>> Thanks for the updated work with lots of proper references. >>>>> >>>> >>>> OK, Thanks and no issues. >>>> >>>> Lets discuss more on the bindings. >>> >>> I made a simple try on my reference platform with the whole patchset. >>> It oopses on a NULL dereference. >>> >>> The stack is in [1]. >>> I think it boils down to : >>> - i2c_pxa_do_sclk_adj() >>> - reg_ilcr = readl(_ILCR(i2c)); >>> >>> I also think the faulty patch is : >>> - i2c: pxa: Add ILCR (tLow & tHigh) configuration support >>> >>> My case, an I2C master case, I'd like you to find the issue and fix it. >>> >> >> Which is this reference platform? >> Can you share few details - >> >> - reference Platform? >> - DT file if you could >> - Boot log (if you could) >> >> >> I am using pxa1928 based platform, and I do not see any issues. >> > > Having said that, > I see issues in the patch for non PXA910 platform, where > i2c_pxa_do_sclk_adj() will be called unconditionally and obviously > reg_ilcr and reg_wcr are not set. > > I will fix this and send the patch. > This should fix the issue - hvaibhav@hvaibhav-ThinkPad-T440p:~/projects/mainline/linux$ git diff drivers/i2c/busses/i2c-pxa.c If you are ok, I will re-spin the patch and submit. Thanks, Vaibhav --- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index e0aa087..9e372fc 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -590,6 +590,9 @@ static void i2c_pxa_do_sclk_adj(struct pxa_i2c *i2c) { unsigned int reg_ilcr; + if (!i2c->reg_ilcr) + return; + reg_ilcr = readl(_ILCR(i2c)); /* For standard/fast mode tlow and thigh counters are same */