Re: [PATCH v5 3/6] clk: Move all drivers to use internal API

2014-08-13 Thread Boris BREZILLON
t introduces > the implementation of the new functions is to separate the changes generated > with Coccinelle from the rest, and keep the patches' size reasonable. > You can add my: Tested-by: Boris Brezillon and Acked-by: Boris Brezillon for the at91 part. > Signed-off-by

Re: [PATCH][v3] mtd/ifc: Add support for IFC controller version 2.0

2016-04-07 Thread Boris Brezillon
inux-...@lists.infradead.org; linuxppc-dev ; > > Prabhakar Kushwaha ; Raghav Dogra > > ; Jaiprakash Singh ; Boris > > Brezillon > > Subject: Re: [PATCH][v3] mtd/ifc: Add support for IFC controller version 2.0 > > > > Hi, > > > > On Wed, Mar 30, 201

Re: [PATCH V2] mtd: nand: pasemi: switch to pr_* functions

2016-04-13 Thread Boris Brezillon
d, NULL, 0)) { > > - printk(KERN_ERR "pasemi_nand: Unable to register MTD > > device\n"); > > + pr_err("Unable to register MTD device\n"); > > And why not to use dev_err(&ofdev->dev, …); ? Yep, I think it's better to use dev_err(). Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH V3] mtd: nand: pasemi: switch to dev_* printing functions

2016-04-13 Thread Boris Brezillon
ERR "pasemi_nand: Unable to register MTD device\n"); > + dev_err(dev, "Unable to register MTD device\n"); > err = -ENODEV; > goto out_lpc; > } > > - printk(KERN_INFO "PA Semi

Re: [PATCH] mtd: powernv: SPDX and comment fixups

2019-02-07 Thread Boris Brezillon
Hello Joel, On Wed, 6 Feb 2019 11:06:58 +1030 Joel Stanley wrote: > This converts the powernv flash driver to use SPDX, and adds some > clarifying comments that came out of a discussion on how the mtd driver > works. Can you split that in 2 patches, one adding the SPDX header, and the other on

Re: [PATCH v3 1/2] drivers/mtd: Use mtd->name when registering nvmem device

2019-02-10 Thread Boris Brezillon
Hello Aneesh, On Fri, 8 Feb 2019 20:44:18 +0530 "Aneesh Kumar K.V" wrote: > With this patch, we use the mtd->name instead of concatenating the name with > '0' > > Fixes: c4dfa25ab307 ("mtd: add support for reading MTD devices via the nvmem > API") > Signed-off-by: Aneesh Kumar K.V You forg

Re: [PATCH v3 1/2] drivers/mtd: Use mtd->name when registering nvmem device

2019-02-11 Thread Boris Brezillon
On Mon, 11 Feb 2019 16:26:38 +0530 "Aneesh Kumar K.V" wrote: > On 2/10/19 6:25 PM, Boris Brezillon wrote: > > Hello Aneesh, > > > > On Fri, 8 Feb 2019 20:44:18 +0530 > > "Aneesh Kumar K.V" wrote: > > > >> With this patch, we use

Re: [PATCH v3 2/2] drivers/mtd: Fix device registration error

2019-02-13 Thread Boris Brezillon
Subject prefix should be "mtd: powernv_flash: " On Mon, 11 Feb 2019 19:03:38 +0530 "Aneesh Kumar K.V" wrote: > This change helps me to get multiple mtd device registered. Without this > I get > > sysfs: cannot create duplicate filename '/bus/nvmem/devices/flash0' > CPU: 0 PID: 1 Comm: swapper/0

Re: [v3,2/2] drivers/mtd: Fix device registration error

2019-02-14 Thread Boris Brezillon
From: Boris Brezillon On Mon, 2019-02-11 at 13:33:38 UTC, "Aneesh Kumar K.V" wrote: > This change helps me to get multiple mtd device registered. Without this > I get > > sysfs: cannot create duplicate filename '/bus/nvmem/devices/flash0' > CPU: 0 PID: 1 Co

Re: [v3, 1/2] drivers/mtd: Use mtd->name when registering nvmem device

2019-02-14 Thread Boris Brezillon
From: Boris Brezillon On Mon, 2019-02-11 at 13:33:37 UTC, "Aneesh Kumar K.V" wrote: > With this patch, we use the mtd->name instead of concatenating the name with > '0' > > Fixes: c4dfa25ab307 ("mtd: add support for reading MTD devices via the nvmem &

Re: [PATCH] mtd: powernv_flash: set of_node in mtd's dev

2018-07-18 Thread Boris Brezillon
On Fri, 13 Jul 2018 10:15:59 +0200 Rafał Miłecki wrote: > From: Rafał Miłecki > > This enables some features implemented in mtd subsystem like reading > label and partitioning info from DT. > > Reported-by: Timothy Pearson > Signed-off-by: Rafał Miłecki Applied. Thanks, Boris > --- > dr

Re: [PATCH 10/10] dt-bindings: mtd: fsl-upm-nand: Deprecate chip-delay and fsl,upm-wait-flags

2020-06-03 Thread Boris Brezillon
And I forgot to Cc the DT maintainer/ML on this one :-/ On Wed, 3 Jun 2020 15:49:22 +0200 Boris Brezillon wrote: > Those properties are no longer parsed by the driver which is being passed > those information by the core now. Let's deprecate them. > > Signed-off-by

[PATCH 05/10] mtd: rawnand: fsl_upm: Use platform_get_resource() + devm_ioremap_resource()

2020-06-03 Thread Boris Brezillon
Replace the of_address_to_resource() + devm_ioremap() calls by platform_get_resource() + devm_ioremap_resource() ones which allows us to get rid of one error message since devm_ioremap_resource() already takes care of that. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 23

[PATCH 06/10] mtd: rawnand: fsl_upm: Use gpio descriptors

2020-06-03 Thread Boris Brezillon
n the init error path and in the remove function. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 44 -- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c index 54851e9

[PATCH 02/10] mtd: rawnand: fsl_upm: Get rid of the unused fsl_upm_nand.parts field

2020-06-03 Thread Boris Brezillon
fsl_upm_nand.parts is unused, let's get rid of it. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c index 76d1032cd35e..6eba2f4a2f5a 100644 --- a/drivers/mtd

[PATCH 00/10] mtd: rawnand: fsl_upm: Convert to exec_op() (and more)

2020-06-03 Thread Boris Brezillon
onsider removing the driver instead. Regards, Boris Boris Brezillon (10): mtd: rawnand: fsl_upm: Remove unused mtd var mtd: rawnand: fsl_upm: Get rid of the unused fsl_upm_nand.parts field mtd: rawnand: fsl_upm: Allocate the fsl_upm_nand object using devm_kzalloc() mtd: rawnand: fsl_upm

[PATCH 09/10] mtd: rawnand: fsl_upm: Get rid of the legacy interface implementation

2020-06-03 Thread Boris Brezillon
Now that the driver implements exec_op(), we can get rid of the legacy interface implementation. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 133 - 1 file changed, 133 deletions(-) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd

[PATCH 01/10] mtd: rawnand: fsl_upm: Remove unused mtd var

2020-06-03 Thread Boris Brezillon
The mtd var in fun_wait_rnb() is now unused, let's get rid of it and fix the warning resulting from this unused var. Fixes: 50a487e7719c ("mtd: rawnand: Pass a nand_chip object to chip->dev_ready()") Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 1 -

[PATCH 07/10] mtd: rawnand: fsl_upm: Inherit from nand_controller

2020-06-03 Thread Boris Brezillon
Explicitly inherit from nand_controller instead of relying on the nand_chip.legacy.dummy_controller field. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c

[PATCH 08/10] mtd: rawnand: fsl_upm: Implement exec_op()

2020-06-03 Thread Boris Brezillon
Implement exec_op() so we can get rid of the legacy interface implementation. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c

[PATCH 03/10] mtd: rawnand: fsl_upm: Allocate the fsl_upm_nand object using devm_kzalloc()

2020-06-03 Thread Boris Brezillon
This simplifies the init error patch and remove function. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c index 6eba2f4a2f5a

[PATCH 04/10] mtd: rawnand: fsl_upm: Use devm_kasprintf() to allocate the MTD name

2020-06-03 Thread Boris Brezillon
This simplifies the init() error path and the remove() handler. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/fsl_upm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c index 9cf79c62ef22

[PATCH 10/10] dt-bindings: mtd: fsl-upm-nand: Deprecate chip-delay and fsl, upm-wait-flags

2020-06-03 Thread Boris Brezillon
Those properties are no longer parsed by the driver which is being passed those information by the core now. Let's deprecate them. Signed-off-by: Boris Brezillon --- Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [PATCH 04/10] mtd: rawnand: fsl_upm: Use devm_kasprintf() to allocate the MTD name

2020-06-03 Thread Boris Brezillon
On Wed, 3 Jun 2020 15:55:31 +0200 Miquel Raynal wrote: > Boris Brezillon wrote on Wed, 3 Jun > 2020 15:49:16 +0200: > > > This simplifies the init() error path and the remove() handler. > > > > Signed-off-by: Boris Brezillon > > --- > > drivers/mtd

Re: [PATCH 05/10] mtd: rawnand: fsl_upm: Use platform_get_resource() + devm_ioremap_resource()

2020-06-03 Thread Boris Brezillon
On Wed, 3 Jun 2020 15:58:02 +0200 Miquel Raynal wrote: > Boris Brezillon wrote on Wed, 3 Jun > 2020 15:49:17 +0200: > > > Replace the of_address_to_resource() + devm_ioremap() calls by > > platform_get_resource() + devm_ioremap_resource() ones which allows us > &

Re: [PATCH v4 01/10] mtd: powernv_flash: Use WARN_ON_ONCE() rather than BUG_ON()

2017-10-30 Thread Boris Brezillon
f the system. > > Signed-off-by: Cyril Bur Acked-by: Boris Brezillon > --- > drivers/mtd/devices/powernv_flash.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mtd/devices/powernv_flash.c > b/drivers/mtd/devices/powernv_flash.c > index f5

Re: [PATCH v4 02/10] mtd: powernv_flash: Don't treat OPAL_SUCCESS as an error

2017-10-30 Thread Boris Brezillon
n error rather we should wrap up and return promptly to > the caller. > > Signed-off-by: Cyril Bur Acked-by: Boris Brezillon > --- > I'll note here that currently no OPAL exists that will return > OPAL_SUCCESS so there isn't the possibility of a bug today. >

Re: [PATCH v4 03/10] mtd: powernv_flash: Remove pointless goto in driver init

2017-10-30 Thread Boris Brezillon
On Tue, 10 Oct 2017 14:32:55 +1100 Cyril Bur wrote: Can you please add a short description here? Once done you can add Acked-by: Boris Brezillon > Signed-off-by: Cyril Bur > --- > drivers/mtd/devices/powernv_flash.c | 16 ++-- > 1 file changed, 6 insertions(+),

Re: [PATCH v4 04/10] mtd: powernv_flash: Don't return -ERESTARTSYS on interrupted token acquisition

2017-10-30 Thread Boris Brezillon
e what to do. > > Signed-off-by: Cyril Bur Acked-by: Boris Brezillon > --- > drivers/mtd/devices/powernv_flash.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/mtd/devices/powernv_flash.c > b/drivers/mtd/devices/powernv_flash.c > index 4d

Re: [PATCH v4 10/10] mtd: powernv_flash: Use opal_async_wait_response_interruptible()

2017-10-30 Thread Boris Brezillon
comments (see below). Once addressed you can add Acked-by: Boris Brezillon > --- > drivers/mtd/devices/powernv_flash.c | 57 > +++-- > 1 file changed, 35 insertions(+), 22 deletions(-) > > diff --git a/drivers/mtd/devices/powernv_flash.c &g

Re: [PATCH v4 00/10] Allow opal-async waiters to get interrupted

2017-10-30 Thread Boris Brezillon
On Tue, 10 Oct 2017 14:32:52 +1100 Cyril Bur wrote: > V4: Rework and rethink. > > To recap: > Userspace MTD read()s/write()s and erases to powernv_flash become > calls into the OPAL firmware which subsequently handles flash access. > Because the read()s, write()s or erases can be large (bounded

Re: ubi_io_read: error -74 (ECC error)

2017-01-06 Thread Boris Brezillon
Hi Raghavan, On Fri, 6 Jan 2017 10:07:29 + "Anurag Raghavan (RBEI/ETW11)" wrote: > Hi All, > > My appdata partition could not be mounted or where the partition was not able > to be used. Anyone can help me to find out the root cause of this. What are > the possibilities of this ubifs corr

Re: [PATCH] mtd/ifc: Fix location of eccstat registers for IFC V1.0

2017-01-24 Thread Boris Brezillon
On Tue, 24 Jan 2017 12:01:22 +0100 wrote: > From: Mark Marshall > > The commit 7a654172161c ("mtd/ifc: Add support for IFC controller > version 2.0") added support for version 2.0 of the IFC controller. > The version 2.0 controller has the ECC status registers at a different > location to the p

Re: [PATCH V2] mtd/ifc: Fix location of eccstat registers for IFC V1.0

2017-02-06 Thread Boris Brezillon
On Thu, 26 Jan 2017 16:18:27 +0100 wrote: > From: Mark Marshall > > The commit 7a654172161c ("mtd/ifc: Add support for IFC controller > version 2.0") added support for version 2.0 of the IFC controller. > The version 2.0 controller has the ECC status registers at a different > location to the p

[PATCH 2/5] mtd: Get rid of unused fields in struct erase_info

2018-02-12 Thread Boris Brezillon
Some fields are not used by MTD drivers, users or core code. Moreover, those fields are not documented, so get rid of them to avoid any confusion. Signed-off-by: Boris Brezillon --- include/linux/mtd/mtd.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/mtd/mtd.h b/include

[PATCH 1/5] mtd: Initialize ->fail_addr early in mtd_erase()

2018-02-12 Thread Boris Brezillon
mtd_erase() can return an error before ->fail_addr is initialized to MTD_FAIL_ADDR_UNKNOWN. Move this initialization at the very beginning of the function. Signed-off-by: Boris Brezillon --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/

[PATCH 0/5] mtd: Simplify erase handling

2018-02-12 Thread Boris Brezillon
sistent and allows us to get rid of a few hundred lines of code. Regards, Boris Boris Brezillon (5): mtd: Initialize ->fail_addr early in mtd_erase() mtd: Get rid of unused fields in struct erase_info mtd: Stop assuming mtd_erase() is asynchronous mtd: Unconditionally update ->fail_a

[PATCH 4/5] mtd: Unconditionally update ->fail_addr and ->addr in part_erase()

2018-02-12 Thread Boris Brezillon
rase_info->callback() and are thus only taking the ->addr_fail and ->addr fields into account after part_erase() has returned. While we're at it, get rid of the erase_info->mtd field which was only needed to let mtd_erase_callback() get the partition device back. Signed-off-by: Boris B

[PATCH 3/5] mtd: Stop assuming mtd_erase() is asynchronous

2018-02-12 Thread Boris Brezillon
None of the mtd->_erase() implementations work in an asynchronous manner, so let's simplify MTD users that call mtd_erase(). All they need to do is check the value returned by mtd_erase() and assume that != 0 means failure. Signed-off-by: Boris Brezillon --- drivers/mtd/devices/bcm47xx

[PATCH 5/5] mtd: Stop updating erase_info->state and calling mtd_erase_callback()

2018-02-12 Thread Boris Brezillon
>state field, all MTD_ERASE_XXX definitions and the mtd_erase_callback() function. Signed-off-by: Boris Brezillon --- drivers/mtd/chips/cfi_cmdset_0001.c | 16 ++-- drivers/mtd/chips/cfi_cmdset_0002.c | 26 +++--- drivers/mtd/chips/cfi_cmdset_0020.c

Re: [PATCH 5/5] mtd: Stop updating erase_info->state and calling mtd_erase_callback()

2018-02-13 Thread Boris Brezillon
e->state = MTD_ERASE_DONE; > > - } > > - mtd_erase_callback(erase); > > + > > return rc; > > } > > > > diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c > > index 0ec85f316d24..2f05e1801047 100644 > > --- a/drivers/mtd/devices/slram.c > > +++ b/drivers/mtd/devices/slram.c > > @@ -88,8 +88,6 @@ static int slram_erase(struct mtd_info *mtd, struct > > erase_info *instr) > > * I don't feel at all ashamed. This kind of thing is possible anyway > > * with flash, but unlikely. > > */ > > Same with this comment. Actually, I'm not sure I understand that comment, but I guess it's talking about races between read/write and erase paths, so nothing related to the changed I'm doing here. > > > - instr->state = MTD_ERASE_DONE; > > - mtd_erase_callback(instr); > > Space ? > > > return(0); > > } > > > > > > -- Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com

Re: [PATCH 1/5] mtd: Initialize ->fail_addr early in mtd_erase()

2018-03-18 Thread Boris Brezillon
On Mon, 12 Feb 2018 22:03:07 +0100 Boris Brezillon wrote: > mtd_erase() can return an error before ->fail_addr is initialized to > MTD_FAIL_ADDR_UNKNOWN. Move this initialization at the very beginning > of the function. Applied the patchset after addressing Miquel's comments.

Re: [PATCH 00/22] mtd: nand: return error code of nand_scan(_ident,_tail) on error

2016-11-06 Thread Boris Brezillon
On Fri, 4 Nov 2016 19:42:48 +0900 Masahiro Yamada wrote: > nand_scan(), nand_scan_ident(), nand_scan_tail() return > an appropriate negative value on error. > > Most of drivers return the value from them on error, > but some of them return the fixed error code -ENXIO > (and a few return -ENODEV

Re: [PATCH][v3] mtd/ifc: Add support for IFC controller version 2.0

2016-05-25 Thread Boris Brezillon
On Wed, 25 May 2016 14:18:43 -0500 Leo Li wrote: > On Thu, Apr 7, 2016 at 7:45 PM, Boris Brezillon > wrote: > > On Wed, 6 Apr 2016 18:53:39 + > > Yang-Leo Li wrote: > > > >> > >> > >> > -Original Message- > &g

Re: [PATCH][v3] mtd/ifc: Add support for IFC controller version 2.0

2016-05-27 Thread Boris Brezillon
Hi Leo, On Fri, 27 May 2016 15:15:00 -0500 Leo Li wrote: > On Wed, May 25, 2016 at 3:34 PM, Boris Brezillon > wrote: > > On Wed, 25 May 2016 14:18:43 -0500 > > Leo Li wrote: > > > >> On Thu, Apr 7, 2016 at 7:45 PM, Boris Brezillon > >> wrote:

Re: [PATCH][v3] mtd/ifc: Add support for IFC controller version 2.0

2016-05-27 Thread Boris Brezillon
On Fri, 27 May 2016 14:12:47 -0700 Brian Norris wrote: > > > Anyway, Brian, can you take it into your tree and make it appear in > > -rc1 (or earlier if it's still possible)? > > Not sure how I could get it any "earlier"? It's not making -rc1 at t

Re: [PATCH][v2] driver/memory: Update dependency of IFC for Layerscape

2016-07-04 Thread Boris Brezillon
+PPC maintainers. Hi Raghav, Since you're touching powerpc drivers, the least you could do is add ppc maintainers in Cc, so that they can ack/review your patch... On Fri, 1 Jul 2016 21:32:30 +0530 Raghav Dogra wrote: > This patch enables IFC NAND support on ARM layerscape platform. > It fixes

[PATCH] mtd: nand: Rename nand.h into rawnand.h

2017-08-04 Thread Boris Brezillon
function prototypes. Signed-off-by: Boris Brezillon Signed-off-by: Peter Pan Cc: Jonathan Corbet Cc: Sekhar Nori Cc: Kevin Hilman Cc: Jason Cooper Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Cc: Hartley Sweeten Cc: Alexander Sverdlin Cc: Shawn Guo Cc: Sascha Hauer Cc

[PATCH] mtd: nand: Rename nand.h into rawnand.h

2017-08-04 Thread Boris Brezillon
function prototypes. Signed-off-by: Boris Brezillon Signed-off-by: Peter Pan Cc: Jonathan Corbet Cc: Sekhar Nori Cc: Kevin Hilman Cc: Jason Cooper Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Cc: Hartley Sweeten Cc: Alexander Sverdlin Cc: Shawn Guo Cc: Sascha Hauer Cc

Re: [PATCH] mtd: nand: Rename nand.h into rawnand.h

2017-08-21 Thread Boris Brezillon
Le Fri, 4 Aug 2017 17:29:09 +0200, Boris Brezillon a écrit : > We are planning to share more code between different NAND based > devices (SPI NAND, OneNAND and raw NANDs), but before doing that > we need to move the existing include/linux/mtd/nand.h file into > include/linux/mtd/raw