linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vignesh Raghavendra <vigneshr@ti.com>
To: Naga Sureshkumar Relli <nagasure@xilinx.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"bbrezillon@kernel.org" <bbrezillon@kernel.org>
Cc: "richard@nod.at" <richard@nod.at>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"nagasuresh12@gmail.com" <nagasuresh12@gmail.com>,
	Michal Simek <michals@xilinx.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>
Subject: Re: [RFC PATCH 2/2] spi: spi-mem: Add support for Zynq QSPI controller
Date: Tue, 12 Mar 2019 22:36:43 +0530	[thread overview]
Message-ID: <1f4df1cc-7a2f-1601-0553-1db5d69b492d@ti.com> (raw)
In-Reply-To: <MWHPR02MB262362EC0116C64B84874740AF480@MWHPR02MB2623.namprd02.prod.outlook.com>

Hi,

On 11/03/19 10:02 AM, Naga Sureshkumar Relli wrote:
> Hi Vignesh,
> 
>> -----Original Message-----
>> From: linux-spi-owner@vger.kernel.org <linux-spi-owner@vger.kernel.org> On Behalf Of
>> Vignesh Raghavendra
>> Sent: Friday, March 8, 2019 10:20 AM
>> To: Naga Sureshkumar Relli <nagasure@xilinx.com>; broonie@kernel.org;
>> bbrezillon@kernel.org
>> Cc: linux-spi@vger.kernel.org; dwmw2@infradead.org; marek.vasut@gmail.com;
>> richard@nod.at; linux-mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Michal Simek
>> <michals@xilinx.com>; nagasuresh12@gmail.com
>> Subject: Re: [RFC PATCH 2/2] spi: spi-mem: Add support for Zynq QSPI controller
>>
>>
>>
>> On 01/03/19 4:32 PM, Naga Sureshkumar Relli wrote:
>>>>> +static bool zynq_qspi_supports_op(struct spi_mem *mem,
>>>>> +				  const struct spi_mem_op *op)
>>>>> +{
>>>>> +	int ret;
>>>>> +
>>>>> +	ret = zynq_qspi_check_buswidth(op->cmd.buswidth);
>>>>> +
>>>>> +	if (op->addr.nbytes)
>>>>> +		ret |= zynq_qspi_check_buswidth(op->addr.buswidth);
>>>>> +
>>>>> +	if (op->dummy.nbytes)
>>>>> +		ret |= zynq_qspi_check_buswidth(op->dummy.buswidth);
>>>>> +
>>>>> +	if (op->data.nbytes)
>>>>> +		ret |= zynq_qspi_check_buswidth(op->data.buswidth);
>>>>> +
>>>>> +	if (ret)
>>>>> +		return false;
>>>>> +
>>>> spi_mem_default_supports_op() already has this code.
>>>> Could you change, spi_mem_supports_op() to call
>>>> spi_mem_default_supports_op() first before controller specific
>>>> ->supports_op()? So that, above code can be dropped.
>>> Ok, I will update it.
>>>>> +	/*
>>>>> +	 * The number of address bytes should be equal to or less than 3 bytes.
>>>>> +	 */
>>>>> +	if (op->addr.nbytes > 3)
>>>>> +		return false;
>>>>> +
>>>> Hmm, how does the driver handle flash devices >16MB in size? Not supported?
>>> Zynq QSPI controller doesn't support 4 byte addressing.
>>> So to support > 16MB size, we have to use EAR(extended address register).
>>> As it is initial version of driver, I haven't added this code. This needs to be added in spi-nor.c.
>>> Previously I have sent an RFC patch to support all these.
>>> But Boris suggested to upstream the basic one first under spi-mem frame work.
>>> Not only this support, there are other features like dual parallel and dual stacked.
>>> All these features require additional support from spi-nor framework.
>>> We have another QSPI controller on ZynqMP SOC, which is also similar(but it supports
>> 4Byte addressing).
>>> So by consolidating all these, I sent this patch.
>>>
>>> Please let me know your suggestion on this.
>>
>> Sounds fine to me. Support for > 16MB flash using EAR can come later.
> Thanks.
> Shall I wait for others to review or go ahead by addressing your previous comments?
> 

Typically, for a new driver, I would wait at least 2 weeks from date of
posting so that other reviewers have sufficient time to look into the patch.


-- 
Regards
Vignesh

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2019-03-12 17:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  7:02 [RFC PATCH 2/2] spi: spi-mem: Add support for Zynq QSPI controller Naga Sureshkumar Relli
2019-03-01 10:11 ` Vignesh Raghavendra
2019-03-01 11:02   ` Naga Sureshkumar Relli
2019-03-08  4:50     ` Vignesh Raghavendra
2019-03-11  4:32       ` Naga Sureshkumar Relli
2019-03-12 17:06         ` Vignesh Raghavendra [this message]
2019-03-13  8:52 ` Paul Kocialkowski
2019-03-13  9:53   ` Naga Sureshkumar Relli
2019-03-20 17:11 ` Vignesh Raghavendra
2019-03-21 11:00   ` Naga Sureshkumar Relli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f4df1cc-7a2f-1601-0553-1db5d69b492d@ti.com \
    --to=vigneshr@ti.com \
    --cc=bbrezillon@kernel.org \
    --cc=broonie@kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=michals@xilinx.com \
    --cc=nagasure@xilinx.com \
    --cc=nagasuresh12@gmail.com \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).