spi, sf: add mtdparts feature to spi and sf commands
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest posting 3/30 of 4 patches 0 repliesNew
- v6 posting 2/30 of 4 patches 0 repliesSuperseded
- v6 posting 1/34 patches 0 repliesSuperseded
Earlier versions · 7
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 3 patches | 0 replies | Superseded | |
| v4 | 3 patches | 0 replies | Superseded | |
| v3 posting 3/3 | 0 of 3 patches | 0 replies | Superseded | |
| v3 posting 2/3 | 0 of 3 patches | 0 replies | Superseded | |
| v3 posting 1/3 | 3 patches | 0 replies | Superseded | |
| v2 | 3 patches | 0 replies | Superseded | |
| v1 | 3 patches | 0 replies | Superseded |
Patches in v6 posting 3/3 No applies recorded yet
None of the 4 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [U-Boot] [PATCH v6 0/4] spi, sf: add mtdparts feature to spi and sf commands
Hello Jagan,
Am 11.05.2015 08:01, schrieb Jagan Teki:
Quoted 147 lines · Heiko Schocher
Quoted 146 lines
Hello Jagan,
Am 27.04.2015 07:42, schrieb Heiko Schocher:
Quoted 140 lines
This patchserie add the popssibility to define mtd partitions on spi nor flash, and use this settings with the sf commands.
steps:
- add MTD layer driver for spi, original patch from:
http://git.denx.de/?p=u-boot/u-boot-mips.git;a=commitdiff;h=bb246819cdc90493dd7089eaa51b9e639765cced
and addapted it to current mainline.
- move common functions to get offset and size from cmdline nand command to extract offset and size from a mtd partition to common place "
drivers/mtd/mtd_uboot.c" maybe another place is better?- add to the sf command the possibility to use offset and size from the settings in mtdparts
With this patchset, the sf command looks now:
=> sf
sf - SPI flash sub-systemUsage:
sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus
and chip select
sf read addr offset|partition len - read `len' bytes starting at
offset' to memory ataddr'
sf write addr offset|partition len - write `len' bytes from memory
ataddr' to flash atoffset'
sf erase offset|partition [+]len - eraselen' bytes fromoffset'
+len' round uplen' to block
size
sf update addr offset|partition len - erase and write `len' bytes from
memory
ataddr' to flash atoffset'
=>
for example "env" is defined in mtdparts:=> sf read 13000000 env
device 0 offset0xd0000, size0x10000
SF: 65536 bytes @0xd0000Read: OK
=>There are the followings checkpatch warnings:
CHECK: Alignment should match open parenthesis
(quoted diff) +2
-0+ if (arg_off(argv[2], &idx, &addr, &maxsize, &maxsize, + MTD_DEV_TYPE_NAND, nand_info[idx].size)) {CHECK: Alignment should match open parenthesis
(quoted diff) +2
-0+ if (arg_off(argv[3], &dev, &off, &size, &maxsize, + MTD_DEV_TYPE_NAND, nand_info[dev].size))CHECK: Alignment should match open parenthesis
+ if (arg_off_size(argc - 3, argv + 3, &dev, &off,
&size,
+ &maxsize,MTD_DEV_TYPE_NAND,total: 0 errors, 0 warnings, 3 checks, 361 lines checked
NOTE: Ignored message types:
COMPLEX_MACROCONSIDER_KSTRTOMINMAXMULTISTATEMENT_MACRO_USE_DO_WHILENETWORKING_BLOCK_COMMENT_STYLEUSLEEP_RANGE
20140714_ml_mtdparts/0002-mtd-nand-move-common-functions-from-cmd_nand.c-to-co.patchhas style problems, please review.I see not, why this warning pops up ...
resend rebased version of this series, as v3 is pending since September 2014...
Changes in v6:
- add comments from Jagan Teki:
new patch in this patchserie, extract this piece of code into a new patch.Changes in v2:
- add comment from Daniel Schwierzeck:
fix compile error from original patch with "static inline" rather than "static__maybe_unused"
Changes in v3:
- rebase withd6c1ffc7d23f4fe4ae8c91101861055b8e1501b6
- add comments from scott wood:
- alignMTD_DEV_TYPE_NANDcorrect
- remove unnecessary inline
- rework "jffs2 header" problem later
Changes in v4:
- rebased against385a08a60f042061b004642d6b9bb6cfb794ad5aChanges in v5:
- add comment from Scott Wood:
keep the continuation line aligned with the argumentsChanges in v6:
- add comments from Jagan Teki:
move code, which checks if flash pointer is used
into a new patch.
- use #ifdef in Code
- call mtd register before thespi_release_bus
- add Reviewed-by: Jagannadha Sutradharudu Teki <[email protected]>
- fix Tom Rinis mail addr
- add comment from Scott Wood:
- fix indentation level
- addmtd_prefix
- move str2off and str2long into common place, as they are no mtd specific functions and change return value from int to bool
- add comment from Jagan Teki:
- append help text
- add Reviewed-by from Jagannadha Sutradharudu TekiDaniel Schwierzeck (1):
mtd, spi: add MTD layer driverHeiko Schocher (3):
mtd, nand: move common functions fromcmd_nand.cto common place spi, sf: use offset and size in sf cmd from mtdpartition mtd, spi: check if flash pointer is usedREADME | 3 + common/cmd_nand.c | 148 +++++++++--------------------------------- common/cmd_onenand.c | 19 ++---- common/cmd_sf.c | 61 +++++++++-------- common/cmd_test.c | 12 +--- drivers/mtd/Makefile | 4 +- drivers/mtd/mtd_uboot.c | 99 ++++++++++++++++++++++++++++ drivers/mtd/spi/Makefile | 1 + drivers/mtd/spi/sf_internal.h | 5 ++ drivers/mtd/spi/sf_mtd.c | 104 +++++++++++++++++++++++++++++ drivers/mtd/spi/sf_probe.c | 10 +-- include/linux/mtd/mtd.h | 5 ++ include/vsprintf.h | 2 + lib/vsprintf.c | 16 +++++ 14 files changed, 317 insertions(+), 172 deletions(-)create mode 100644
drivers/mtd/mtd_uboot.c
create mode 100644drivers/mtd/spi/sf_mtd.c
Quoted 7 lines
Quoted 3 lines
I got no more comment for this v6. Are there any more issues? If not I vote for apllying it soon, so we have some tests before the next release... thanks!
Let me give some more time I will test and see any final comments.
I will pick this series, once all fine.
ping?
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany