).
For those who want to see what's in the pipe, here is a branch [1]
containing all the cleanups I plan to merge.
Regards,
Boris
[1]https://github.com/bbrezillon/linux-0day/commits/nand/api-cleanup
Boris Brezillon (23):
mtd: rawnand: plat_nand: Pass a nand_chip object to all
Hi Stefan,
On Sat, 18 Aug 2018 10:30:13 +0200
Stefan Agner wrote:
> > diff --git a/drivers/mtd/nand/raw/tegra_nand.c
> > b/drivers/mtd/nand/raw/tegra_nand.c
> > index 5dcee20e2a8c..bcc3a2888c4f 100644
> > --- a/drivers/mtd/nand/raw/tegra_nand.c
> > +++ b/drivers/mtd/nand/raw/tegra_nand.c
> > @@
Hi Stefan,
On Mon, 20 Aug 2018 09:57:47 +0200
Stefan Agner wrote:
> On 19.08.2018 13:26, Boris Brezillon wrote:
> > Hi Stefan,
> >
> > On Sat, 18 Aug 2018 10:30:13 +0200
> > Stefan Agner wrote:
> >
> >> > diff --git a/drivers/mtd/nand/r
On Fri, 17 Aug 2018 18:09:00 +0200
Boris Brezillon wrote:
> Let's make the raw NAND API consistent by patching all helpers and
> hooks to take a nand_chip object instead of an mtd_info one or
> remove the mtd_info object when both are passed.
>
> In order to do that, we first
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->setup_data_interface() hook.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/at
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->setup_read_retry() hook.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/nand_bas
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->waitfunc() hook.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/atmel/n
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle all chip->read_xxx() hooks at once.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle all ecc->write_xxx() hooks at once.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/atmel/n
Let's make the raw NAND API consistent by patching all helpers to
take a nand_chip object instead of an mtd_info one.
Now is nand_wait_ready()'s turn.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c | 2 +-
drivers/mtd/nand/raw/cafe_nand.c
/nand/api-cleanup
Boris Brezillon (23):
mtd: rawnand: plat_nand: Pass a nand_chip object to all
platform_nand_ctrl hooks
mtd: rawnand: Pass a nand_chip object to nand_scan()
mtd: rawnand: Pass a nand_chip object to nand_release()
mtd: rawnand: Pass a nand_chip object to nand_wait_ready
of an mtd_info.
We add temporary plat_nand_xxx() wrappers to the do the mtd -> chip
conversion, but those will be dropped when patching nand_chip hooks to
take a nand_chip object.
Signed-off-by: Boris Brezillon
Reviewed-by: Alexander Sverdlin
Acked-by: Alexander Sverdlin
Acked-by: Robert Jarzmik
Ac
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one.
Now is ecc->correct()'s turn.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/davinci_nand.c | 9 -
drivers/mtd/nand/raw/diskonchip.c |
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->cmd_ctrl() hook.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/ams-delt
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle all ecc->read_xxx() hooks at once.
Signed-off-by: Boris Brezillon
Acked-by: Stefan Agner
---
Chan
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->dev_ready() hook.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/ams-delt
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the nand_erase_nand() helper.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/nand_base.c | 10
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the nand_xxx_bbt() helpers.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/nand_base.c | 6
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle all chip->block_xxx() hooks at once.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->erase() hook.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/denali.c
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->{get,set}_features() hooks.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->cmdfunc() hook.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/au1550n
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle the chip->select_chip() hook.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/atmel/n
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.
Let's tackle all chip->write_xxx() hooks at once.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/
Let's make the raw NAND API consistent by patching all helpers to
take a nand_chip object instead of an mtd_info one.
Now is nand_release()'s turn.
Signed-off-by: Boris Brezillon
---
Documentation/driver-api/mtdnand.rst | 2 +-
drivers/mtd/nand/raw/ams-delta.c | 2 +-
drivers
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one.
Now is ecc->hwctl()'s turn.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/cs553x_nand.c | 3 +--
drivers/mtd/nand/raw/davinci_nand.c |
Let's make the raw NAND API consistent by patching all helpers to take
a nand_chip object instead of an mtd_info one.
We start with nand_scan().
Signed-off-by: Boris Brezillon
---
Changes in v2:
- Fix commit message
---
Documentation/driver-api/mtdnand.rst | 2 +-
drivers/mtd/nand
Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one.
Now is ecc->calculate()'s turn.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/cs553x_nand.c | 4 ++--
drivers/mtd/nand/raw/davinci_nand.c |
On Fri, 7 Sep 2018 10:40:44 +0200
Ladislav Michl wrote:
> Hi Boris,
>
> this patchseries is really amazing clean up. Thank you!
I'm glad I'm not the only one to find it useful :-).
>
> On Fri, Sep 07, 2018 at 12:38:51AM +0200, Boris Brezillon wrote:
> > This mo
discourage people from overloading those
methods and encourage them to fix their driver instead.
Move the ->block_{bad,markbad}() hooks to the nand_legacy struct to
make it clear.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/cafe_nand.c | 2 +-
drivers/mtd/nand/
as deprecated.
We start with the ->IO_ADDR_{R,W] fields.
Signed-off-by: Boris Brezillon
---
Documentation/driver-api/mtdnand.rst | 24
arch/arm/mach-ep93xx/snappercl15.c | 5 +++--
arch/arm/mach-ep93xx/ts72xx.c| 6 +++---
arch/arm/mach-imx/mach-qong.c|
All those hooks have been replaced by ->exec_op(). Move them to the
nand_legacy struct.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/ams-delta.c | 6 +--
drivers/mtd/nand/raw/atmel/nand-controller.c | 8 ++--
drivers/mtd/nand/raw/au1550nd.c |
The wait timeouts and delays are directly extracted from the NAND
timings and ->chip_delay is only used in legacy path, so let's move it
to the nand_legacy struct to make it clear.
Signed-off-by: Boris Brezillon
---
Documentation/driver-api/mtdnand.rst | 2 +-
drivers/mtd/nand/
Move nand_scan[_with_ids]() and nand_wait_ready() at the end of the
file where all function prototype lies. This will also allow us to get
rid of the nand_flash_dev forward declaration.
Signed-off-by: Boris Brezillon
---
include/linux/mtd/rawnand.h | 24
1 file changed
Those hooks have been replaced by ->exec_op(). Move them to the
nand_legacy struct.
Signed-off-by: Boris Brezillon
---
Documentation/driver-api/mtdnand.rst | 4 +--
drivers/mtd/nand/raw/ams-delta.c | 4 +--
drivers/mtd/nand/raw/atmel/nand-controller.c |
we should discourage people from overloading this method
and encourage them to implement ->exec_op() instead.
Move the ->erase() hook to the nand_legacy struct to make it clear.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/denali.c| 2 +-
drivers/mtd/nand/raw/nand_b
There's already a forward declaration of nand_chip at the beginning of
the file. Get rid of this one.
Signed-off-by: Boris Brezillon
---
include/linux/mtd/rawnand.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index 768415ed1159
Allows us to move a few hundred lines of deprecated code out of the
core file which is quite big.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/Makefile | 2 +-
drivers/mtd/nand/raw/internals.h | 6 +
drivers/mtd/nand/raw/nand_base.c | 618
nand_scan[with_ids]() have been moved at the end of the file. We can
now get rid of of the nand_flash_dev forward declaration.
Signed-off-by: Boris Brezillon
---
include/linux/mtd/rawnand.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd
that are not supposed to be
exposed.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/internals.h | 98
drivers/mtd/nand/raw/nand_amd.c | 2 +-
drivers/mtd/nand/raw/nand_base.c | 21
drivers/mtd/nand/raw/nand_bbt.c | 3 +-
drivers
on the API/core cleanup.
Regards,
Boris
Boris Brezillon (19):
mtd: rawnand: Leave chip->IO_ADDR_{R,W} to NULL when unused
mtd: rawnand: Create a legacy struct and move ->IO_ADDR_{R,W} there
mtd: rawnand: Deprecate ->{read,write}_{byte,buf}() hooks
mtd: rawnand: Deprecate ->cmd_ctrl() a
There's no point in poisoning the ->IO_ADDR_{R,W}, a NULL pointer
is just as good to detect unexpected ->IO_ADDR_{R,W} usage.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 3 ---
drivers/mtd/nand/raw/socrates_nand.c | 4
2 files changed, 7 del
onfi_get_async_timing_mode() is only used in one place inside
nand_base.c. Let's inline the code and kill the helper.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/nand_base.c | 5 +++--
include/linux/mtd/rawnand.h | 9 -
2 files changed, 3 insertions(+), 11 deletions
Those hooks should be replaced by a proper ->exec_op() implementation.
Move them to the nand_legacy struct to make it clear.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c | 4 +-
drivers/mtd/nand/raw/cafe_nand.c | 4 +-
drivers/mtd/n
Those definitions are not used, let's remove them.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/nand_timings.c | 14 --
include/linux/mtd/rawnand.h | 8
2 files changed, 22 deletions(-)
diff --git a/drivers/mtd/nand/raw/nand_timings.c
b/drivers/mtd
Those hooks have been replaced by ->exec_op(). Move them to the
nand_legacy struct.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/ams-delta.c | 2 +-
drivers/mtd/nand/raw/atmel/nand-controller.c | 4 +-
drivers/mtd/nand/raw/au1550nd.c |
platform_nand_xxx definitions are just used by the plat_nand driver.
Let's move those definitions out of the core/driver-agnostic rawnand.h
header.
Signed-off-by: Boris Brezillon
---
arch/arm/mach-ep93xx/snappercl15.c | 3 +-
arch/arm/mach-ep93xx/ts72xx.c | 3 +-
arch/arm/mach
This moves ONFI related code to nand_onfi.c and ONFI related
struct/macros to include/linux/mtd/onfi.h.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/Makefile| 1 +
drivers/mtd/nand/raw/internals.h | 7 +
drivers/mtd/nand/raw/nand_base.c | 296
This moves ONFI related code to nand_onfi.c and ONFI related
struct/macros to include/linux/mtd/onfi.h.
Signed-off-by: Boris Brezillon
---
drivers/mtd/nand/raw/Makefile | 1 +
drivers/mtd/nand/raw/internals.h | 3 +
drivers/mtd/nand/raw/nand_base.c | 98
On Wed, 04 Apr 2018 21:49:26 +0200
Robert Jarzmik wrote:
> Ulf Hansson writes:
>
> > On 2 April 2018 at 16:26, Robert Jarzmik wrote:
> >> Hi,
> >>
> >> This serie is aimed at removing the dmaengine slave compat use, and
On Tue, 17 Apr 2018 19:49:14 +0200
Geert Uytterhoeven wrote:
> Remove dependencies on HAS_DMA where a Kconfig symbol depends on another
> symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST".
> In most cases this other symbol is an architecture or platform
On Mon, 12 Feb 2018 22:03:07 +0100
Boris Brezillon <boris.brezil...@bootlin.com> 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 a
b/drivers/mtd/spi-nor/Kconfig
> index 89da88e591215db1..c493b8230a38c059 100644
> --- a/drivers/mtd/spi-nor/Kconfig
> +++ b/drivers/mtd/spi-nor/Kconfig
> @@ -71,7 +71,7 @@ config SPI_FSL_QUADSPI
> config SPI_HISI_SFC
> tristate "Hisilicon SPI-NOR Flash Controller(SFC)
A new SPI NAND subsystem has been added in drivers/mtd/nand/spi/ and
Micron's MT29F devices are now supported in
drivers/mtd/nand/spi/micron.c.
Remove the old driver.
Signed-off-by: Boris Brezillon
---
Hello,
If anything is missing in drivers/mtd/nand/spi/micron.c to properly
support
On Sat, 15 Sep 2018 19:54:40 +0200
Miquel Raynal wrote:
> Hi Boris,
>
> Boris Brezillon wrote on Fri, 7 Sep 2018
> 00:38:32 +0200:
>
> > Hello,
> >
> > This is the 2nd batch of API cleanup patches. This time we move
> > deprecated hooks/fields to the
Hi Jernej,
On Thu, 22 Aug 2019 21:44:57 +0200
Jernej Skrabec wrote:
> When codec supports multiple slices in one frame, VPU has to know when
> first slice of each frame is being processed, presumably to correctly
> clear/set data in auxiliary buffers.
>
> Add first_slice field to cedrus_run
ver by exposing and implementing
> V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF capability.
>
> Signed-off-by: Jernej Skrabec
Reviewed-by: Boris Brezillon
> ---
> drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 9 +
> drivers/staging/media/sunxi/cedrus/cedrus_hw.c| 8 +-
On Thu, 22 Aug 2019 21:44:54 +0200
Jernej Skrabec wrote:
> From: Hans Verkuil
>
> Add this new V4L2_DEC_CMD_FLUSH decoder command and document it.
>
> Signed-off-by: Hans Verkuil
> Signed-off-by: Jernej Skrabec
Reviewed-by: Boris Brezillon
> ---
> Documentati
On Thu, 22 Aug 2019 21:45:00 +0200
Jernej Skrabec wrote:
> This command is useful for explicitly flushing last decoded frame.
>
> Signed-off-by: Jernej Skrabec
Reviewed-by: Boris Brezillon
> ---
> .../staging/media/sunxi/cedrus/cedrus_video.c | 34 +++
>
On Thu, 29 Aug 2019 21:04:28 +0200
Jernej Škrabec wrote:
> Dne ponedeljek, 26. avgust 2019 ob 20:28:31 CEST je Boris Brezillon
> napisal(a):
> > Hi Jernej,
> >
> > On Thu, 22 Aug 2019 21:44:57 +0200
> >
> > Jernej Skrabec wrote:
> > > When cod
ed-off-by: Hariprasad Kelam
Reviewed-by: Boris Brezillon
> ---
> drivers/staging/media/hantro/hantro_vp8.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/media/hantro/hantro_vp8.c
> b/drivers/staging/media/hantro/hantro_vp8.c
> index 66c4533..36
+Richard and Miquel
On Thu, 07 Nov 2019 09:20:53 +
René van Dorst wrote:
> Quoting g...@kernel.org:
>
> > From: Greg Ungerer
> >
> > Add a driver to support the NAND flash controller of the MediaTek MT7621
> > System-on-Chip device. (This one is the MIPS based parts from Mediatek).
> >
>
On Thu, 7 Nov 2019 09:40:07 +0100
Greg KH wrote:
> On Thu, Nov 07, 2019 at 05:35:21PM +1000, g...@kernel.org wrote:
> > From: Greg Ungerer
> >
> > Add a driver to support the NAND flash controller of the MediaTek MT7621
> > System-on-Chip device. (This one is the MIPS based parts from
On Sun, 10 Nov 2019 12:39:19 +0100
Boris Brezillon wrote:
> On Thu, 7 Nov 2019 09:40:07 +0100
> Greg KH wrote:
>
> > On Thu, Nov 07, 2019 at 05:35:21PM +1000, g...@kernel.org wrote:
> > > From: Greg Ungerer
> > >
> > > Add a driver to support
s/staging/media/rkvdec/rkvdec.c
> >
> >966
> > > 967 static const struct of_device_id of_rkvdec_match[] = {
> >968 { .compatible = "rockchip,rk3399-vdec" },
> >969 { /* sentinel */ }
> >97
501 - 565 of 565 matches
Mail list logo