[U-Boot] Hang when enabling DCache on a iMX6 board

2015-02-03 Thread Boris Brezillon
has any idea of what could cause this. Here is my public repository containing two branches [1], the seco-mainline branch contains my port based on the master branch and the seco-2014.04 contains the same work based on the 2014.04 tag. Best Regards, Boris [1]https://github.com/bbrezillon/u-

Re: [U-Boot] Hang when enabling DCache on a iMX6 board

2015-02-04 Thread Boris Brezillon
Hi Anatolij, On Tue, 3 Feb 2015 20:17:36 +0100 Anatolij Gustschin wrote: > Hello Boris, > > On Tue, 3 Feb 2015 19:39:16 +0100 > Boris Brezillon wrote: > > > Hello, > > > > I'm currently porting the SECO iMX6 uQ7 board to mainline, but I&#x

[U-Boot] [PATCH 1/3] ARM: mx6: move to a standard arch/board approach

2015-02-16 Thread Boris Brezillon
by creating a Kconfig under arch/arm/cpu/armv7/mx6 and a new ARCH_MX6 option. Existing MX6 board definitions should be moved in this new Kconfig in choice menu, and new boards should be directly declared in this menu. Signed-off-by: Boris Brezillon --- arch/arm/Kconfig | 6

[U-Boot] [PATCH 2/3] ARM: iMX: define an IMX_CONFIG Kconfig option

2015-02-16 Thread Boris Brezillon
: Boris Brezillon --- arch/arm/Kconfig| 2 ++ arch/arm/imx-common/Kconfig | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 arch/arm/imx-common/Kconfig diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7984bef..429a6cc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig

[U-Boot] [PATCH 3/3] board/seco: Add mx6q-uq7 basic board support

2015-02-16 Thread Boris Brezillon
Add basic SECO MX6Q/uQ7 board support (Ethernet, UART, SD are supported). It also adds a Kconfig skeleton to later add more SECO board (supporting SoC and board variants). Signed-off-by: Boris Brezillon --- arch/arm/cpu/armv7/mx6/Kconfig| 11 +++ board/seco/Kconfig| 63

[U-Boot] [PATCH 0/3] board/seco: Add mx6q-uq7 basic board support

2015-02-16 Thread Boris Brezillon
ition in each board config header Let me know if there already is some WIP to address those issues. The last patch adds basic support for the mx6q/uq7 SECO board, and a sane Kconfig skeleton for other SoC (Q, DL and S) and board (uQ7, Q7 and uSBC) variants. Best Regards, Boris Boris Brezill

[U-Boot] [PATCH] mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC

2014-09-02 Thread Boris BREZILLON
Disable subpage write when using PMECC to prevent buggy partial page write. This fix has been taken from linux sources (see commit 90445ff6241e2a13445310803e2efa606c61f276) Signed-off-by: Boris BREZILLON --- Hi, Here is a link to the linux commit: https://git.kernel.org/cgit/linux/kernel/git

Re: [U-Boot] [PATCH] net: macb: write mac address when initialization

2014-10-22 Thread Boris Brezillon
information. > > With this patch, it will exit directly with following information: > "gmac0: mac address is not valid" > > It also solve the problem after bootup then set mac address and the > mac address won't set to net device issue. > > Signed-off-by:

Re: [U-Boot] ARM: sunxi: Experiences NAND flash

2015-08-17 Thread Boris Brezillon
e of a program operation), and I can confirm SLC mode address the problem. Anyway, remember that MLC NANDs have other sources of unreliability (e.g the unstable bits problem). Best Regards, Boris [1]http://events.linuxfoundation.org/sites/events/files/slides/brezillon-mlc-nand_0.pdf -- Boris Brez

Re: [U-Boot] [linux-sunxi] ARM: sunxi: Experiences NAND flash

2015-08-17 Thread Boris Brezillon
/dev/mtd0 u-boot-sunxi-with-spl.bin Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] ARM: sunxi: Experiences NAND flash

2015-08-17 Thread Boris Brezillon
Hi Roy, On Mon, 17 Aug 2015 09:30:38 +0100 Roy Spliet wrote: > Hello, > > Reply in-line > > Op 17-08-15 om 08:34 schreef Boris Brezillon: > > Hi Oliver, > > > > Sorry for the late reply (I was in vacation for the last 2 weeks) > > > > On Tue, 11

Re: [U-Boot] [PATCH v2 1/3] sunxi: nand: Add basic sunxi NAND driver for SPL with DMA support

2015-07-22 Thread Boris Brezillon
Hi Piotr, On Wed, 22 Jul 2015 13:27:37 +0200 Piotr Zierhoffer wrote: > Hi Boris, > > thanks for your review. I have applied most of your comments, but I > have few remarks and questions. > > 2015-07-20 18:13 GMT+02:00 Boris Brezillon > : > &

Re: [U-Boot] [PATCH v3 2/4] sunxi: nand: Add basic sunxi NAND driver for SPL with DMA support

2015-07-31 Thread Boris Brezillon
at a number of fixed addresses at the beginningen of the nand, > so we should do the same looking for u-boot.bin at those same > addresses (taking into account that u-boot.bin will be written > after the SPL). Yes that's a solution: putting the u-boot binary in 2 (or more) distinc

Re: [U-Boot] [PATCH v3 2/4] sunxi: nand: Add basic sunxi NAND driver for SPL with DMA support

2015-07-31 Thread Boris Brezillon
Hi Michal, On Fri, 31 Jul 2015 16:25:00 +0200 Michal Suchanek wrote: > On 31 July 2015 at 11:24, Boris Brezillon > wrote: > > Hi Hans, > > > > On Fri, 31 Jul 2015 10:36:43 +0200 > > Hans de Goede wrote: > > > >> Hi, > >> > >> On

Re: [U-Boot] [PATCH v3 0/4] sunxi: nand: Basic NAND driver for SPL

2015-08-01 Thread Boris Brezillon
fers. It does not support writing. > > Thanks for your work on this. > > I've merged patches 1 - 3 in my sunxi-wip branch, > and I'll include them in the next u-boot-sunxi pull-req. Shouldn't we at least wait for Scoot's approval? Best Regards, Boris -- B

Re: [U-Boot] [PATCH 07/13] fastboot: Implement NAND backend

2015-09-10 Thread Boris Brezillon
so that you can properly update it with the number of skipped blocks (the same goes for the _fb_nand_write function). Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] [RFC] Sunxi NAND support for U-Boot

2015-06-14 Thread Boris Brezillon
tance in setting up and/or testing. > Thanks! That would be great to have a summary of the changelog in the cover letter (you can generate it with --cover-letter when you generate your patches using git format-patch). Best Regards, Boris -- Boris Brezillon, Free Ele

Re: [U-Boot] [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-14 Thread Boris Brezillon
s fine for testing to hand-edit the environment the final > nand support should have > > 1) way to express the boot partition size in nand pages Why should we add that ? The conversion from a number of blocks to a number bytes is pretty straightforward (number_of_blocks * block_size_in

Re: [U-Boot] [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-14 Thread Boris Brezillon
hing in Linux, we will be able to port it to u-boot and get rid of these sunxi specific command, but in the meantime this will allow us to boot a linux kernel (and even flash an SPL) from u-boot without introducing heavy changes in the u-boot MTD layer. Best Regards,

Re: [U-Boot] [RFC 08/11] mtd/nand: Add DT definitions for Olimex Lime

2015-06-14 Thread Boris Brezillon
ds table, unless you want to force something different (which doesn't seem to be the case here). Moreover, the randomizer stuff haven't been reviewed/accepted yet. To support the randomizer stuff in the meantime, you could define the randomizer-seeds table in the board config header and u

Re: [U-Boot] [RFC 07/11] mtd/nand Add Sunxi NAND driver

2015-06-14 Thread Boris Brezillon
nxi_nand_spl > - FDT parsing in-line, there's no framework method yet > I'll try to review this driver next week. -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ___ U-Boot ma

Re: [U-Boot] [RFC 07/11] mtd/nand Add Sunxi NAND driver

2015-06-14 Thread Boris Brezillon
On Sun, 14 Jun 2015 13:42:12 +0200 Boris Brezillon wrote: > On Fri, 5 Jun 2015 13:52:40 +0200 > Roy Spliet wrote: > > > Heavily based on BBrezillon's (downstream) driver. Most noticable > > differences > > - No per-partition ECC settings. Partitions in U-boo

Re: [U-Boot] [RFC 06/11] mtd/nand: Add randomisation layer

2015-06-14 Thread Boris Brezillon
inline Linux, so maybe we should keep this code in the sunxi-nand driver until it is merged in Linux. -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ___ U-Boot mailing list U-Boot@lists.denx.de http

Re: [U-Boot] [RFC 05/11] mtd/nand: take nand_ecc_ctrl initialization out of nand_scan_tail

2015-06-14 Thread Boris Brezillon
f; > + } else { > + if (!chip->buffers) > + return -ENOMEM; > + } > + > + /* Set the internal oob buffer location, just after the page data */ > + chip->oob_poi = chip->buffers->databuf + mtd->writesize; > + > + if (!chip->

Re: [U-Boot] [RFC 04/11] mtd/nand: add page status table (pst)

2015-06-14 Thread Boris Brezillon
ruct mtd_info *mtd, int page); > + > +void nand_page_set_status(struct mtd_info *mtd, int page, > + enum nand_page_status status); > + > +int nand_pst_create(struct mtd_info *mtd); > + > /** > * struct nand_buffers - buffer structure for read/write &g

Re: [U-Boot] [RFC 03/11] mtd/nand: support ONFI timing mode retrieval for non-ONFI

2015-06-14 Thread Boris Brezillon
ed by this NAND chip. > This > + * should be deduced from timings described in the > + * datasheet. > + * > */ > struct nand_flash_dev { > char *name; > @@ -842,6 +848,7 @@ struct nand_flash_dev { >

Re: [U-Boot] [linux-sunxi] Re: [RFC 02/11] mtd/nand: add ONFI timing mode to nand_timings converter

2015-06-14 Thread Boris Brezillon
yet I see no acknowledgement of that, > >> much less a statement of which version of Linux this was pulled from. > >> > >> Correct, my apologies as I should have clarified that "work by Boris > >> Brezillon" does not > >> mean "upsteam w

Re: [U-Boot] [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-14 Thread Boris Brezillon
On Sun, 14 Jun 2015 13:56:56 +0200 Michal Suchanek wrote: > On 14 June 2015 at 13:25, Boris Brezillon > wrote: > > Hi Michal, > > > > On Sun, 7 Jun 2015 18:48:26 +0200 > > Michal Suchanek wrote: > > > >> Hello, > >> > >> On 5 Jun

Re: [U-Boot] [linux-sunxi] [RFC 11/11] mtd/nand: Sunxi NAND boot partition definitions

2015-06-14 Thread Boris Brezillon
On Sun, 14 Jun 2015 19:42:58 +0200 Michal Suchanek wrote: > On 14 June 2015 at 14:18, Boris Brezillon > wrote: > > On Sun, 14 Jun 2015 13:56:56 +0200 > > Michal Suchanek wrote: > > > >> On 14 June 2015 at 13:25, Boris Brezillon > >> wrote: > >&g

Re: [U-Boot] [PATCH v2 1/3] sunxi: nand: Add basic sunxi NAND driver for SPL with DMA support

2015-07-20 Thread Boris Brezillon
at's not the case then I would recommend using the same definition since the final goal is to port the Linux driver to u-boot (I know you're just implementing the SPL part, but since you moved your code into drivers/mtd/nand/sunxi_nand* I'll have to merge the Linux implementation into

Re: [U-Boot] [PATCH v2 0/3] sunxi: nand: Basic NAND driver for SPL

2015-07-20 Thread Boris Brezillon
s > - other minor changes > - renamed defines to be more relevant > - moved Kconfig entry for the driver to drivers/mtd/nand > - reworded Kconfig entry help You also completely dropped the a20_nandread command (which is a good thing IMHO), right ? Best Regards, Boris -- Boris Brezi

Re: [U-Boot] [PATCH 3/3] board/seco: Add mx6q-uq7 basic board support

2015-03-02 Thread Boris Brezillon
Hi Stefano, On Mon, 02 Mar 2015 11:17:42 +0100 Stefano Babic wrote: > Hi Boris, > > On 16/02/2015 14:27, Boris Brezillon wrote: > > Add basic SECO MX6Q/uQ7 board support (Ethernet, UART, SD are supported). > > It also adds a Kconfig skeleton to later add more SECO board (s

[U-Boot] [PATCH v2 0/3] board/seco: Add mx6q-uq7 basic board support

2015-03-04 Thread Boris Brezillon
r the mx6q/uq7 SECO board, and a sane Kconfig skeleton for other SoC (Q, DL and S) and board (uQ7, Q7 and uSBC) variants. Best Regards, Boris Changes since v1: - fix board Makefile - add a MAINTAINERS file - fix coding style issues - add error messages where appropriate Boris Brezillon (3): ARM

[U-Boot] [PATCH v2 2/3] ARM: iMX: define an IMX_CONFIG Kconfig option

2015-03-04 Thread Boris Brezillon
: Boris Brezillon --- arch/arm/Kconfig| 2 ++ arch/arm/imx-common/Kconfig | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 arch/arm/imx-common/Kconfig diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7984bef..429a6cc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig

[U-Boot] [PATCH v2 1/3] ARM: mx6: move to a standard arch/board approach

2015-03-04 Thread Boris Brezillon
by creating a Kconfig under arch/arm/cpu/armv7/mx6 and a new ARCH_MX6 option. Existing MX6 board definitions should be moved in this new Kconfig in choice menu, and new boards should be directly declared in this menu. Signed-off-by: Boris Brezillon --- arch/arm/Kconfig | 6

[U-Boot] [PATCH v2 3/3] board/seco: Add mx6q-uq7 basic board support

2015-03-04 Thread Boris Brezillon
Add basic SECO MX6Q/uQ7 board support (Ethernet, UART, SD are supported). It also adds a Kconfig skeleton to later add more SECO board (supporting SoC and board variants). Signed-off-by: Boris Brezillon --- arch/arm/cpu/armv7/mx6/Kconfig| 11 +++ board/seco/Kconfig| 63

Re: [U-Boot] [PATCH v2 1/3] ARM: mx6: move to a standard arch/board approach

2015-03-04 Thread Boris Brezillon
On Wed, 4 Mar 2015 09:43:59 -0300 Otavio Salvador wrote: > On Wed, Mar 4, 2015 at 9:13 AM, Boris Brezillon > wrote: > > Freescale boards are currently all defined in arch/arm/Kconfig, which > > makes them hard to detect. > > Moreover the MX6 SoC variant (Q, D, DL, S, SL

Re: [U-Boot] [PATCH v2 1/3] ARM: mx6: move to a standard arch/board approach

2015-03-18 Thread Boris Brezillon
Hi Stefano, On Wed, 04 Mar 2015 16:43:44 +0100 Stefano Babic wrote: > Hi Boris, > > On 04/03/2015 13:50, Boris Brezillon wrote: > >> > > > > If that's accepted, then yes I could help moving boards from the old > > approach to the new one, though I w

Re: [U-Boot] [PATCH] ARM: at91: atmel_nand: Support flash based BBT

2015-03-20 Thread Boris Brezillon
Hi David, On Fri, 20 Mar 2015 08:27:23 +0100 David Dueck wrote: Can you add a short commit message ? Apart from that, you have my Reviewed-by: Boris Brezillon > Signed-off-by: David Dueck > CC: Boris BREZILLON > CC: Josh Wu > CC: Andreas Bießmann > CC: Scott Wood >

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

2018-11-26 Thread Boris Brezillon
Hi Jagan, On Thu, 22 Nov 2018 09:40:56 +0100 Boris Brezillon wrote: > > > + /* > > > +* Setting mtd->priv to NULL is the best we can do. Thanks to > > > that, > > > +* the MTD layer can still call mtd hooks without risking a >

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

2018-11-26 Thread Boris Brezillon
On Mon, 26 Nov 2018 16:42:48 +0530 Jagan Teki wrote: > On 26/11/18 2:12 PM, Boris Brezillon wrote: > > Hi Jagan, > > > > On Thu, 22 Nov 2018 09:40:56 +0100 > > Boris Brezillon wrote: > > > >>>> + /* > >>>> +

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

2018-11-26 Thread Boris Brezillon
On Mon, 26 Nov 2018 13:37:46 +0100 Boris Brezillon wrote: > On Mon, 26 Nov 2018 16:42:48 +0530 > Jagan Teki wrote: > > > On 26/11/18 2:12 PM, Boris Brezillon wrote: > > > Hi Jagan, > > > > > > On Thu, 22 Nov 2018 0

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

2018-11-27 Thread Boris Brezillon
On Mon, 26 Nov 2018 14:25:44 +0100 Miquel Raynal wrote: > Hi Jagan, > > Jagan Teki wrote on Mon, 26 Nov 2018 18:35:01 > +0530: > > > On 26/11/18 6:12 PM, Boris Brezillon wrote: > > > On Mon, 26 Nov 2018 13:37:46 +0100 > > > Boris Brezillon wrote: &g

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

2018-11-28 Thread Boris Brezillon
f the main one - Convert the adc command Boris Brezillon (6): common: command: Fix command auto-completion common: command: Expose a generic helper to auto-complete sub commands common: command: Rework the 'cmd is repeatable' logic command: commands: Add macros to declare comman

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

2018-11-28 Thread Boris Brezillon
line instead of trying to suffix the last valid argument with missing chars. Signed-off-by: Boris Brezillon --- common/command.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/common/command.c b/common/command.c index 2433a89e0a8e..435824356b50 100644 --- a/c

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

2018-11-28 Thread Boris Brezillon
_cmdv() as a wrapper around complete_subcmdv(). Signed-off-by: Boris Brezillon --- common/command.c | 20 include/command.h | 3 +++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/common/command.c b/common/command.c index 435824356b50..e13cb47ac18b 100644

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

2018-11-28 Thread Boris Brezillon
entry manually since it doesn't use the U_BOOT_CMD() macro. Signed-off-by: Boris Brezillon --- cmd/dtimg.c | 2 +- cmd/help.c| 2 +- cmd/mmc.c | 4 ++-- common/command.c | 36 include/command.h | 52

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

2018-11-28 Thread Boris Brezillon
-off-by: Boris Brezillon --- Changes in v2: - Remove _maxargs argument --- include/command.h | 78 +++ 1 file changed, 78 insertions(+) diff --git a/include/command.h b/include/command.h index bb93f022c514..461b17447c0d 100644 --- a/include/command.h +++ b

[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

[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

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

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 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 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 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 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 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 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 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 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] [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] [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

[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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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

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 &

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

[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

[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 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 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 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 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 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 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 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 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

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

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] [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] [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] [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] [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 > >

[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

  1   2   3   4   >