Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6518974imu; Mon, 21 Jan 2019 10:16:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN7zVyy/YlxzAzC2QdP70zT3bcpTRhNBbWJAUmMXgQuWwk1rNbftaxIcLkk0qhVlBix7t1Pr X-Received: by 2002:a63:920a:: with SMTP id o10mr28332134pgd.141.1548094560572; Mon, 21 Jan 2019 10:16:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548094560; cv=none; d=google.com; s=arc-20160816; b=mQOmHj9maaw1xmDzQoOijS9Iv9+AeLG78uOyS61greMlM22rJwiAmrtcqChsPnVUQd 9/GYHlm9+dSKmwZCVjthrTLefTeJVrUsD+Gs/C3QJBgjx7awA0Wj1lx2AhbOrb/lY7rD gDcicWzKt0PhTHFAQf9m0WyBVL2j6wxWZEOc7SXHxqVZh5Rbc+1QujfCTlqW9jnRIliv ZbsVcpHt6Tqtpdp7zSdnGzehEPsS/vNh4acHMwwCPcB2EBSpylPAKWLvONktFbviL26r 14PciuiyDujm5JYkdgc6oG0Zbrnat3W2oIoG0f3njBpRCQrb+Bt4iPku5zq8Uo1ipWPE SR2g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:references:cc:to:subject:from :dkim-signature; bh=8XNrborbmkLyj7MOhD2bckHByezP7aYEcGysoydwhEo=; b=zK0eKd/RWpbGHDTHBG4pSWc/pQ+RCgHrpFep7K97OOCC+zN/Oeqq/ucvkCK5Op+pSJ j7Y24pIeIN9iH05dJPItRwdEfnCd34ZQYeSMTpaoRQ9uuBaQEtqWLsOhnO8f42aD+B6I zSq/HjqCvhRo2D6jKr2bjum1i4KspV4bBGoAMw61ZFGXjt4bnjiy+qw9VqfkWKN51VAK wLNbgg4xGSE1zQrTbch1eft9p0ScDZJjqNyduo+WgtLZuOwZ+B0eeDL6ZwPtg8muyA9K c9u+img2h15sCtCfR4zTXbvd1408NdX94Jh8OxjE+NSv/4WYWRCSg1GFbJs51CGBiyrC C0aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=NgRQ18NT; 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 u186si12936258pgd.131.2019.01.21.10.15.44; Mon, 21 Jan 2019 10:16:00 -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=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=NgRQ18NT; 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 S1727413AbfAUSOh (ORCPT + 99 others); Mon, 21 Jan 2019 13:14:37 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:37133 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbfAUSOh (ORCPT ); Mon, 21 Jan 2019 13:14:37 -0500 Received: by mail-lf1-f67.google.com with SMTP id y11so16187503lfj.4 for ; Mon, 21 Jan 2019 10:14:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8XNrborbmkLyj7MOhD2bckHByezP7aYEcGysoydwhEo=; b=NgRQ18NTRUyhLp3qzGxSMdowUrCdv51jK3ncUZ82RANd93NGMosdDlxxe0oBOxPGUm CgIqhboKV864ypRZCvt1xgtjbVNJhjBxgr6sEp+PjUSyI7MhFmzD3HY8TMLUeU0ZlVV8 +uA1g9TKoJ/G7BICzpzWweJL1T9oJ9mfEcpphwo3CCdrEP7mfR0N4XKxxJYWOmaLI5T5 JR97ecKaQVVvTJb1pLS4va2yr9cVZM6hAyNrFJldngCQr5F5s6rTj+6k/Zqa/GEpFNCt n6FaYGo0wLZyPT7BW4rOq+CXijlxHkxZctrG7wE/Jcfj5ooVCeOaJOy4zM9zBxhuJhzn 2HJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=8XNrborbmkLyj7MOhD2bckHByezP7aYEcGysoydwhEo=; b=MoD3mBIDIuBsHm6RrcbaLBR726USAeL87eJfIYGoHIpMBE/Dk7/fLbSxmK1la5PVou /2FRDF/+Mt/1eD1SjXzrt7IoPv1Kwc8/EP2HLA74JHNRKZhKHYv/67VoAQSYmYVNk1Wd PmoVHJDU+FBsh6mWIzl4DfTPbEeOHi+iSMBVtGiVYOLVFKHKlu5uYkKHs1XqhcqLPZz8 MbGxX5++S1hVguVboH3DvvS7G5ilgaqsHtTcZYpWLJU4eRZPtGcGgxh1H2UDeTSrka5s O30O6mZ/lWoS0zHkAeXlgBrjCoiLUdZ1Trr76bkdnh/wn0HjVf5GEvGdtzKjSvxnXUZ6 l+Ag== X-Gm-Message-State: AJcUukcKyt5kdXe0E4HXPCQick6hcAIMi+rNhLEr+hrvZOPGqw+fKMCU vMFCQ+4FJtCZwR7AiE6YigIOBQ== X-Received: by 2002:a19:5601:: with SMTP id k1mr17101442lfb.99.1548094475001; Mon, 21 Jan 2019 10:14:35 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.84.215]) by smtp.gmail.com with ESMTPSA id s3-v6sm2430201lje.73.2019.01.21.10.14.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 10:14:34 -0800 (PST) From: Sergei Shtylyov Subject: Re: [PATCH v6 1/2] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver To: masonccyang@mxic.com.tw Cc: bbrezillon@kernel.org, broonie@kernel.org, Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-spi@vger.kernel.org, marek.vasut@gmail.com, zhengxunli@mxic.com.tw References: <1547790855-22120-1-git-send-email-masonccyang@mxic.com.tw> <1547790855-22120-2-git-send-email-masonccyang@mxic.com.tw> Organization: Cogent Embedded Message-ID: <5440645d-6b52-ad72-1c98-2d140f1cd15d@cogentembedded.com> Date: Mon, 21 Jan 2019 21:14:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-MW Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 01/21/2019 06:34 AM, masonccyang@mxic.com.tw wrote: >> > +#define RPC_SMENR 0x0030 // R/W >> > +#define RPC_SMENR_CDB(o) (((o) & 0x2) << 30) >> > +#define RPC_SMENR_OCDB(o) (((o) & 0x2) << 28) >> > +#define RPC_SMENR_ADB(o) (((o) & 0x2) << 24) >> > +#define RPC_SMENR_OPDB(o) (((o) & 0x2) << 20) >> > +#define RPC_SMENR_SPIDB(o) (((o) & 0x2) << 16) >> >> Ugh, s/0x2/0x3/! :-/ >> >> [...] >> > +#define RPC_SMDRENR 0x0064 // R/W >> > +#define RPC_SMDRENR_HYPE (0x5 << 12) >> >> s/0x5/0x7/, and this is a field, not value. >> > > okay, both 0x2 and 0x5 are just make sure these registers was > writing a correct value rather than a prohibited value. > anyway, I will patch them. TIA. >> [...] >> > +static int rpc_spi_probe(struct platform_device *pdev) >> > +{ >> > + struct spi_controller *ctlr; >> > + struct resource *res; >> > + struct rpc_spi *rpc; >> > + const struct regmap_config *regmap_config; >> > + struct device_node *rpc_if; >> > + int ret; >> > + >> > + rpc_if = of_find_compatible_node(pdev->dev.of_node, NULL, >> > + "jedec,spi-nor"); >> >> I doubt that this is a correct function to check for the child node's >> "compatible" prop... You need of_get_next_child() or of_get_next_available_child(). >> >> [...] >> > + regmap_config = &rpc_spi_regmap_config; >> >> Doesn't look like this variable is needed... > > why ? Why not just use &rpc_spi_regmap_config below? >> > + rpc->regmap = devm_regmap_init_mmio(&pdev->dev, rpc->base, >> > + regmap_config); [...] > Mason MBR, Sergei