Re: [U-Boot] [PATCH v4 00/27] SPI-NAND support

2018-07-31 Thread Miquel Raynal
Hi Jagan, Stefan Roese wrote on Tue, 31 Jul 2018 07:50:54 +0200: > Hi Jagan, > > On 31.07.2018 07:36, Jagan Teki wrote: > > > > Acked--by: Jagan Teki > > >>> > >>> Thanks! > >>> > Can you rebase on master and send the needed patches or whole? Look > like some changes

[U-Boot] [PATCH v5 22/27] cmd: mtdparts: accept spi-nand devices

2018-07-30 Thread Miquel Raynal
Let spi-nand devices be recognized by mtdparts. This is superfluous but a full mtdparts rework would be very time-consuming. Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- cmd/mtdparts.c | 13 - include/jffs2/load_kernel.h | 7 +-- 2 files changed, 13

[U-Boot] [PATCH v5 21/27] cmd: ubi: delete useless and misleading definitions

2018-07-30 Thread Miquel Raynal
These definitions are simply not used and are misleading because similar definitions exist in jffs2/load_kernel.h and are used widely to define MTD device types (which is, by the way, totally redundant with what the MTD core does). Remove these definitions. Signed-off-by: Miquel Raynal --- cmd

[U-Boot] [PATCH v5 25/27] mtd: uclass: add probe function

2018-07-30 Thread Miquel Raynal
The user might want to trigger the probe of any MTD device, export these functions so they can be called from a command source file. Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- drivers/mtd/mtd-uclass.c | 9 + include/linux/mtd/mtd.h | 3 +++ 2 files changed, 12 insertions

[U-Boot] [PATCH v5 18/27] mtd: spinand: Add initial support for the MX35LF2GE4AB chip

2018-07-30 Thread Miquel Raynal
Add support for the MX35LF2GE4AB chip, which is similar to its cousin MX35LF1GE4AB, with two planes instead of one. Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- drivers/mtd/nand/spi/macronix.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a

[U-Boot] [PATCH v5 27/27] cmd: mtdparts: try to probe the MTD devices as a fallback

2018-07-30 Thread Miquel Raynal
Current implementation of mtdparts command errors out if the desired MTD device is not found. Fallback to the new probe function in this case before erroring out. This will the save the user the need to call something like 'mtd list' before mtdparts. Signed-off-by: Miquel Raynal Acked

[U-Boot] [PATCH v5 23/27] cmd: mtdparts: add a generic 'mtdparts' parser

2018-07-30 Thread Miquel Raynal
allocate an mtd_partition array for each successful call. This array must be freed after use by the caller. The given 'mtdparts' buffer pointer will be moved forward to the next MTD device (if any, it will point towards a '\0' character otherwise). Signed-off-by: Miquel Raynal

[U-Boot] [PATCH v5 24/27] cmd: mtdparts: remove useless 'mtdparts=' prefix

2018-07-30 Thread Miquel Raynal
All U-Boot users must define the mtdparts environment variable with: setenv mtdparts mtdparts=... This is a pure software limitation and is a complete non-sense. Remove this limitation but keep the backward compatibility. Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- cmd/mtdparts.c

[U-Boot] [PATCH v5 26/27] cmd: mtd: add 'mtd' command

2018-07-30 Thread Miquel Raynal
There should not be a 'nand' command, a 'sf' command and certainly not another 'spi-nand'. Write a 'mtd' command instead to manage all MTD devices at once. This should be the preferred way to access any MTD device. Signed-off-by: Miquel Raynal

[U-Boot] [PATCH v5 13/27] spi: Extend the core to ease integration of SPI memory controllers

2018-07-30 Thread Miquel Raynal
general. This is an attempt at defining a SPI memory interface which works for all kinds of SPI memories (NORs, NANDs, SRAMs). Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- drivers/spi/Kconfig | 7 + drivers/spi/Makefile | 1 + drivers/spi/spi-mem.c

[U-Boot] [PATCH v5 12/27] mtd: nand: Pass mode information to nand_page_io_req

2018-07-30 Thread Miquel Raynal
Brezillon Signed-off-by: Miquel Raynal --- include/linux/mtd/nand.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index ada7af4a41..13e8dd1103 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -86,6 +86,7 @@ struct

[U-Boot] [PATCH v5 20/27] mtd: declare MTD_PARTITIONS symbol in Kconfig

2018-07-30 Thread Miquel Raynal
-off-by: Miquel Raynal --- drivers/mtd/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 9341d518f3..d98457e223 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -1,5 +1,8 @@ menu "MTD Support" +config MTD_

[U-Boot] [PATCH v5 15/27] mtd: spinand: Add initial support for Micron MT29F2G01ABAGD

2018-07-30 Thread Miquel Raynal
From: Peter Pan Add a basic driver for Micron SPI NANDs. Only one device is supported right now, but the driver will be extended to support more devices afterwards. Signed-off-by: Peter Pan Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- drivers/mtd

[U-Boot] [PATCH v5 17/27] mtd: spinand: Add initial support for the MX35LF1GE4AB chip

2018-07-30 Thread Miquel Raynal
From: Boris Brezillon Add minimal support for the MX35LF1GE4AB SPI NAND chip. Signed-off-by: Boris Brezillon Acked-by: Jagan Teki --- drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c | 1 + drivers/mtd/nand/spi/macronix.c | 138 ++

[U-Boot] [PATCH v5 19/27] dt-bindings: Add bindings for SPI NAND devices

2018-07-30 Thread Miquel Raynal
From: Boris Brezillon Add bindings for SPI NAND chips. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- doc/device-tree-bindings/mtd/spi-nand.txt | 5 + 1 file changed, 5 insertions(+) create mode 100644 doc/device-tree-bindings/mtd/spi-nand.txt

[U-Boot] [PATCH v5 14/27] mtd: nand: Add core infrastructure to support SPI NANDs

2018-07-30 Thread Miquel Raynal
: Miquel Raynal Acked-by: Jagan Teki --- drivers/mtd/nand/Kconfig |2 + drivers/mtd/nand/Makefile |1 + drivers/mtd/nand/spi/Kconfig |7 + drivers/mtd/nand/spi/Makefile |4 + drivers/mtd/nand/spi/core.c | 1235 + include/linux/mtd

[U-Boot] [PATCH v5 09/27] mtd: move NAND files into a raw/ subdirectory

2018-07-30 Thread Miquel Raynal
NAND flavors, like serial and parallel, have a lot in common and would benefit to share code. Let's move raw (parallel) NAND specific code in a raw/ subdirectory, to ease the addition of a core file in nand/ and the introduction of a spi/ subdirectory specific to SPI NANDs. Signed-off-by: M

[U-Boot] [PATCH v5 10/27] mtd: rename nand into rawnand in Kconfig prompt

2018-07-30 Thread Miquel Raynal
Sync the Kconfig raw NAND entry title with the code architecture. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/raw/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index 1e4ea7bdd4..008f7b4b4b 100644

[U-Boot] [PATCH v5 11/27] mtd: nand: Add core infrastructure to deal with NAND devices

2018-07-30 Thread Miquel Raynal
From: Boris Brezillon Add an intermediate layer to abstract NAND device interface so that some logic can be shared between SPI NANDs, parallel/raw NANDs, OneNANDs, ... Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- drivers/mtd/nand/Kconfig | 3

[U-Boot] [PATCH v5 16/27] mtd: spinand: Add initial support for Winbond W25M02GV

2018-07-30 Thread Miquel Raynal
From: Frieder Schrempf Add support for the W25M02GV chip. Signed-off-by: Frieder Schrempf Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Acked-by: Jagan Teki --- drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c| 1 + drivers/mtd/nand/spi/winbond.c

[U-Boot] [PATCH v5 04/27] mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing

2018-07-30 Thread Miquel Raynal
eady a fallback on the _oob variant if the former is used. Signed-off-by: Miquel Raynal --- drivers/mtd/mtdcore.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 9a3efe95df..fb1d68d5e2 100644

[U-Boot] [PATCH v5 08/27] mtd: move all flash categories inside MTD submenu

2018-07-30 Thread Miquel Raynal
There is no reason to have NAND, SPI flashes and UBI sections outside of the MTD submenu in Kconfig. Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- drivers/mtd/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig

[U-Boot] [PATCH v5 05/27] mtd: add get/set of_node/flash_node helpers

2018-07-30 Thread Miquel Raynal
Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- include/linux/mtd/mtd.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index eb39f38887..ea659c354b 100644 --- a/include/linux/mtd/mtd.h +++ b/

[U-Boot] [PATCH v5 07/27] mtd: move definitions to enlarge their range

2018-07-30 Thread Miquel Raynal
Some helpers might be useful in a future 'mtd' U-Boot command to parse MTD device list. Signed-off-by: Miquel Raynal --- drivers/mtd/mtdcore.h | 6 -- include/linux/mtd/mtd.h | 6 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/mtdcore.h b/d

[U-Boot] [PATCH v5 06/27] mtd: fix build issue with includes

2018-07-30 Thread Miquel Raynal
Fix build errors produced by mtd.h and dm/device.h if not included in the right order. Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- include/linux/mtd/mtd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index ea659c354b

[U-Boot] [PATCH v5 01/27] mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing

2018-07-30 Thread Miquel Raynal
Brian Norris Reviewed-by: Miquel Raynal Tested-by: Ladislav Michl Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- drivers/mtd/mtdcore.c | 31 ++-- drivers/mtd/mtdpart.c | 6 ++-- drivers/mtd/nand/nand_base.c

[U-Boot] [PATCH v5 03/27] mtd: Add sanity checks in mtd_write/read_oob()

2018-07-30 Thread Miquel Raynal
gic. Do general sanity checks, like ops fields consistency and range checking. Signed-off-by: Boris Brezillon Cc: Peter Pan Signed-off-by: Richard Weinberger [Miquel: squashed the fix about the chip's size check] Signed-off-by: Miquel Raynal --- drivers/mtd/m

[U-Boot] [PATCH v5 02/27] mtd: Uninline mtd_write_oob and move it to mtdcore.c

2018-07-30 Thread Miquel Raynal
From: Ezequiel Garcia There's no reason for having mtd_write_oob inlined in mtd.h header. Move it to mtdcore.c where it belongs. Signed-off-by: Ezequiel Garcia Acked-by: Boris Brezillon Signed-off-by: Jacek Anaszewski Signed-off-by: Miquel Raynal --- drivers/mtd/mtdcore.c

[U-Boot] [PATCH v5 00/27] SPI-NAND support

2018-07-30 Thread Miquel Raynal
n of SPI memory controllers mtd: spinand: Add initial support for the MX35LF1GE4AB chip dt-bindings: Add bindings for SPI NAND devices Brian Norris (1): mtd: add get/set of_node/flash_node helpers Ezequiel Garcia (1): mtd: Uninline mtd_write_oob and move it to mtdcore.c Frieder Schremp

Re: [U-Boot] [PATCH v4 00/27] SPI-NAND support

2018-07-30 Thread Miquel Raynal
Hi Stefan, Tom, Stefan Roese wrote on Mon, 30 Jul 2018 17:11:49 +0200: > Hi Miquel, > Hi Jagan, > > On 26.07.2018 09:29, Miquel Raynal wrote: > > Hi Jagan, > > > Jagan Teki wrote on Thu, 26 Jul 2018 > > 11:00:56 +0530: > > >> On Fri, Jul 13,

Re: [U-Boot] [PATCH v4 00/27] SPI-NAND support

2018-07-26 Thread Miquel Raynal
Hi Jagan, Jagan Teki wrote on Thu, 26 Jul 2018 11:00:56 +0530: > On Fri, Jul 13, 2018 at 6:01 PM, Miquel Raynal > wrote: > > During the last months, Boris Brezillon shared his work to support > > serial flashes within Linux. First, he delivered (and merged) a new > >

[U-Boot] [PATCH v2 6/7] tpm: make TPM_V2 be compiled by default

2018-07-19 Thread Miquel Raynal
TPM_V1 was already compiled by default. Now that both can be compiled at the same time, compiled them both by default. Signed-off-by: Miquel Raynal Reviewed-by: Simon Glass --- drivers/tpm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tpm/Kconfig b/drivers/tpm/Kconfig

[U-Boot] [PATCH v2 5/7] test/py: tpm2: switch from 'tpm' to 'tpm2' command

2018-07-19 Thread Miquel Raynal
this test suite always use the right one. Signed-off-by: Miquel Raynal Reviewed-by: Simon Glass --- test/py/tests/test_tpm2.py | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py index

[U-Boot] [PATCH v2 4/7] tpm: allow TPM v1 and v2 to be compiled at the same time

2018-07-19 Thread Miquel Raynal
27;tpm'. The command set can also be changed at runtime (not supported yet, but ready to be), but as one can compile only either one stack or the other, there is still one spot in the code where conditionals are used: to retrieve the v1 or v2 command set. Signed-off-by: Mique

[U-Boot] [PATCH v2 7/7] sandbox: compile both TPM stack versions and drivers

2018-07-19 Thread Miquel Raynal
Now that TPMv1 and TPMv2 can be compiled at the same time, let's compile them both with Sandbox as well as both drivers (and, it is already implied in Kconfig: both commands). Signed-off-by: Miquel Raynal Reviewed-by: Simon Glass --- configs/sandbox_defconfig | 3 +++ 1 file chang

[U-Boot] [PATCH v2 1/7] tpm: fix typo in kernel doc

2018-07-19 Thread Miquel Raynal
The udevice given to the open() function of course must be opened, not closed. Signed-off-by: Miquel Raynal Reviewed-by: Simon Glass --- include/tpm-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tpm-common.h b/include/tpm-common.h index 734c2c9d53

[U-Boot] [PATCH v2 3/7] tpm: remove stale symbol in Kconfig

2018-07-19 Thread Miquel Raynal
The TPM_DRIVER_SELECTED symbol was used in one of the initial series about TPMv2 but its use has been dropped, making these selects useless, remove them. Signed-off-by: Miquel Raynal --- drivers/tpm/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tpm/Kconfig b/drivers/tpm

[U-Boot] [PATCH v2 2/7] tpm: compile Sandbox driver by default

2018-07-19 Thread Miquel Raynal
When Sandbox and the TPM stack are both selected, compile Sandbox TPM driver by default. Signed-off-by: Miquel Raynal Reviewed-by: Simon Glass --- drivers/tpm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tpm/Kconfig b/drivers/tpm/Kconfig index 93264ddd34..5e3fb3267f

[U-Boot] [PATCH v2 0/7] Allow both TPM stacks to be compiled at the same time

2018-07-19 Thread Miquel Raynal
ved the TPM stack version selection in the probe, removed the ->set_version() helper. Miquel Raynal (7): tpm: fix typo in kernel doc tpm: compile Sandbox driver by default tpm: remove stale symbol in Kconfig tpm: allow TPM v1 and v2 to be compiled at the same time test/py: tpm2: switch

Re: [U-Boot] [PATCH 3/6] tpm: allow TPM v1 and v2 to be compiled at the same time

2018-07-19 Thread Miquel Raynal
Hi Simon, Simon Glass wrote on Wed, 18 Jul 2018 19:31:41 -0600: > Hi Miquel, > > On 14 July 2018 at 06:16, Miquel Raynal wrote: > > While there is probably no reason to do so in a real life situation, it > > will allow to compile test both stacks with the same sandbox def

Re: [U-Boot] tpm TIS TPMv2.0

2018-07-14 Thread Miquel Raynal
Hi Martin, "Hecht, Martin (Avnet Silica)" wrote on Sat, 14 Jul 2018 13:04:26 +: > Hi Miquel, > > I'm busy on that again hopefully end of next week. I was bound in other > projects too. So you didn't miss anything. I come back on you soon. > By the way allow me one question please. Would yo

[U-Boot] [PATCH] mtd: remove stale comment in mtd_oob_ops structure

2018-07-14 Thread Miquel Raynal
, this implementation called by mtd->_write_oob() simply loops over the pages until everything has been written. Signed-off-by: Miquel Raynal --- include/linux/mtd/mtd.h | 4 1 file changed, 4 deletions(-) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 0c41140

[U-Boot] [PATCH 4/6] test/py: tpm2: switch from 'tpm' to 'tpm2' command

2018-07-14 Thread Miquel Raynal
this test suite always use the right one. Signed-off-by: Miquel Raynal --- test/py/tests/test_tpm2.py | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py index 01ffb3178d..3e1f42d

[U-Boot] [PATCH 3/6] tpm: allow TPM v1 and v2 to be compiled at the same time

2018-07-14 Thread Miquel Raynal
;tpm'.b) The command set can also be changed at runtime (not supported yet, but ready to be), but as one can compile only either one stack or the other, there is still one spot in the code where conditionals are used: to retrieve the v1 or v2 command set. Signed-off-by: Mique

[U-Boot] [PATCH 5/6] tpm: make TPM_V2 be compiled by default

2018-07-14 Thread Miquel Raynal
TPM_V1 was already compiled by default. Now that both can be compiled at the same time, compiled them both by default. Signed-off-by: Miquel Raynal --- drivers/tpm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tpm/Kconfig b/drivers/tpm/Kconfig index 704ab81e2d..e20768fa5e

[U-Boot] [PATCH 6/6] sandbox: compile both TPM stack versions and drivers

2018-07-14 Thread Miquel Raynal
Now that TPMv1 and TPMv2 can be compiled at the same time, let's compile them both with Sandbox as well as both drivers (and, it is already implied in Kconfig: both commands). Signed-off-by: Miquel Raynal --- configs/sandbox_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --

[U-Boot] [PATCH 2/6] tpm: compile Sandbox driver by default

2018-07-14 Thread Miquel Raynal
When Sandbox and the TPM stack are both selected, compile Sandbox TPM driver by default. Signed-off-by: Miquel Raynal --- drivers/tpm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tpm/Kconfig b/drivers/tpm/Kconfig index 93264ddd34..5e3fb3267f 100644 --- a/drivers/tpm

[U-Boot] [PATCH 1/6] tpm: fix typo in kernel doc

2018-07-14 Thread Miquel Raynal
The udevice given to the open() function of course must be opened, not closed. Signed-off-by: Miquel Raynal --- include/tpm-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tpm-common.h b/include/tpm-common.h index 734c2c9d53..68bf8fd627 100644 --- a/include

[U-Boot] [PATCH 0/6] Allow both TPM stacks to be compiled at the same time

2018-07-14 Thread Miquel Raynal
th either only the V1, only the V2 and with both versions selected. Thanks, Miquèl Miquel Raynal (6): tpm: fix typo in kernel doc tpm: compile Sandbox driver by default tpm: allow TPM v1 and v2 to be compiled at the same time test/py: tpm2: switch from 'tpm' to 'tpm2&#x

Re: [U-Boot] [PATCH] sandbox_flattree: Switch to TPMv2 support

2018-07-14 Thread Miquel Raynal
Hi Miquel, Miquel Raynal wrote on Fri, 13 Jul 2018 23:35:23 +0200: > Hi Simon, > > > > >> >> > > > In order to have the test.py tests for TPMv2 run automatically > > >> >> > > > we need > > >> >> > > &g

Re: [U-Boot] [PATCH] sandbox_flattree: Switch to TPMv2 support

2018-07-13 Thread Miquel Raynal
Hi Simon, > >> >> > > > In order to have the test.py tests for TPMv2 run automatically we > >> >> > > > need > >> >> > > > to have one of our sandbox builds use TPMv2 rather than TPMv1. > >> >> > > > Switch > >> >> > > > sandbox_flattree over to this style of TPM. > >> >> > > > >> >> > > The

Re: [U-Boot] tpm TIS TPMv2.0

2018-07-13 Thread Miquel Raynal
Hi Martin, > > > > > Is there any specific reason why the new tpm2_tis_spi_xfer doesn't > > > > support full duplex? It seems we did some work in parallel but you > > > > sent the patches earlier. Is that codes tested against an existing > > > > TPM v2? I have a working implementation what runs

[U-Boot] [PATCH v4 20/27] mtd: declare MTD_PARTITIONS symbol in Kconfig

2018-07-13 Thread Miquel Raynal
-off-by: Miquel Raynal --- drivers/mtd/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 5f52e9b3f8..c2c7250661 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -1,5 +1,8 @@ menu "MTD Support" +config MTD_

[U-Boot] [PATCH v4 25/27] mtd: uclass: add probe function

2018-07-13 Thread Miquel Raynal
The user might want to trigger the probe of any MTD device, export these functions so they can be called from a command source file. Signed-off-by: Miquel Raynal --- drivers/mtd/mtd-uclass.c | 9 + include/linux/mtd/mtd.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers

[U-Boot] [PATCH v4 26/27] cmd: mtd: add 'mtd' command

2018-07-13 Thread Miquel Raynal
There should not be a 'nand' command, a 'sf' command and certainly not another 'spi-nand'. Write a 'mtd' command instead to manage all MTD devices at once. This should be the preferred way to access any MTD device. Signed-off-by: Miquel Raynal --- cmd/K

[U-Boot] [PATCH v4 22/27] cmd: mtdparts: accept spi-nand devices

2018-07-13 Thread Miquel Raynal
Let spi-nand devices be recognized by mtdparts. This is superfluous but a full mtdparts rework would be very time-consuming. Signed-off-by: Miquel Raynal --- cmd/mtdparts.c | 13 - include/jffs2/load_kernel.h | 7 +-- 2 files changed, 13 insertions(+), 7 deletions

[U-Boot] [PATCH v4 24/27] cmd: mtdparts: remove useless 'mtdparts=' prefix

2018-07-13 Thread Miquel Raynal
All U-Boot users must define the mtdparts environment variable with: setenv mtdparts mtdparts=... This is a pure software limitation and is a complete non-sense. Remove this limitation but keep the backward compatibility. Signed-off-by: Miquel Raynal --- cmd/mtdparts.c | 17

[U-Boot] [PATCH v4 23/27] cmd: mtdparts: add a generic 'mtdparts' parser

2018-07-13 Thread Miquel Raynal
allocate an mtd_partition array for each successful call. This array must be freed after use by the caller. The given 'mtdparts' buffer pointer will be moved forward to the next MTD device (if any, it will point towards a '\0' character otherwise). Signed-off-by: Miquel Raynal

[U-Boot] [PATCH v4 13/27] spi: Extend the core to ease integration of SPI memory controllers

2018-07-13 Thread Miquel Raynal
general. This is an attempt at defining a SPI memory interface which works for all kinds of SPI memories (NORs, NANDs, SRAMs). Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- drivers/spi/Kconfig | 7 + drivers/spi/Makefile | 1 + drivers/spi/spi-mem.c | 500

[U-Boot] [PATCH v4 18/27] mtd: spinand: Add initial support for the MX35LF2GE4AB chip

2018-07-13 Thread Miquel Raynal
Add support for the MX35LF2GE4AB chip, which is similar to its cousin MX35LF1GE4AB, with two planes instead of one. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/spi/macronix.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/spi

[U-Boot] [PATCH v4 21/27] cmd: ubi: delete useless and misleading definitions

2018-07-13 Thread Miquel Raynal
These definitions are simply not used and are misleading because similar definitions exist in jffs2/load_kernel.h and are used widely to define MTD device types (which is, by the way, totally redundant with what the MTD core does). Remove these definitions. Signed-off-by: Miquel Raynal --- cmd

[U-Boot] [PATCH v4 14/27] mtd: nand: Add core infrastructure to support SPI NANDs

2018-07-13 Thread Miquel Raynal
: Miquel Raynal --- drivers/mtd/nand/Kconfig |2 + drivers/mtd/nand/Makefile |1 + drivers/mtd/nand/spi/Kconfig |7 + drivers/mtd/nand/spi/Makefile |4 + drivers/mtd/nand/spi/core.c | 1235 + include/linux/mtd/spinand.h | 427

[U-Boot] [PATCH v4 19/27] dt-bindings: Add bindings for SPI NAND devices

2018-07-13 Thread Miquel Raynal
From: Boris Brezillon Add bindings for SPI NAND chips. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- doc/device-tree-bindings/mtd/spi-nand.txt | 5 + 1 file changed, 5 insertions(+) create mode 100644 doc/device-tree-bindings/mtd/spi-nand.txt diff --git a/doc/device

[U-Boot] [PATCH v4 27/27] cmd: mtdparts: try to probe the MTD devices as a fallback

2018-07-13 Thread Miquel Raynal
Current implementation of mtdparts command errors out if the desired MTD device is not found. Fallback to the new probe function in this case before erroring out. This will the save the user the need to call something like 'mtd list' before mtdparts. Signed-off-by: Miquel Raynal

[U-Boot] [PATCH v4 02/27] mtd: Uninline mtd_write_oob and move it to mtdcore.c

2018-07-13 Thread Miquel Raynal
From: Ezequiel Garcia There's no reason for having mtd_write_oob inlined in mtd.h header. Move it to mtdcore.c where it belongs. Signed-off-by: Ezequiel Garcia Acked-by: Boris Brezillon Signed-off-by: Jacek Anaszewski Signed-off-by: Miquel Raynal --- drivers/mtd/mtdcore.c

[U-Boot] [PATCH v4 16/27] mtd: spinand: Add initial support for Winbond W25M02GV

2018-07-13 Thread Miquel Raynal
From: Frieder Schrempf Add support for the W25M02GV chip. Signed-off-by: Frieder Schrempf Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c| 1 + drivers/mtd/nand/spi/winbond.c | 143

[U-Boot] [PATCH v4 17/27] mtd: spinand: Add initial support for the MX35LF1GE4AB chip

2018-07-13 Thread Miquel Raynal
From: Boris Brezillon Add minimal support for the MX35LF1GE4AB SPI NAND chip. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c | 1 + drivers/mtd/nand/spi/macronix.c | 138 include/linux/mtd/

[U-Boot] [PATCH v4 12/27] mtd: nand: Pass mode information to nand_page_io_req

2018-07-13 Thread Miquel Raynal
Brezillon Signed-off-by: Miquel Raynal --- include/linux/mtd/nand.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index ada7af4a41..13e8dd1103 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -86,6 +86,7 @@ struct

[U-Boot] [PATCH v4 15/27] mtd: spinand: Add initial support for Micron MT29F2G01ABAGD

2018-07-13 Thread Miquel Raynal
From: Peter Pan Add a basic driver for Micron SPI NANDs. Only one device is supported right now, but the driver will be extended to support more devices afterwards. Signed-off-by: Peter Pan Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- drivers/mtd/nand/spi/Makefile | 2

[U-Boot] [PATCH v4 11/27] mtd: nand: Add core infrastructure to deal with NAND devices

2018-07-13 Thread Miquel Raynal
From: Boris Brezillon Add an intermediate layer to abstract NAND device interface so that some logic can be shared between SPI NANDs, parallel/raw NANDs, OneNANDs, ... Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- drivers/mtd/nand/Kconfig | 3 + drivers/mtd/nand/Makefile

[U-Boot] [PATCH v4 08/27] mtd: move all flash categories inside MTD submenu

2018-07-13 Thread Miquel Raynal
There is no reason to have NAND, SPI flashes and UBI sections outside of the MTD submenu in Kconfig. Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- drivers/mtd/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig

[U-Boot] [PATCH v4 09/27] mtd: move NAND files into a raw/ subdirectory

2018-07-13 Thread Miquel Raynal
NAND flavors, like serial and parallel, have a lot in common and would benefit to share code. Let's move raw (parallel) NAND specific code in a raw/ subdirectory, to ease the addition of a core file in nand/ and the introduction of a spi/ subdirectory specific to SPI NANDs. Signed-off-by: M

[U-Boot] [PATCH v4 10/27] mtd: rename nand into rawnand in Kconfig prompt

2018-07-13 Thread Miquel Raynal
Sync the Kconfig raw NAND entry title with the code architecture. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/raw/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index bdc272142e..118fae7620 100644

[U-Boot] [PATCH v4 07/27] mtd: move definitions to enlarge their range

2018-07-13 Thread Miquel Raynal
Some helpers might be useful in a future 'mtd' U-Boot command to parse MTD device list. Signed-off-by: Miquel Raynal --- drivers/mtd/mtdcore.h | 6 -- include/linux/mtd/mtd.h | 6 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/mtdcore.h b/d

[U-Boot] [PATCH v4 04/27] mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing

2018-07-13 Thread Miquel Raynal
eady a fallback on the _oob variant if the former is used. Signed-off-by: Miquel Raynal --- drivers/mtd/mtdcore.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 9a3efe95df..fb1d68d5e2 100644

[U-Boot] [PATCH v4 05/27] mtd: add get/set of_node/flash_node helpers

2018-07-13 Thread Miquel Raynal
Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- include/linux/mtd/mtd.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 0876897c51..78eb745c04 100644 --- a/include/linux/mtd/mtd.h +++ b/

[U-Boot] [PATCH v4 01/27] mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing

2018-07-13 Thread Miquel Raynal
Brian Norris Reviewed-by: Miquel Raynal Tested-by: Ladislav Michl Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- drivers/mtd/mtdcore.c | 31 ++-- drivers/mtd/mtdpart.c | 6 ++-- drivers/mtd/nand/nand_base.c

[U-Boot] [PATCH v4 06/27] mtd: fix build issue with includes

2018-07-13 Thread Miquel Raynal
Fix build errors produced by mtd.h and dm/device.h if not included in the right order. Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- include/linux/mtd/mtd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 78eb745c04

[U-Boot] [PATCH v4 03/27] mtd: Add sanity checks in mtd_write/read_oob()

2018-07-13 Thread Miquel Raynal
gic. Do general sanity checks, like ops fields consistency and range checking. Signed-off-by: Boris Brezillon Cc: Peter Pan Signed-off-by: Richard Weinberger [Miquel: squashed the fix about the chip's size check] Signed-off-by: Miquel Raynal --- drivers/mtd/m

[U-Boot] [PATCH v4 00/27] SPI-NAND support

2018-07-13 Thread Miquel Raynal
mtd: add get/set of_node/flash_node helpers Ezequiel Garcia (1): mtd: Uninline mtd_write_oob and move it to mtdcore.c Frieder Schrempf (1): mtd: spinand: Add initial support for Winbond W25M02GV Miquel Raynal (15): mtd: Fallback to ->_read/write() when ->_read/write_oob() is miss

Re: [U-Boot] [PATCH v3 00/21] SPI-NAND support

2018-07-13 Thread Miquel Raynal
Hi Miquel, Miquel Raynal wrote on Thu, 12 Jul 2018 15:24:45 +0200: > During the last months, Boris Brezillon shared his work to support > serial flashes within Linux. First, he delivered (and merged) a new > layer called spi-mem. He also initiated in Linux MTD subsystem the move >

Re: [U-Boot] [PATCH v2 13/21] spi: Extend the core to ease integration of SPI memory controllers

2018-07-12 Thread Miquel Raynal
Hi Stefan, > > + memset(tx_buf + pos, 0xff, op->dummy.nbytes); > > + pos += op->dummy.nbytes; > > + } > > + > > + if (tx_data) > > + memcpy(tx_buf + pos, op->data.buf.out, op->data.nbytes); > > + > > + ret = spi_xfer(slave, xfer_len * 8, tx_buf, rx_buf, > > +

[U-Boot] [PATCH v3 13/21] spi: Extend the core to ease integration of SPI memory controllers

2018-07-12 Thread Miquel Raynal
general. This is an attempt at defining a SPI memory interface which works for all kinds of SPI memories (NORs, NANDs, SRAMs). Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- drivers/spi/Kconfig | 7 + drivers/spi/Makefile | 1 + drivers/spi/spi-mem.c | 500

[U-Boot] [PATCH v3 20/21] cmd: mtd: add 'mtd' command

2018-07-12 Thread Miquel Raynal
There should not be a 'nand' command, a 'sf' command and certainly not another 'spi-nand'. Write a 'mtd' command instead to manage all MTD devices at once. This should be the preferred way to access any MTD device. Signed-off-by: Miquel Raynal --- cm

[U-Boot] [PATCH v3 21/21] dt-bindings: Add bindings for SPI NAND devices

2018-07-12 Thread Miquel Raynal
From: Boris Brezillon Add bindings for SPI NAND chips. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- doc/device-tree-bindings/mtd/spi-nand.txt | 5 + 1 file changed, 5 insertions(+) create mode 100644 doc/device-tree-bindings/mtd/spi-nand.txt diff --git a/doc/device

[U-Boot] [PATCH v3 18/21] mtd: spinand: Add initial support for the MX35LF2GE4AB chip

2018-07-12 Thread Miquel Raynal
Add support for the MX35LF2GE4AB chip, which is similar to its cousin MX35LF1GE4AB, with two planes instead of one. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/spi/macronix.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/spi

[U-Boot] [PATCH v3 12/21] mtd: nand: Pass mode information to nand_page_io_req

2018-07-12 Thread Miquel Raynal
Brezillon Signed-off-by: Miquel Raynal --- include/linux/mtd/nand.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index ada7af4a41..13e8dd1103 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -86,6 +86,7 @@ struct

[U-Boot] [PATCH v3 15/21] mtd: spinand: Add initial support for Micron MT29F2G01ABAGD

2018-07-12 Thread Miquel Raynal
From: Peter Pan Add a basic driver for Micron SPI NANDs. Only one device is supported right now, but the driver will be extended to support more devices afterwards. Signed-off-by: Peter Pan Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- drivers/mtd/nand/spi/Makefile | 2

[U-Boot] [PATCH v3 14/21] mtd: nand: Add core infrastructure to support SPI NANDs

2018-07-12 Thread Miquel Raynal
: Miquel Raynal --- drivers/mtd/nand/Kconfig |2 + drivers/mtd/nand/Makefile |1 + drivers/mtd/nand/spi/Kconfig |7 + drivers/mtd/nand/spi/Makefile |4 + drivers/mtd/nand/spi/core.c | 1235 + include/linux/mtd/spinand.h | 427

[U-Boot] [PATCH v3 19/21] mtd: uclass: add probe function

2018-07-12 Thread Miquel Raynal
The user might want to trigger the probe of any MTD device, export these functions so they can be called from a command source file. Signed-off-by: Miquel Raynal --- drivers/mtd/mtd-uclass.c | 9 + include/linux/mtd/mtd.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers

[U-Boot] [PATCH v3 16/21] mtd: spinand: Add initial support for Winbond W25M02GV

2018-07-12 Thread Miquel Raynal
From: Frieder Schrempf Add support for the W25M02GV chip. Signed-off-by: Frieder Schrempf Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c| 1 + drivers/mtd/nand/spi/winbond.c | 143

[U-Boot] [PATCH v3 17/21] mtd: spinand: Add initial support for the MX35LF1GE4AB chip

2018-07-12 Thread Miquel Raynal
From: Boris Brezillon Add minimal support for the MX35LF1GE4AB SPI NAND chip. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c | 1 + drivers/mtd/nand/spi/macronix.c | 138 include/linux/mtd/

[U-Boot] [PATCH v3 11/21] mtd: nand: Add core infrastructure to deal with NAND devices

2018-07-12 Thread Miquel Raynal
From: Boris Brezillon Add an intermediate layer to abstract NAND device interface so that some logic can be shared between SPI NANDs, parallel/raw NANDs, OneNANDs, ... Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal --- drivers/mtd/nand/Kconfig | 3 + drivers/mtd/nand/Makefile

[U-Boot] [PATCH v3 04/21] mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing

2018-07-12 Thread Miquel Raynal
eady a fallback on the _oob variant if the former is used. Signed-off-by: Miquel Raynal --- drivers/mtd/mtdcore.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 9a3efe95df..fb1d68d5e2 100644

[U-Boot] [PATCH v3 08/21] mtd: move all flash categories inside MTD submenu

2018-07-12 Thread Miquel Raynal
There is no reason to have NAND, SPI flashes and UBI sections outside of the MTD submenu in Kconfig. Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- drivers/mtd/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig

[U-Boot] [PATCH v3 06/21] mtd: fix build issue with includes

2018-07-12 Thread Miquel Raynal
Fix build errors produced by mtd.h and dm/device.h if not included in the right order. Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- include/linux/mtd/mtd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 78eb745c04

[U-Boot] [PATCH v3 07/21] mtd: move definitions to enlarge their range

2018-07-12 Thread Miquel Raynal
Some helpers might be useful in a future 'mtd' U-Boot command to parse MTD device list. Signed-off-by: Miquel Raynal --- drivers/mtd/mtdcore.h | 6 -- include/linux/mtd/mtd.h | 6 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/mtdcore.h b/d

[U-Boot] [PATCH v3 09/21] mtd: move NAND files into a raw/ subdirectory

2018-07-12 Thread Miquel Raynal
NAND flavors, like serial and parallel, have a lot in common and would benefit to share code. Let's move raw (parallel) NAND specific code in a raw/ subdirectory, to ease the addition of a core file in nand/ and the introduction of a spi/ subdirectory specific to SPI NANDs. Signed-off-by: M

[U-Boot] [PATCH v3 10/21] mtd: rename nand into rawnand in Kconfig prompt

2018-07-12 Thread Miquel Raynal
Sync the Kconfig raw NAND entry title with the code architecture. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/raw/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index bdc272142e..118fae7620 100644

[U-Boot] [PATCH v3 05/21] mtd: add get/set of_node/flash_node helpers

2018-07-12 Thread Miquel Raynal
Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal Reviewed-by: Jagan Teki --- include/linux/mtd/mtd.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 0876897c51..78eb745c04 100644 --- a/include/linux/mtd/mtd.h +++ b/

<    2   3   4   5   6   7   8   9   10   >