public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: R, Vignesh <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] spi: ti_qspi: Fix failure on multiple READ_ID cmd
Date: Mon, 11 Jul 2016 22:09:45 +0530	[thread overview]
Message-ID: <5783CBD1.9000306@ti.com> (raw)
In-Reply-To: <CAD6G_RQqNS=1f2Zg=rhfm5OqNzUwEeVKj68xyeJe0mHDSm9JYA@mail.gmail.com>



On 7/11/2016 12:05 PM, Jagan Teki wrote:
> On 11 July 2016 at 11:00, Vignesh R <vigneshr@ti.com> wrote:
>> Populating QSPI_RD_SNGL bit(0x1) in priv->cmd means that value
>> QSPI_INVAL (0x4) is not written to CMD field of QSPI_SPI_CMD_REG in
>> ti_qspi_cs_deactivate(). Therefore CS is never deactivated between
>> successive READ ID which results in sf probe to fail.
>> Fix this by not populating priv->cmd with QSPI_RD_SNGL and OR it wih
>> priv->cmd as required (similar to the convention followed in the
>> driver).
>>
>> Signed-off-by: Vignesh R <vigneshr@ti.com>
>> ---
>>  drivers/spi/ti_qspi.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
>> index 9a372ad31dae..376fe378ed63 100644
>> --- a/drivers/spi/ti_qspi.c
>> +++ b/drivers/spi/ti_qspi.c
>> @@ -247,13 +247,12 @@ static int __ti_qspi_xfer(struct ti_qspi_priv *priv, unsigned int bitlen,
>>                         debug("tx done, status %08x\n", status);
>>                 }
>>                 if (rxp) {
>> -                       priv->cmd |= QSPI_RD_SNGL;
>>                         debug("rx cmd %08x dc %08x\n",
>>                               priv->cmd, priv->dc);
> 
> | QSPI_RD_SNGL on debug statement as well.

Thanks, will fix this in v2.

> 
>>                         #ifdef CONFIG_DRA7XX
>>                                 udelay(500);
>>                         #endif
> 
> Can't we fix this delay, still need?

The patch that added this delay ( b545a98f5dc563 spi: ti_qspi: Add delay
for successful bulk erase) says its added to meet bulk erase timing
constraints (AFAIK, I believe bulk erase is same as chip erase which is
not supported by sf erase but may be supported in future). I will
experiment a bit and convince myself whether this delay is really
applicable or not.

Regards
Vignesh

      reply	other threads:[~2016-07-11 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11  5:30 [U-Boot] [PATCH 1/2] spi: ti_qspi: Fix failure on multiple READ_ID cmd Vignesh R
2016-07-11  5:30 ` [U-Boot] [PATCH 2/2] spi: ti_qspi: Fix compiler warning when DEBUG macro is set Vignesh R
2016-07-11  6:35 ` [U-Boot] [PATCH 1/2] spi: ti_qspi: Fix failure on multiple READ_ID cmd Jagan Teki
2016-07-11 16:39   ` R, Vignesh [this message]

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=5783CBD1.9000306@ti.com \
    --to=vigneshr@ti.com \
    --cc=u-boot@lists.denx.de \
    /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