[U-Boot] [PATCH 00/12] cmd_sf: Add support for read and write instructions

Simon Glass sjg at chromium.org
Fri Jan 11 03:16:48 CET 2013


Hi Jagannadha,

On Mon, Dec 31, 2012 at 3:13 AM, Jagannadha Sutradharudu Teki
<jagannadh.teki at gmail.com> wrote:
> All these patches are added a support for read and write instruction
> for programming/reading SPI flash.
>

I think this is all great and very useful - since no one else has
commented I will have a try.

> Read and Write instruction are implemented as a command line
> arguments for 'sf write' , 'sf read' and 'sf update' commands.
>
> Currently I have added below instructions those are commonly available
> on all flash types.

Maybe you could use flags like -d for dual, -q for quad, -p for page,
-s for slow, -o for output only. So maybe:

-p > pp - Page Program (existing one)
-qp > qpp - Quad-input Page Program
<empty> > afr - Array Fast Read (existing one)
-s > asr - Array Slow Read
-do > dofr - Dual Output Fast Read
-qo > qofr - Quad Output Fast Read
-d > diofr - Dual IO Fast Read
-q > qiofr - Quad IO Fast Read

I worry that your scheme would be hard to remember.


>
> I have tested mostly of the instruction on real h/w.
>
> This entire implementation will change the current sf framework little bit but
> I thought these changes are worth to add.

Yes very much so.

>
> Request for all your comment, so-that I can move forward.
> Please let me know for any issue regarding this new implementation.

Regards,
Simon

>
> Thanks,
> Jagan.
>
> Jagannadha Sutradharudu Teki (12):
>   cmd_sf: Add wr_inst argument to 'sf write' command
>   cmd_sf: Add rd_inst argument to 'sf read' command
>   cmd_sf: Add wr_inst argument to 'sf update' command
>   cmd_sf: Add rd_inst argument to 'sf update' command
>   cmd_sf: Define a functions for parsing read and write instructions
>   cmd_sf: Add QPP(Quad-input Page Program) write instruction support
>   cmd_sf: Add ASR(Array Slow Read) read instruction support
>   cmd_sf: Add DOFR(Dual Output Fast Read) read instruction support
>   cmd_sf: Add QOFR(Quad Output Fast Read) read instruction support
>   cmd_sf: Add DIOFR(Dual IO Fast Read) read instruction support
>   cmd_sf: Add QIOFR(Quad IO Fast Read) read instruction support
>   sf: Pass rd_qeb_req variable as 0 for status and config reg reads
>
>  common/cmd_sf.c                      |  198 +++++++++++++++++++++++++++++-----
>  drivers/mtd/spi/spi_flash.c          |   40 +++++--
>  drivers/mtd/spi/spi_flash_internal.h |   10 +-
>  include/spi_flash.h                  |   22 ++--
>  include/spi_flash_inst.h             |   39 +++++++
>  5 files changed, 257 insertions(+), 52 deletions(-)
>  create mode 100644 include/spi_flash_inst.h
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list