Re: email address of Boris Brezillon

2019-12-12 Thread Boris Brezillon
t; > Do we have any kind of marking such addresses as "don't use" to patman so > > this > > won't happen in the future? > > File .mailmap could be used to map to Boris's new mail address. > > Linux's .mailmap has these entries: &g

Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-13 Thread Boris Brezillon
[PM] Hi Vignesh, On Fri, 8 Feb 2019 18:36:05 +0530 Vignesh R wrote: > On 07/02/19 6:13 PM, Jagan Teki wrote: > > On Tue, Feb 5, 2019 at 11:29 AM Vignesh R wrote: > [...] > >> > >> Vignesh R (20): > >> configs: Move CONFIG_SPI_FLASH into defconfigs > >> bitops: Fix GENMASK definition for S

Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-13 Thread Boris Brezillon
On Wed, 13 Feb 2019 14:42:57 +0100 Boris Brezillon wrote: > [PM] Not so private actually :D. > Hi Vignesh, > > On Fri, 8 Feb 2019 18:36:05 +0530 > Vignesh R wrote: > > > On 07/02/19 6:13 PM, Jagan Teki wrote: > > > On Tue, Feb 5,

Re: [U-Boot] [PATCH 2/3] spi: Add support for the Aspeed ast2500 SPI controllers

2019-01-25 Thread Boris Brezillon
+Vignesh Hi Cédric, On Fri, 25 Jan 2019 18:28:02 +0100 Cédric Le Goater wrote: > Hello > > On 10/10/18 2:02 PM, Cédric Le Goater wrote: > > Hello Boris, > > > > On 10/10/18 9:32 AM, Boris Brezillon wrote: > >> Hi Cédric, > >> > >> On

Re: [U-Boot] [PATCH 03/16] spi: Add non DM version of SPI_MEM

2018-12-12 Thread Boris Brezillon
On Thu, 13 Dec 2018 04:40:30 +0530 Jagan Teki wrote: > > I do really understand your intention about the real question. > - Any code or generic code will add in U-Boot should be driver-model > driven, are you agree this point? > Yes- thanks. > No - we need to have separate discussion. Depen

Re: [U-Boot] [PATCH 03/16] spi: Add non DM version of SPI_MEM

2018-12-12 Thread Boris Brezillon
On Thu, 13 Dec 2018 02:15:16 +0530 Jagan Teki wrote: > On Thu, Dec 13, 2018 at 2:10 AM Boris Brezillon > wrote: > > > > Hi Jagan, > > > > On Thu, 13 Dec 2018 01:55:08 +0530 > > Jagan Teki wrote: > > > > > On Wed, Dec 12, 2018 at 11:08 PM Vig

Re: [U-Boot] [PATCH 03/16] spi: Add non DM version of SPI_MEM

2018-12-12 Thread Boris Brezillon
On Wed, 12 Dec 2018 22:07:44 +0100 Jagan Teki wrote: > On Wed 12 Dec, 2018, 10:02 PM Boris Brezillon wrote: > > > On Thu, 13 Dec 2018 02:15:16 +0530 > > Jagan Teki wrote: > > > > > On Thu, Dec 13, 2018 at 2:10 AM Boris Brezillon > > > wrote: &g

Re: [U-Boot] [PATCH 03/16] spi: Add non DM version of SPI_MEM

2018-12-12 Thread Boris Brezillon
Hi Jagan, On Thu, 13 Dec 2018 01:55:08 +0530 Jagan Teki wrote: > On Wed, Dec 12, 2018 at 11:08 PM Vignesh R wrote: > > > > Add non DM version of SPI_MEM to support easy migration to new SPI NOR > > framework. This can be removed once DM_SPI conversion is complete. > > Our intention to use ne

Re: [U-Boot] [PATCH 10/16] configs: Get rid of SPI_FLASH_BAR

2018-12-12 Thread Boris Brezillon
On Thu, 13 Dec 2018 02:11:48 +0530 Jagan Teki wrote: > On Wed, Dec 12, 2018 at 11:15 PM Vignesh R wrote: > > > > Now that we have new SPI NOR framework in place that supports 4 byte > > addressing mode by default, get rid of CONFIG_SPI_FLASH_BAR > > I already mentioned in previous mail, BAR i

Re: [U-Boot] [PATCH 09/16] sf_mtd: Simply mtd operations

2018-12-12 Thread Boris Brezillon
On Wed, 12 Dec 2018 23:02:21 +0530 Vignesh R wrote: > @@ -39,13 +37,12 @@ static int spi_flash_mtd_erase(struct mtd_info *mtd, > struct erase_info *instr) > static int spi_flash_mtd_read(struct mtd_info *mtd, loff_t from, size_t len, > size_t *retlen, u_char *buf) > { > - struct spi_

Re: [U-Boot] [PATCH 2/2] mtd: Get rid of board_mtdparts_default()

2018-12-12 Thread Boris Brezillon
On Wed, 12 Dec 2018 12:37:04 +0100 Ladislav Michl wrote: > Now problem is that IGEPv2 comes with quite many configurations, some of > them are even customized, so static configuration is a show stopper > mainly as I do not know what devices are in field. > Another issue is how ubispl code works:

Re: [U-Boot] [PATCH 2/2] mtd: Get rid of board_mtdparts_default()

2018-12-12 Thread Boris Brezillon
Hi Ladislav, On Tue, 11 Dec 2018 23:55:26 +0100 Ladislav Michl wrote: > Hi Boris, > > On Mon, Dec 10, 2018 at 04:38:50PM +0100, Boris Brezillon wrote: > > The only implementer of this function has been patched to use > > CONFIG_MTD{IDS,PARTS}_DEFAULT instead. Let'

Re: [U-Boot] [PATCH v4 1/6] common: command: Fix command auto-completion

2018-12-11 Thread Boris Brezillon
Hi Simon, On Mon, 10 Dec 2018 18:04:20 -0700 Simon Glass wrote: > Hi Boris, > > On Mon, 3 Dec 2018 at 14:54, Boris Brezillon > wrote: > > > > When auto-completing command arguments, the last argument is not > > necessarily the one we need to auto-complete. Wh

[U-Boot] [PATCH 2/2] mtd: Get rid of board_mtdparts_default()

2018-12-10 Thread Boris Brezillon
The only implementer of this function has been patched to use CONFIG_MTD{IDS,PARTS}_DEFAULT instead. Let's get rid of this function and the associated CONFIG_SYS_MTDPARTS_RUNTIME option. Signed-off-by: Boris Brezillon --- board/isee/igep00x0/igep00x0.c | 17 - cmd/mtdpa

[U-Boot] [PATCH 1/2] configs: igep: Define default mtdids/mtdparts

2018-12-10 Thread Boris Brezillon
We are trying to get rid of the weak board_mtdparts_default() function and we need to make sure igep defconfigs have proper proper CONFIG_MTD{IDS,PARTS}_DEFAULT before doing that. Signed-off-by: Boris Brezillon --- configs/igep0032_defconfig | 2 ++ configs/igep00x0_defconfig | 2 ++ 2 files

Re: [U-Boot] [RFC PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework

2018-12-10 Thread Boris Brezillon
On Mon, 10 Dec 2018 18:32:09 +0530 Jagan Teki wrote: > On Thu, Dec 6, 2018 at 11:55 PM Vignesh R wrote: > > > > Hi Jagan, > > > > On 06-Dec-18 10:44 PM, Jagan Teki wrote: > > > On Tue, Dec 4, 2018 at 5:56 PM Vignesh R wrote: > > >> > > >> U-Boot SPI NOR support (sf layer) is quite outdated

Re: [U-Boot] [PATCH v4 00/11] mtd/sf: Various fixes

2018-12-08 Thread Boris Brezillon
+Tom for the question about missing SoBs. Hi Jagan, On Thu, 6 Dec 2018 00:48:47 +0530 Jagan Teki wrote: > On Sun, Dec 2, 2018 at 3:25 PM Boris Brezillon > wrote: > > > > Hello, > > > > This is the 4th version of the mtd / sf fixes patchset. This v4 just > >

Re: [U-Boot] [RFC PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework

2018-12-07 Thread Boris Brezillon
On Thu, 6 Dec 2018 23:55:30 +0530 Vignesh R wrote: > On 06-Dec-18 10:44 PM, Jagan Teki wrote: > > On Tue, Dec 4, 2018 at 5:56 PM Vignesh R wrote: > >> > >> U-Boot SPI NOR support (sf layer) is quite outdated as it does not > >> support 4 byte addressing opcodes, SFDP table parsing and differen

Re: [U-Boot] [PATCH v3 13/28] mtd: ensure MTD is compiled when ENV_IS_IN_FLASH is selected

2018-12-06 Thread Boris Brezillon
Hello Wolfgang, On Thu, 06 Dec 2018 09:06:05 +0100 Wolfgang Denk wrote: > Dear Miquel, > > In message <20181205153218.36f6ed4e@xps13> you wrote: > > > > I took a rather small configuration: stm32f429-discovery_defconfig > > which uses CONFIG_MTD_NOR_FLASH. Without CONFIG_MTD, u-boot.bin is > >

Re: [U-Boot] [PATCH v4 00/11] mtd/sf: Various fixes

2018-12-05 Thread Boris Brezillon
Hi Jagan, On Sun, 2 Dec 2018 10:54:21 +0100 Boris Brezillon wrote: > Hello, > > This is the 4th version of the mtd / sf fixes patchset. This v4 just > adds a new check in del_mtd_device() (and a debug() when > del_mtd_partitions() fails). > > Regards, > > Boris &

Re: [U-Boot] [PATCH v3 26/28] cmd: make MTD commands depend on MTD

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 11:48:32 +0100 Miquel Raynal wrote: > Hi Boris, > > Boris Brezillon wrote on Wed, 5 Dec 2018 > 11:42:08 +0100: > > > On Wed, 5 Dec 2018 00:57:12 +0100 > > Miquel Raynal wrote: > > > > > Defconfigs have been fixed, now we ca

Re: [U-Boot] [PATCH v3 28/28] mtd: properly handle SPL kbuild lines

2018-12-05 Thread Boris Brezillon
Hi Miquel, On Wed, 5 Dec 2018 00:57:14 +0100 Miquel Raynal wrote: > Instead of compiling just a few files from the root Makefile, rework > the MTD Makefile tree to take into account SPL's needs. > As mentioned in my review of patch 1, I think patch 1, 27 and 28 could be merged in a single pat

Re: [U-Boot] [PATCH v3 26/28] cmd: make MTD commands depend on MTD

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:12 +0100 Miquel Raynal wrote: > Defconfigs have been fixed, now we can add proper dependencies in > Kconfig. SPI FLASH is still not dependent on MTD (deeper rework needed). > > Signed-off-by: Miquel Raynal > --- > cmd/Kconfig | 10 +++--- > 1 file changed, 7 inser

Re: [U-Boot] [PATCH v3 23/28] mtd: ubi: remove dependency on command in Kconfig

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:09 +0100 Miquel Raynal wrote: > Now that the defconfigs have been fixed, remove the dependencies on > commands in Kconfig. No changes in Kconfig in this patch. > The necessary symbols are enabled so this will > not break anything. > > Signed-off-by: Miquel Raynal > -

Re: [U-Boot] [PATCH v3 25/28] cmd: nand/sf: isolate legacy code

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:11 +0100 Miquel Raynal wrote: > The 'sf' command is not supposed to rely on the MTD stack, but both > 'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite > their location, these functions do not depend at all on the MTD > stack. > > This file (drivers/m

Re: [U-Boot] [PATCH v3 21/28] mtd: nor: NOR flashes depend on MTD

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:07 +0100 Miquel Raynal wrote: > A NOR flash needs the MTD core, ensure this dependency is met by > adding a "depends on" in Kconfig. This is fine since defconfigs have > been fixed. > > Signed-off-by: Miquel Raynal > --- > drivers/mtd/Kconfig | 1 + > 1 file changed,

Re: [U-Boot] [PATCH v3 22/28] mtd: nand: remove dependency on commands in Kconfig

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:08 +0100 Miquel Raynal wrote: > Now that the defconfigs have been fixed, remove the dependencies on > commands in Kconfig. That's not what I'm seeing in this diff ;-). > The necessary symbols are enabled so this will > not break anything. > > Signed-off-by: Miquel Ray

Re: [U-Boot] [PATCH v3 20/28] dfu: add dependency on the NAND core

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:06 +0100 Miquel Raynal wrote: > CONFIG_DFU_NAND needs the NAND core being compiled. > > Also fix the colibri_vf defconfig to reflect this dependency. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon BTW, it would be great to have

Re: [U-Boot] [PATCH v3 19/28] mtd: nand: add includes in NAND core to avoid warnings

2018-12-05 Thread Boris Brezillon
el Raynal Reviewed-by: Boris Brezillon > --- > drivers/mtd/nand/bbt.c | 1 + > drivers/mtd/nand/core.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/mtd/nand/bbt.c b/drivers/mtd/nand/bbt.c > index 7e0ad3190c..f3d05e6757 100644 > --- a/drivers/m

Re: [U-Boot] [PATCH v3 18/28] configs: remove MTD support from bcm11130 and M54418TWR defconfigs

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:04 +0100 Miquel Raynal wrote: > While the right Kconfig entries were selected, because of the missing > CMD_NAND symbol the raw NAND core was never compiled. Remove it from > the defconfigs otherwise the build will fail. See my comment on patch 17. _

Re: [U-Boot] [PATCH v3 17/28] configs: remove raw NAND core from k2g defconfigs

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:03 +0100 Miquel Raynal wrote: > Due to previous Makefile organization, the raw NAND subdirectory was > not compiled in if CMD_NAND was not enabled. Because the Denali driver > does not compile with these boards (undefined environment offset), > remove the dependency with

Re: [U-Boot] [PATCH v3 16/28] configs: move CONFIG_MTD in defconfigs when set in arch includes

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:02 +0100 Miquel Raynal wrote: > Let's be consistent and always declare CONFIG_MTD from the defconfig > file when needed. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon One comment below. > --- > configs/socfpga_strati

Re: [U-Boot] [PATCH v3 24/28] cmd: mtdparts: show Kconfig options only if the command is selected

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:10 +0100 Miquel Raynal wrote: > Guard mtdparts options with an if/endif statement in Kconfig. Also > move the Kconfig entry of the option right after the entry of the > command. > > Signed-off-by: Miquel Raynal > --- > cmd/Kconfig | 21 +++-- > 1 file

Re: [U-Boot] [PATCH v3 15/28] mtd: ensure MTD is compiled when CMD_MTDPARTS is selected

2018-12-05 Thread Boris Brezillon
: Miquel Raynal Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH v3 14/28] mtd: ensure CMD_NAND is compiled when its options are selected

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:57:00 +0100 Miquel Raynal wrote: > In some files, options of CMD_NAND are selected but not the command > itself. Fix this inconsistency. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon ___ U-Boot ma

Re: [U-Boot] [PATCH v3 13/28] mtd: ensure MTD is compiled when ENV_IS_IN_FLASH is selected

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:59 +0100 Miquel Raynal wrote: > MTD support must be enabled when the environment is in NOR. > > Signed-off-by: Miquel Raynal > --- > configs/armadillo-800eva_defconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/configs/armadillo-800eva_defconfig > b/co

Re: [U-Boot] [PATCH v3 12/28] mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selected

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:58 +0100 Miquel Raynal wrote: > Raw NAND support must be enabled when the environment is in NAND. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx

Re: [U-Boot] [PATCH v3 11/28] mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selected

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:57 +0100 Miquel Raynal wrote: > UBI must be enabled when the environment is in UBI. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de

Re: [U-Boot] [PATCH v3 10/28] mtd: ensure UBI is compiled when CMD_UBI is selected

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:56 +0100 Miquel Raynal wrote: > UBI must be enabled when CMD_UBI is used, this is mandatory and will > later be reflected thanks to a "depends on" in Kconfig. But first, > defconfigs needs to be fixed. > > Signed-off-by: Miquel Raynal Rev

Re: [U-Boot] [PATCH v3 09/28] mtd: ensure MTD is compiled when UBI is used

2018-12-05 Thread Boris Brezillon
quel Raynal Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH v3 08/28] mtd: ensure UBI is compiled when using fastmap

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:54 +0100 Miquel Raynal wrote: > UBI must be enabled when using fastmap, reflect this is defconfigs. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx

Re: [U-Boot] [PATCH v3 07/28] mtd: ensure MTD is compiled when there is a SPI NOR flash using MTD

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:53 +0100 Miquel Raynal wrote: > MTD must be enabled when there is a SPI NOR flash using the > SPI_FLASH_MTD config entry. > > Signed-off-by: Miquel Raynal With Vignesh's comment addressed Reviewed-by

Re: [U-Boot] [PATCH v3 06/28] mtd: ensure MTD/the raw NAND core are compiled when there is a NAND flash

2018-12-05 Thread Boris Brezillon
ther rework the MTD dependency description" or something like along those lines. > > Signed-off-by: Miquel Raynal Other than that Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

Re: [U-Boot] [PATCH v3 01/28] Makefile: move MTD-related lines in coherent Makefiles

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:47 +0100 Miquel Raynal wrote: > Move MTD-related lines out of the root Makefile. Put them in their > respective directories. > > Enclose some of these new lines to skip them when building the SPL > (the SPL directly points to what is needed). > > CONFIG_CMD_NAND is the

Re: [U-Boot] [PATCH v3 04/28] mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:50 +0100 Miquel Raynal wrote: > Like in Linux, just use CONFIG_MTD to compile the MTD stack. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx.de https://list

Re: [U-Boot] [PATCH v3 05/28] mtd: ensure MTD is compiled when there is a NOR flash

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:51 +0100 Miquel Raynal wrote: > CONFIG_MTD must be enabled when there is a NOR flash selected. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx

Re: [U-Boot] [PATCH v3 03/28] mtd: rename CONFIG_MTD -> CONFIG_DM_MTD

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:49 +0100 Miquel Raynal wrote: > CONFIG_MTD must be reserved for the MTD core. Like any other > subsystem, prefix the symbol by DM when it comes to DM support. > > Signed-off-by: Miquel Raynal Reviewed-by: Bor

Re: [U-Boot] [PATCH v3 02/28] mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND

2018-12-05 Thread Boris Brezillon
On Wed, 5 Dec 2018 00:56:48 +0100 Miquel Raynal wrote: > Add more clarity by changing the Kconfig entry name. > > Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de

[U-Boot] [PATCH v2] common: command: Add support for $ auto-completion

2018-12-05 Thread Boris Brezillon
Add the dollar_complete() function to auto-complete arguments starting with a '$' and use it in the cmd_auto_complete() path such that all args starting with a $ can be auto-completed based on the available env vars. Signed-off-by: Boris Brezillon --- Changes in v2: - Call dollar_compl

Re: [U-Boot] [PATCH 0/2] cmd: auto-complete args starting with a $

2018-12-04 Thread Boris Brezillon
On Tue, 4 Dec 2018 11:33:13 +0100 Boris Brezillon wrote: > > > > i. e. this is a feature of the shell and not of any command. > > Implementing this a zillion times for each of the commands in > > inacceptable. Also, implementing it for one command and not for > >

Re: [U-Boot] [PATCH 0/2] cmd: auto-complete args starting with a $

2018-12-04 Thread Boris Brezillon
On Tue, 04 Dec 2018 14:00:47 +0100 Wolfgang Denk wrote: > Dear Boris, > > In message <20181204113313.577178ac@bbrezillon> you wrote: > > > > > But is this not based on the code of mtd_name_complete() which is > > > only availabole when MTD is present? > > > > Nope. See patch 1, the code is c

Re: [U-Boot] [RFC PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework

2018-12-04 Thread Boris Brezillon
On Tue, 4 Dec 2018 17:56:48 +0530 Vignesh R wrote: > U-Boot SPI NOR support (sf layer) is quite outdated as it does not > support 4 byte addressing opcodes, SFDP table parsing and different types of > quad mode enable sequences. Many newer flashes no longer support BANK > registers used by sf lay

Re: [U-Boot] [RFC PATCH v2 09/11] sf_mtd: Simply mtd operations

2018-12-04 Thread Boris Brezillon
On Tue, 4 Dec 2018 17:56:57 +0530 Vignesh R wrote: > Now that there is new SPI NOR framework, simplify mtd device > registration and read/write/erase operations. > > Signed-off-by: Vignesh R > --- > drivers/mtd/spi/sf_internal.h | 2 +- > drivers/mtd/spi/sf_mtd.c | 39 ---

Re: [U-Boot] [PATCH 0/2] cmd: auto-complete args starting with a $

2018-12-04 Thread Boris Brezillon
Hi Wolfgang, On Tue, 04 Dec 2018 11:14:31 +0100 Wolfgang Denk wrote: > Dear Boris, > > In message <20181204105448.63b9af8c@bbrezillon> you wrote: > > > > > > It's pretty common to pass arguments that start with a $ and are then > > > > expanded by the shell, and I'm this kind of lazy guy that

Re: [U-Boot] [PATCH 0/2] cmd: auto-complete args starting with a $

2018-12-04 Thread Boris Brezillon
On Tue, 04 Dec 2018 10:44:19 +0100 Wolfgang Denk wrote: > Dear Boris, > > In message <20181203220726.19370-1-boris.brezil...@bootlin.com> you wrote: > > > > It's pretty common to pass arguments that start with a $ and are then > > expanded by the shell, and I'm this kind of lazy guy that hits t

[U-Boot] [PATCH 0/2] cmd: auto-complete args starting with a $

2018-12-03 Thread Boris Brezillon
ozlabs.org/project/uboot/list/?series=79552 Boris Brezillon (2): common: command: Provide a dollar_complete() helper cmd: mtd: auto-complete args starting with a $ when appropriate cmd/mtd.c | 40 - common/command.c | 22 ++--- en

[U-Boot] [PATCH 2/2] cmd: mtd: auto-complete args starting with a $ when appropriate

2018-12-03 Thread Boris Brezillon
It's quite usual to have RAM or flash address stored in env vars. Use $ auto-completion for such arguments. Signed-off-by: Boris Brezillon --- cmd/mtd.c | 40 +++- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/cmd/mtd.c b/cmd/mtd.c

[U-Boot] [PATCH 1/2] common: command: Provide a dollar_complete() helper

2018-12-03 Thread Boris Brezillon
Add an helper to auto-complete arguments starting with a '$' with what's available in the environment. Signed-off-by: Boris Brezillon --- common/command.c | 22 ++--- env/common.c | 50 --- include/command.h |

[U-Boot] [PATCH v4 6/6] cmd: adc: Use the sub-command infrastructure

2018-12-03 Thread Boris Brezillon
And you get sub-command auto-completion for free. Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v4: -None Changes in v3: - Add Tom's R-b Changes in v2: - New patch --- cmd/adc.c | 33 + 1 file changed, 5 insertions(+), 28 dele

[U-Boot] [PATCH v4 5/6] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands

2018-12-03 Thread Boris Brezillon
It's way simpler this way, and we also gain auto-completion support for free (MTD name auto-completion has been added with mtd_name_complete()) Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v4: - Fix maxargs in mtd bad sub-cmd - s/do_mtd_name_complete()/mtd_name_com

[U-Boot] [PATCH v4 2/6] common: command: Expose a generic helper to auto-complete sub commands

2018-12-03 Thread Boris Brezillon
() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v4: -None Changes in v3: - Add Tom's R-b Changes in v2: - None --- common/command.c | 20 include/command.h | 3 +++ 2 files changed, 19 insertions(+), 4

[U-Boot] [PATCH v4 4/6] command: commands: Add macros to declare commands with subcmds

2018-12-03 Thread Boris Brezillon
: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v4: -None Changes in v3: - Add Tom's R-b - Fix the commit message Changes in v2: - Adjust based on the changes done in the sub-command infra --- include/command.h | 78 +++ 1 file change

[U-Boot] [PATCH v4 3/6] common: command: Rework the 'cmd is repeatable' logic

2018-12-03 Thread Boris Brezillon
entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v4: -None Changes in v3: - Add Tom's R-b Changes in v2: - New patch --- cmd/dtimg.c | 2 +- cmd/help.c| 2 +- cmd/mmc.c | 4 ++-

[U-Boot] [PATCH v4 0/6] cmd: Simplify support for sub-commands

2018-12-03 Thread Boris Brezillon
Hello, Here is the 4th version of the sub-cmd patchset fixing the maxargs def of the mtd bad sub-cmd (I noticed the bug just after sending v3 :-/). Regards, Boris Boris Brezillon (6): common: command: Fix command auto-completion common: command: Expose a generic helper to auto-complete sub

[U-Boot] [PATCH v4 1/6] common: command: Fix command auto-completion

2018-12-03 Thread Boris Brezillon
line instead of trying to suffix the last valid argument with missing chars. Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v4: -None Changes in v3: - Add Tom's R-b Changes in v2: - None --- common/command.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deleti

Re: [U-Boot] [PATCH v3 0/6] cmd: Simplify support for sub-commands

2018-12-03 Thread Boris Brezillon
On Mon, 3 Dec 2018 22:14:52 +0100 Boris Brezillon wrote: > Hello, > > Here is the 3nd version of the sub-cmd patchset. This version fixes a > few typos in commit messages. > > Regards, > > Boris > > Boris Brezillon (6): > common: command: Fix command au

Re: [U-Boot] [PATCH v3 5/6] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands

2018-12-03 Thread Boris Brezillon
On Mon, 3 Dec 2018 22:14:57 +0100 Boris Brezillon wrote: > It's way simpler this way, and we also gain auto-completion support for > free (MTD name auto-completion has been added with do_mtd_name_complete()) > > Signed-off-by: Boris Brezillon > Reviewed-by: Tom Rini &

[U-Boot] [PATCH v3 6/6] cmd: adc: Use the sub-command infrastructure

2018-12-03 Thread Boris Brezillon
And you get sub-command auto-completion for free. Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v3: - Add Tom's R-b Changes in v2: - New patch --- cmd/adc.c | 33 + 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/cmd/ad

[U-Boot] [PATCH v3 4/6] command: commands: Add macros to declare commands with subcmds

2018-12-03 Thread Boris Brezillon
: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v3: - Add Tom's R-b - Fix the commit message Changes in v2: - Adjust based on the changes done in the sub-command infra --- include/command.h | 78 +++ 1 file changed, 78 insertions(+) diff --

[U-Boot] [PATCH v3 5/6] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands

2018-12-03 Thread Boris Brezillon
It's way simpler this way, and we also gain auto-completion support for free (MTD name auto-completion has been added with do_mtd_name_complete()) Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v3: - Add Tom's R-b Changes in v2: - Adjust based on changes done

[U-Boot] [PATCH v3 3/6] common: command: Rework the 'cmd is repeatable' logic

2018-12-03 Thread Boris Brezillon
entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v3: - Add Tom's R-b Changes in v2: - New patch --- cmd/dtimg.c | 2 +- cmd/help.c| 2 +- cmd/mmc.c | 4 ++-

[U-Boot] [PATCH v3 1/6] common: command: Fix command auto-completion

2018-12-03 Thread Boris Brezillon
line instead of trying to suffix the last valid argument with missing chars. Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v3: - Add Tom's R-b Changes in v2: - None --- common/command.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git

[U-Boot] [PATCH v3 2/6] common: command: Expose a generic helper to auto-complete sub commands

2018-12-03 Thread Boris Brezillon
() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon Reviewed-by: Tom Rini --- Changes in v3: - Add Tom's R-b Changes in v2: - None --- common/command.c | 20 include/command.h | 3 +++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --gi

[U-Boot] [PATCH v3 0/6] cmd: Simplify support for sub-commands

2018-12-03 Thread Boris Brezillon
Hello, Here is the 3nd version of the sub-cmd patchset. This version fixes a few typos in commit messages. Regards, Boris Boris Brezillon (6): common: command: Fix command auto-completion common: command: Expose a generic helper to auto-complete sub commands common: command: Rework the

[U-Boot] [PATCH v4 08/11] mtd: Make sure we don't parse MTD partitions belonging to another dev

2018-12-02 Thread Boris Brezillon
The mtdparts variable might contain partition definitions for several MTD devices. Each partition layout is separated by a ';', so let's make sure we don't pick a wrong name when mtdparts is malformed. Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") S

[U-Boot] [PATCH v4 09/11] mtd: Don't stop MTD partition creation when it fails on one device

2018-12-02 Thread Boris Brezillon
27;mtd' command") Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher --- Changes in v4: - Add T-b tag Changes in v3: - None Changes in v2: - New patch Changes in v3: - Re-create partitions when our last attempt do delete all existing parts failed. This way we can update parts af

[U-Boot] [PATCH v4 11/11] mtd: sf: Make sf_mtd.c more robust

2018-12-02 Thread Boris Brezillon
ns we also reset sf_mtd_info.priv to NULL, and check for NULL pointer in the mtd hooks so that -ENODEV is returned instead of hitting a NULL pointer dereference exception when the MTD instance is later accessed by a user. Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher --- Changes

[U-Boot] [PATCH v4 10/11] mtd: sf: Unregister the MTD device prior to removing the spi_flash obj

2018-12-02 Thread Boris Brezillon
()). Implement ->remove() and call spi_flash_mtd_unregister() from there. Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver") Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher Reviewed-by: Jagan Teki --- Changes in v4: - Add T-b/R-b tags Changes in v3: - New patch --- dr

[U-Boot] [PATCH v4 04/11] mtd: sf: Make sure we don't register the same device twice

2018-12-02 Thread Boris Brezillon
i: Add MTD layer driver") Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher Reviewed-by: Jagan Teki --- Changes in v4: - Add T-b/R-b tags Changes in v3: - None Changes in v2 - None --- drivers/mtd/spi/sf_mtd.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff

[U-Boot] [PATCH v4 06/11] mtd: Be more strict on the "mtdparts=" prefix check

2018-12-02 Thread Boris Brezillon
strstr() does not guarantee that the string we're searching for is placed at the beginning. Use strncmp() instead. Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher --- Changes in v4: - Add T-b tag Changes in

[U-Boot] [PATCH v4 05/11] mtd: Use get_mtdids() instead of env_get("mtdids") in mtd_search_alternate_name()

2018-12-02 Thread Boris Brezillon
The environment is not guaranteed to contain a valid mtdids variable when called from mtd_search_alternate_name(). Call get_mtdids() instead of env_get("mtdids"). Fixes: ff4afa8a981e ("mtd: uboot: search for an equivalent MTD name with the mtdids") Signed-off-by: Boris Br

[U-Boot] [PATCH v4 07/11] mtd: Make sure the name passed in mtdparts fits in mtd_name[]

2018-12-02 Thread Boris Brezillon
The local mtd_name[] variable is limited in size. Return an error if the name passed in mtdparts does not fit in this local var. Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher --- Changes in v4: - Add T-b tag C

[U-Boot] [PATCH v4 01/11] mtd: Add a function to report when the MTD dev list has been updated

2018-12-02 Thread Boris Brezillon
function returning the value of this field and resetting it to false. Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher --- Changes in v4: - Add T-b tag Changes in v2: - None Changes in v2: - None --- drivers/mtd/mtdcore.c | 16 +++- include/linux/mtd/mtd.h | 1 + 2 files cha

[U-Boot] [PATCH v4 03/11] mtd: Delete partitions attached to the device when a device is deleted

2018-12-02 Thread Boris Brezillon
If we don't do that, partitions might still be exposed while the underlying device is gone. Fixes: 2a74930da57f ("mtd: mtdpart: implement proper partition handling") Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher --- Changes in v4: - Test the del_mtd_partitions

[U-Boot] [PATCH v4 02/11] mtd: Parse mtdparts/mtdids again when the MTD list has been updated

2018-12-02 Thread Boris Brezillon
Updates to the MTD device list should trigger a new parsing of the mtdids/mtdparts vars even if those vars haven't changed. Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Signed-off-by: Boris Brezillon Tested-by: Heiko Schocher --- Changes in v4: - Add T-b t

[U-Boot] [PATCH v4 00/11] mtd/sf: Various fixes

2018-12-02 Thread Boris Brezillon
Hello, This is the 4th version of the mtd / sf fixes patchset. This v4 just adds a new check in del_mtd_device() (and a debug() when del_mtd_partitions() fails). Regards, Boris P.S.: travis-ci results => https://travis-ci.org/bbrezillon/u-boot/builds/461943011 Boris Brezillon

Re: [U-Boot] [RFC PATCH 1/6] mtd: spi: Port SPI NOR framework from Linux

2018-11-29 Thread Boris Brezillon
On Thu, 29 Nov 2018 22:56:04 +0530 Vignesh R wrote: > > >> +const struct flash_info spi_nor_ids[] = { > >> +#ifdef CONFIG_SPI_FLASH_ATMEL /* ATMEL */ > >> + /* Atmel -- some are (confusingly) marketed as "DataFlash" */ > >> + { "at26df321", INFO(0x1f4700, 0, 64 * 1024, 64, SECT_4K

Re: [U-Boot] [RFC PATCH 1/6] mtd: spi: Port SPI NOR framework from Linux

2018-11-29 Thread Boris Brezillon
On Wed, 28 Nov 2018 22:56:02 +0530 Vignesh R wrote: > +#if defined(CONFIG_DM_SPI) && defined(CONFIG_SPI_MEM) > +#define spi_nor_mem_exec_op spi_mem_exec_op > +#else > +/* > + * This function is to support transition to DM_SPI. Will be removed > + * once all boards are converted to DM_SPI > + */ >

Re: [U-Boot] [PATCH v2 0/6] cmd: Simplify support for sub-commands

2018-11-29 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:39:15 +0100 Boris Brezillon wrote: > Hello, > > Here is the 2nd version of the sub-cmd patchset. This version > simplifies the sub-cmd declaration syntax and allows per > sub-cmd maxargs and repeatable check. > > I also added a patch showing how si

Re: [U-Boot] [PATCH v2 4/6] command: commands: Add macros to declare commands with subcmds

2018-11-29 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:39:19 +0100 Boris Brezillon wrote: > Most cmd/xxx.c source files expose several commands through a single > entry point. Some of them are doing the sub-command parsing manually in > their do_() function, others are declaring a table of sub-commands >

Re: [U-Boot] [PATCH v2 2/6] common: command: Expose a generic helper to auto-complete sub commands

2018-11-29 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:39:17 +0100 Boris Brezillon wrote: > Some commands have a table of sub-commands. With a minor adjustments, ^ s/a// > complete_cmdv() is able to provide auto-completion for sub-commands > (it's just abo

Re: [U-Boot] [PATCH v2 01/24] Makefile: move MTD-related lines in coherent Makefiles

2018-11-29 Thread Boris Brezillon
On Thu, 29 Nov 2018 10:16:50 +0100 Miquel Raynal wrote: > Hi Boris, > > Boris Brezillon wrote on Thu, 29 Nov 2018 > 00:46:23 +0100: > > > On Thu, 29 Nov 2018 00:07:37 +0100 > > Miquel Raynal wrote: > > > > > > > --- a/drivers/Makefile

Re: [U-Boot] [PATCH v2 24/24] mtd: drop CONFIG_MTD_PARTITIONS

2018-11-28 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:08:00 +0100 Miquel Raynal wrote: > There is no point in compiling mtdparts.c only in certain > circumstances. Whether MTD is needed and it will be built, or MTD is > not needed and the file will be ignored. You're overlooking the image size constraint. Some might want to h

Re: [U-Boot] [PATCH v2 22/24] cmd: make all MTD commands depend on MTD

2018-11-28 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:07:58 +0100 Miquel Raynal wrote: > Defconfigs have been fixed, now we can add proper dependencies in > Kconfig. > > Signed-off-by: Miquel Raynal > --- > cmd/Kconfig | 8 +++- > drivers/mtd/Kconfig | 1 + > 2 files changed, 8 insertions(+), 1 deletion(-) > >

Re: [U-Boot] [PATCH v2 18/24] mtd: rawnand: compile-in the NAND core

2018-11-28 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:07:54 +0100 Miquel Raynal wrote: > The NAND core should be selected by both SPI NAND and raw NAND > drivers. > > Signed-off-by: Miquel Raynal > --- > drivers/mtd/nand/raw/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mtd/nand/raw/Kconfig b/d

Re: [U-Boot] [PATCH v2 07/24] mtd: ensure MTD is compiled when there is a SPI NOR flash

2018-11-28 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:07:43 +0100 Miquel Raynal wrote: > MTD must be enabled when there is a SPI NOR flash. Not sure this is required, as the SF layer is mostly independent from the MTD layer, except for the sf_mtd.c portion. It's probably safer to only enable CONFIG_MTD when CONFIG_SPI_FLASH_M

Re: [U-Boot] [PATCH v2 04/24] mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD

2018-11-28 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:07:40 +0100 Miquel Raynal wrote: > Like in Linux, just use CONFIG_MTD to copile the MTD stack. ^ compile > > Signed-off-by: Miquel Raynal ___ U-Boot mailing list U-Boot@lists.denx.de htt

Re: [U-Boot] [PATCH v2 01/24] Makefile: move MTD-related lines in coherent Makefiles

2018-11-28 Thread Boris Brezillon
On Thu, 29 Nov 2018 00:07:37 +0100 Miquel Raynal wrote: > --- a/drivers/Makefile > +++ b/drivers/Makefile > @@ -6,7 +6,7 @@ obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ > sysreset/ firmware/ > obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/ > obj-$(CONFIG_$(SPL_TPL_)LED) += led/ > obj

[U-Boot] [PATCH v2 6/6] cmd: adc: Use the sub-command infrastructure

2018-11-28 Thread Boris Brezillon
And you get sub-command auto-completion for free. Signed-off-by: Boris Brezillon --- cmd/adc.c | 31 --- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/cmd/adc.c b/cmd/adc.c index c8857ed147e7..5f06f361b642 100644 --- a/cmd/adc.c +++ b/cmd/adc.c

[U-Boot] [PATCH v2 5/6] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands

2018-11-28 Thread Boris Brezillon
It's way simpler this way, and we also gain auto-completion support for free (MTD name auto-completion has been added with do_mtd_name_complete()) Signed-off-by: Boris Brezillon --- Changes in v2: - Drop maxargs arg --- cmd/mtd.c | 476

  1   2   3   4   >