[U-Boot] [PATCH v4 00/36] sf: Add common probe and extended/quad read/write cmds support

Jagannadha Sutradharudu Teki jagannadha.sutradharudu-teki at xilinx.com
Tue Sep 24 20:19:37 CEST 2013


This patch series is a combination of
"sf: Add common probe support"
"sf: Add support for extended/quad read and write commands"
http://www.mail-archive.com/u-boot@lists.denx.de/msg121668.html
http://u-boot.10912.n7.nabble.com/PATCH-v2-00-10-sf-Add-support-for-extended-quad-read-and-write-commands-td160964.html

This patch series adds common probe support for all flash vendors except ramtron.

spi_flash_probe is a new addition where all flash driver
probing is combined into a common file, this means spi_flash_probe.c
adds a new probing style common to all flashes.


Apart from common probing, this series also adds support for
extended read commands and quad read/write commands.

http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/150148
http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/167026

There is a bit discussion going on for supporting this: 
http://u-boot.10912.n7.nabble.com/PATCH-00-12-cmd-sf-Add-support-for-read-and-write-instructions-td143749.html

Concept: 
Initially I tried to add individual sf write/read commands to respective 
flash read/write commands, but later some discussion to mainline about this and 
changed the implementation. 

As Michal and me were trying to change this as like the 
"implementation will discover the fastest command by taking the supported 
commands from flash and a controller. Controller supported commands will always been a priority." 

Means I have added rd_cmd and wr_cmd params on spi_flash_id_params table. 
So the flash user may fill these with flash supported commands, and also spi controller 
use is also have rd_cmd and wr_cmd from spi.h, so the spi user will fill these with 
controller supported commands. and the resultent command is calculated based fastest 
commands by taking inputs from spi and flash, but spi(controller) has always a priority. 

Supported commands: 
- CMD_READ_ARRAY_SLOW 
- CMD_READ_ARRAY_FAST 
- CMD_READ_DUAL_OUTPUT_FAST 
- CMD_READ_DUAL_IO_FAST 
- CMD_READ_QUAD_OUTPUT_FAST 
- CMD_PAGE_PROGRAM 
- CMD_QUAD_PAGE_PROGRAM 

Testing repo branch:
-------------------
$ git clone git://git.denx.de/u-boot-spi.git
$ cd u-boot-spi
$ git checkout -b master-next-test origin/master-next-test

REQUEST FOR ALL SPI CODE CONTRIBUTORS/USERS, PLEASE TEST THESE CHANGES 
W.R.T YOUR HW IF POSSIBLE. 

Please let me know for any issues/concerns/questions. 

--
Thanks,
Jagan.

Jagannadha Sutradharudu Teki (36):
  sf: Divide spi_flash into multiple parts
  sf: probe: Add new spi_flash_probe support
  sf: probe: Add support for M25P* flash parts
  sf: probe: Add support for EN25Q* flash parts
  sf: probe: Add support for GD25* flash parts
  sf: probe: Add support for MX25L* flash parts
  sf: probe: Add support for W25* flash parts
  sf: probe: Add support for S25FL* flash parts
  sf: probe: Add support for SST25* flash parts
  sf: probe: Add support for AT45DB* flash parts
  sf: probe: Give proper spacing on flash table params
  sf: probe: Add support for SST_WP
  sf: probe: Add support to clear flash BP# bits
  sf: probe: Add support for erase sector selection flag
  sf: probe: Add support for flag status polling
  sf: probe: Move BAR config to spi_flash_validate_ids
  sf: Add proper comment style on spi_flash structure
  sf: ramtron: Add support for separate flash driver
  sf: Remove unneeded flash drivers files
  sf: probe: Add support for EN25Q64
  sf: probe: Add support for S25FL256S_256K
  sf: probe: Add support for S25FL512S_256K
  sf: probe: Use print_size arg as page_size
  sf: probe: Print erase_size while printing flash details
  sf: probe: Simply the BAR configuration logic
  sf: ops: Add static qualifier to spi_flash_cmd_bankaddr_write
  sf: probe: Add support for MX25L25635F
  sf: probe: Add support for MX25L51235F
  sf: Remove spi_flash_do_alloc references
  doc: SPI: Add status.txt for tracking SPI subsys status
  sf: Add extended read commands support
  sf: Add quad read/write commands support
  sf: ops: Add configuration register writing support
  sf: Set quad enable bit support
  sf: spi_flash cleanups
  spi: spi cleanups

 doc/SPI/status.txt                   |  28 ++
 drivers/mtd/spi/Makefile             |  15 +-
 drivers/mtd/spi/atmel.c              | 544 ---------------------------------
 drivers/mtd/spi/eon.c                |  60 ----
 drivers/mtd/spi/gigadevice.c         |  65 ----
 drivers/mtd/spi/macronix.c           |  98 ------
 drivers/mtd/spi/ramtron.c            | 123 +++++++-
 drivers/mtd/spi/spansion.c           | 141 ---------
 drivers/mtd/spi/spi_flash.c          | 571 +----------------------------------
 drivers/mtd/spi/spi_flash_internal.h | 151 ++++-----
 drivers/mtd/spi/spi_flash_ops.c      | 451 +++++++++++++++++++++++++++
 drivers/mtd/spi/spi_flash_probe.c    | 400 ++++++++++++++++++++++++
 drivers/mtd/spi/sst.c                | 238 ---------------
 drivers/mtd/spi/stmicro.c            | 202 -------------
 drivers/mtd/spi/winbond.c            | 141 ---------
 drivers/spi/spi.c                    |   3 +
 include/configs/top9000.h            |   1 -
 include/spi.h                        |  99 +++---
 include/spi_flash.h                  | 119 ++++----
 19 files changed, 1205 insertions(+), 2245 deletions(-)
 create mode 100644 doc/SPI/status.txt
 delete mode 100644 drivers/mtd/spi/atmel.c
 delete mode 100644 drivers/mtd/spi/eon.c
 delete mode 100644 drivers/mtd/spi/gigadevice.c
 delete mode 100644 drivers/mtd/spi/macronix.c
 delete mode 100644 drivers/mtd/spi/spansion.c
 create mode 100644 drivers/mtd/spi/spi_flash_ops.c
 create mode 100644 drivers/mtd/spi/spi_flash_probe.c
 delete mode 100644 drivers/mtd/spi/sst.c
 delete mode 100644 drivers/mtd/spi/stmicro.c
 delete mode 100644 drivers/mtd/spi/winbond.c

-- 
1.8.3




More information about the U-Boot mailing list