All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] sf: Add auto detection of 4-byte mode (vs standard 3-byte mode)
Date: Fri, 26 Oct 2018 12:12:11 +0200	[thread overview]
Message-ID: <f18b2101-f978-52f2-1673-458697fb50f5@denx.de> (raw)
In-Reply-To: <AM4PR0401MB237276B557F77BD192EC52D99FF00@AM4PR0401MB2372.eurprd04.prod.outlook.com>

Hi Rajat,

On 26.10.18 11:59, Rajat Srivastava wrote:

<snip>

>>  From what I read, Rajat's method is to extend the controller driver to
>> support read SFDP and default to 4-byte mode if supported, or
>> overwritten by user's flag. Stefan's method is to read 4-byte status bit
>> and doesn't change controller driver.
>>
>> Is the default value of this 4-byte status bit valid and correct for all
>> cases?
>>
>> Rajat, without your patch set, does Stefan's solution work for your board?
>>
>> York
> 
> No. Stefan's changes are specific to his boards and is not
> applicable on ours.
> Stefan's patch is to support only certain flash that are factory
> strapped to work in 4-byte addressing modes only and will default
> to old method if such a flash is not found.

That is not 100% correct. The flash does not need to be "factory
strapped" to this 4-byte mode. It needs to be configured to this
4-byte mode. And this is also the case for example, when the ROM
bootloader configures the flash this way or a soft-reboot (without
hard flash chip reset) reboots into U-Boot after the flash was
configured to 4-byte mode in Linux.

And it supports multiple vendors and can easily be extended to
support more. The only thing needed is the detection of the
3-byte vs 4-byte address mode. But please note that it currently
does not actively switch from 3-byte to 4-byte mode. This could
be added though if needed / wanted.

> The flashes on our
> boards (and also other vendor's board) will not work with Stefan's
> patch.
> 
> My patch can handle flashes with address widths of 3-byte, 4-byte
> or both. It also takes a more generic path (as opposed to supporting
> only specific flash models) by parsing SFDP standard parameters and
> then deciding what address width is to be used.

I still don't see why each and every SPI controller driver
needs to be extended to support this SFDP parameter reading. Can't
this be handled by some generic (read common) code part in the
SPI flash infrastructure?

Thanks,
Stefan

  reply	other threads:[~2018-10-26 10:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 14:49 [U-Boot] [PATCH v3] sf: Add auto detection of 4-byte mode (vs standard 3-byte mode) Stefan Roese
2018-10-25 15:49 ` York Sun
2018-10-25 15:59   ` Stefan Roese
2018-10-25 16:10     ` York Sun
2018-10-26  9:59   ` Rajat Srivastava
2018-10-26 10:12     ` Stefan Roese [this message]
2018-10-26 10:36       ` Rajat Srivastava
2018-10-26 15:11         ` York Sun
2018-10-17 11:52 Rajat Srivastava
2018-10-22  7:14 ` Stefan Roese
2018-10-23  5:17   ` Rajat Srivastava
2018-10-23 17:00     ` Stefan Roese
2018-10-25  9:28       ` Rajat Srivastava
2018-10-25 15:49         ` Stefan Roese
2018-10-26 10:03         ` Rajat Srivastava

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=f18b2101-f978-52f2-1673-458697fb50f5@denx.de \
    --to=sr@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.