mbox series

[v3,0/3] Introduce mtdblock device

Message ID 20240404105813.1520732-1-avromanov@salutedevices.com
Headers show
Series Introduce mtdblock device | expand

Message

Alexey Romanov April 4, 2024, 10:58 a.m. UTC
Hello!

This series adds support for the mtdblock device, which
allows to read/write data block by block. For example,
it can now be used for BCB or Android AB command:

  $ bcb load mtd 0 part_name

Tested only on SPI NAND, so bind is made only for
SPI NAND drivers.

---

Changes V1 -> V2 [1]:

  - Drop patch [2].
  - Add warning if bind NAND mtdblock device.
  - Move documentation of mtdblock implementation
    from commit message to the source code.
  - Remove __maybe_unused from mtd partition functions
    description.
  - Use blk_enabled() instead of #ifdefs.

Changes V2 -> V3 [2]:

  - Rebased over [3].
  - Rename mtd_bread/bwrite -> mtd_blk_read/write.
  - Fix GPL-2.0 license short name definiton in headers.
  - Add empty line after MTD_ENTRY_NUMBERS define.

Links:

  - [1] https://lore.kernel.org/all/20240227100441.1811047-1-avromanov@salutedevices.com/
  - [2] https://lore.kernel.org/all/20240227100441.1811047-5-avromanov@salutedevices.com/
  - [3] https://lore.kernel.org/u-boot/20240403114047.84030-1-heinrich.schuchardt@canonical.com/T/#u

Alexey Romanov (3):
  disk: support MTD partitions
  drivers: introduce mtdblock abstraction
  spinand: bind mtdblock

 disk/part.c                 |   3 +-
 drivers/block/blk-uclass.c  |   1 +
 drivers/mtd/Kconfig         |   1 +
 drivers/mtd/Makefile        |   1 +
 drivers/mtd/mtdblock.c      | 227 ++++++++++++++++++++++++++++++++++++
 drivers/mtd/mtdpart.c       |  69 +++++++++++
 drivers/mtd/nand/spi/core.c |  20 ++++
 include/linux/mtd/mtd.h     |  12 ++
 include/part.h              |   3 +
 9 files changed, 336 insertions(+), 1 deletion(-)
 create mode 100644 drivers/mtd/mtdblock.c

Comments

Alexey Romanov April 11, 2024, 4:09 p.m. UTC | #1
Hello! Ping.

On Thu, Apr 04, 2024 at 01:58:10PM +0300, Alexey Romanov wrote:
> Hello!
> 
> This series adds support for the mtdblock device, which
> allows to read/write data block by block. For example,
> it can now be used for BCB or Android AB command:
> 
>   $ bcb load mtd 0 part_name
> 
> Tested only on SPI NAND, so bind is made only for
> SPI NAND drivers.
> 
> ---
> 
> Changes V1 -> V2 [1]:
> 
>   - Drop patch [2].
>   - Add warning if bind NAND mtdblock device.
>   - Move documentation of mtdblock implementation
>     from commit message to the source code.
>   - Remove __maybe_unused from mtd partition functions
>     description.
>   - Use blk_enabled() instead of #ifdefs.
> 
> Changes V2 -> V3 [2]:
> 
>   - Rebased over [3].
>   - Rename mtd_bread/bwrite -> mtd_blk_read/write.
>   - Fix GPL-2.0 license short name definiton in headers.
>   - Add empty line after MTD_ENTRY_NUMBERS define.
> 
> Links:
> 
>   - [1] https://lore.kernel.org/all/20240227100441.1811047-1-avromanov@salutedevices.com/
>   - [2] https://lore.kernel.org/all/20240227100441.1811047-5-avromanov@salutedevices.com/
>   - [3] https://lore.kernel.org/u-boot/20240403114047.84030-1-heinrich.schuchardt@canonical.com/T/#u
> 
> Alexey Romanov (3):
>   disk: support MTD partitions
>   drivers: introduce mtdblock abstraction
>   spinand: bind mtdblock
> 
>  disk/part.c                 |   3 +-
>  drivers/block/blk-uclass.c  |   1 +
>  drivers/mtd/Kconfig         |   1 +
>  drivers/mtd/Makefile        |   1 +
>  drivers/mtd/mtdblock.c      | 227 ++++++++++++++++++++++++++++++++++++
>  drivers/mtd/mtdpart.c       |  69 +++++++++++
>  drivers/mtd/nand/spi/core.c |  20 ++++
>  include/linux/mtd/mtd.h     |  12 ++
>  include/part.h              |   3 +
>  9 files changed, 336 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/mtd/mtdblock.c
> 
> -- 
> 2.34.1
>
Michael Nazzareno Trimarchi April 11, 2024, 4:14 p.m. UTC | #2
Hi

I will review tomorrow, I need have a time window to test even on my board

Mihcael

On Thu, Apr 11, 2024 at 6:09 PM Alexey Romanov
<avromanov@salutedevices.com> wrote:
>
> Hello! Ping.
>
> On Thu, Apr 04, 2024 at 01:58:10PM +0300, Alexey Romanov wrote:
> > Hello!
> >
> > This series adds support for the mtdblock device, which
> > allows to read/write data block by block. For example,
> > it can now be used for BCB or Android AB command:
> >
> >   $ bcb load mtd 0 part_name
> >
> > Tested only on SPI NAND, so bind is made only for
> > SPI NAND drivers.
> >
> > ---
> >
> > Changes V1 -> V2 [1]:
> >
> >   - Drop patch [2].
> >   - Add warning if bind NAND mtdblock device.
> >   - Move documentation of mtdblock implementation
> >     from commit message to the source code.
> >   - Remove __maybe_unused from mtd partition functions
> >     description.
> >   - Use blk_enabled() instead of #ifdefs.
> >
> > Changes V2 -> V3 [2]:
> >
> >   - Rebased over [3].
> >   - Rename mtd_bread/bwrite -> mtd_blk_read/write.
> >   - Fix GPL-2.0 license short name definiton in headers.
> >   - Add empty line after MTD_ENTRY_NUMBERS define.
> >
> > Links:
> >
> >   - [1] https://lore.kernel.org/all/20240227100441.1811047-1-avromanov@salutedevices.com/
> >   - [2] https://lore.kernel.org/all/20240227100441.1811047-5-avromanov@salutedevices.com/
> >   - [3] https://lore.kernel.org/u-boot/20240403114047.84030-1-heinrich.schuchardt@canonical.com/T/#u
> >
> > Alexey Romanov (3):
> >   disk: support MTD partitions
> >   drivers: introduce mtdblock abstraction
> >   spinand: bind mtdblock
> >
> >  disk/part.c                 |   3 +-
> >  drivers/block/blk-uclass.c  |   1 +
> >  drivers/mtd/Kconfig         |   1 +
> >  drivers/mtd/Makefile        |   1 +
> >  drivers/mtd/mtdblock.c      | 227 ++++++++++++++++++++++++++++++++++++
> >  drivers/mtd/mtdpart.c       |  69 +++++++++++
> >  drivers/mtd/nand/spi/core.c |  20 ++++
> >  include/linux/mtd/mtd.h     |  12 ++
> >  include/part.h              |   3 +
> >  9 files changed, 336 insertions(+), 1 deletion(-)
> >  create mode 100644 drivers/mtd/mtdblock.c
> >
> > --
> > 2.34.1
> >
>
> --
> Thank you,
> Alexey
Alexey Romanov May 6, 2024, 1:56 p.m. UTC | #3
Hello Michael,

On Thu, Apr 11, 2024 at 06:14:29PM +0200, Michael Nazzareno Trimarchi wrote:
> Hi
> 
> I will review tomorrow, I need have a time window to test even on my board

Any news?

> 
> Mihcael
> 
> On Thu, Apr 11, 2024 at 6:09 PM Alexey Romanov
> <avromanov@salutedevices.com> wrote:
> >
> > Hello! Ping.
> >
> > On Thu, Apr 04, 2024 at 01:58:10PM +0300, Alexey Romanov wrote:
> > > Hello!
> > >
> > > This series adds support for the mtdblock device, which
> > > allows to read/write data block by block. For example,
> > > it can now be used for BCB or Android AB command:
> > >
> > >   $ bcb load mtd 0 part_name
> > >
> > > Tested only on SPI NAND, so bind is made only for
> > > SPI NAND drivers.
> > >
> > > ---
> > >
> > > Changes V1 -> V2 [1]:
> > >
> > >   - Drop patch [2].
> > >   - Add warning if bind NAND mtdblock device.
> > >   - Move documentation of mtdblock implementation
> > >     from commit message to the source code.
> > >   - Remove __maybe_unused from mtd partition functions
> > >     description.
> > >   - Use blk_enabled() instead of #ifdefs.
> > >
> > > Changes V2 -> V3 [2]:
> > >
> > >   - Rebased over [3].
> > >   - Rename mtd_bread/bwrite -> mtd_blk_read/write.
> > >   - Fix GPL-2.0 license short name definiton in headers.
> > >   - Add empty line after MTD_ENTRY_NUMBERS define.
> > >
> > > Links:
> > >
> > >   - [1] https://lore.kernel.org/all/20240227100441.1811047-1-avromanov@salutedevices.com/
> > >   - [2] https://lore.kernel.org/all/20240227100441.1811047-5-avromanov@salutedevices.com/
> > >   - [3] https://lore.kernel.org/u-boot/20240403114047.84030-1-heinrich.schuchardt@canonical.com/T/#u
> > >
> > > Alexey Romanov (3):
> > >   disk: support MTD partitions
> > >   drivers: introduce mtdblock abstraction
> > >   spinand: bind mtdblock
> > >
> > >  disk/part.c                 |   3 +-
> > >  drivers/block/blk-uclass.c  |   1 +
> > >  drivers/mtd/Kconfig         |   1 +
> > >  drivers/mtd/Makefile        |   1 +
> > >  drivers/mtd/mtdblock.c      | 227 ++++++++++++++++++++++++++++++++++++
> > >  drivers/mtd/mtdpart.c       |  69 +++++++++++
> > >  drivers/mtd/nand/spi/core.c |  20 ++++
> > >  include/linux/mtd/mtd.h     |  12 ++
> > >  include/part.h              |   3 +
> > >  9 files changed, 336 insertions(+), 1 deletion(-)
> > >  create mode 100644 drivers/mtd/mtdblock.c
> > >
> > > --
> > > 2.34.1
> > >
> >
> > --
> > Thank you,
> > Alexey
> 
> 
> 
> -- 
> Michael Nazzareno Trimarchi
> Co-Founder & Chief Executive Officer
> M. +39 347 913 2170
> michael@amarulasolutions.com
> __________________________________
> 
> Amarula Solutions BV
> Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> T. +31 (0)85 111 9172
> info@amarulasolutions.com
> www.amarulasolutions.com