Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1537107

[PATCH 0/2] mtd: spi-nor: add a stateless method to support memory size above 128Mib

From Cyrille Pitchen <cyrille.pitchen@atmel.com>
Newsgroups linux.kernel
Subject [PATCH 0/2] mtd: spi-nor: add a stateless method to support memory size above 128Mib
Date 2016-12-06 18:00 +0100
Message-ID <sLrfX-4AN-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi all,

this series of patches is based on next-20161206 and can also be applied
to the git://github.com/spi-nor/linux.git tree.
It has been extracted from the SFDP series and is resent as a standalone
series.

This series fixes compatibility issue between Linux and many bootloaders
when using SPI flash with size greater than 128Mib.

Indeed, before this series, Linux used to make the SPI flash memory enter
its 4-byte address mode when its size is greater than 128Mib: The very
same Fast Read 1-1-z op code is used, for instance Fast Read 1-1-4 (6Bh)
but once in 4-byte address mode, the SPI flash memory now expects a 4-byte
address following the op code instead of a 3-byte address.
This solution is statefull: it changes the internal state of the memory.

Hence, when the CPU is reset but not the memory, many bootloaders are not
aware of this internal state change at the memory side, don't know how to
handle this and still send one Fast Read op code followed by a 3-byte
address. So the bootloader fails to read data from the SPI flash memory.

Cyrille Pitchen (2):
  mtd: spi-nor: rename SPINOR_OP_* macros of the 4-byte address op codes
  mtd: spi-nor: add a stateless method to support memory size above
    128Mib

 drivers/mtd/devices/serial_flash_cmds.h |   7 --
 drivers/mtd/devices/st_spi_fsm.c        |  28 ++++----
 drivers/mtd/spi-nor/spi-nor.c           | 114 ++++++++++++++++++++++++++------
 drivers/spi/spi-bcm-qspi.c              |   6 +-
 include/linux/mtd/spi-nor.h             |  22 ++++--
 5 files changed, 126 insertions(+), 51 deletions(-)

-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] mtd: spi-nor: add a stateless method to support memory size above 128Mib Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-12-06 18:00 +0100
  [PATCH 1/2] mtd: spi-nor: rename SPINOR_OP_* macros of the 4-byte address op codes Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-12-06 18:00 +0100
    Re: [PATCH 1/2] mtd: spi-nor: rename SPINOR_OP_* macros of the  4-byte address op codes Mark Brown <broonie@kernel.org> - 2016-12-07 11:30 +0100
      Re: [PATCH 1/2] mtd: spi-nor: rename SPINOR_OP_* macros of the 4-byte  address op codes Marek Vasut <marek.vasut@gmail.com> - 2016-12-07 17:40 +0100
  [PATCH 2/2] mtd: spi-nor: add a stateless method to support memory size above 128Mib Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-12-06 18:00 +0100
    Re: [PATCH 2/2] mtd: spi-nor: add a stateless method to support  memory size above 128Mib Marek Vasut <marek.vasut@gmail.com> - 2016-12-07 17:30 +0100
      Re: [PATCH 2/2] mtd: spi-nor: add a stateless method to support  memory size above 128Mib Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-12-07 17:30 +0100
        Re: [PATCH 2/2] mtd: spi-nor: add a stateless method to support  memory size above 128Mib Marek Vasut <marek.vasut@gmail.com> - 2016-12-07 17:40 +0100
          Re: [PATCH 2/2] mtd: spi-nor: add a stateless method to support  memory size above 128Mib Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-12-07 18:10 +0100
            Re: [PATCH 2/2] mtd: spi-nor: add a stateless method to support  memory size above 128Mib Marek Vasut <marek.vasut@gmail.com> - 2016-12-08 05:20 +0100

csiph-web