All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mtd: spi-nor / spi / MFD: Convert intel-spi to SPI MEM
@ 2021-09-30 10:07 ` Mika Westerberg
  0 siblings, 0 replies; 38+ messages in thread
From: Mika Westerberg @ 2021-09-30 10:07 UTC (permalink / raw)
  To: Tudor Ambarus, Mark Brown
  Cc: Lee Jones, Michael Walle, Pratyush Yadav, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Jonathan Corbet,
	Mauro Lima, Alexander Sverdlin, Mika Westerberg, linux-mtd,
	linux-spi

Hi all,

Based on discussion on the patch I sent some time ago here:

  http://lists.infradead.org/pipermail/linux-mtd/2021-June/086867.html

it turns out that the preferred way to deal with the SPI flash controller
drivers is through SPI MEM which is part of Linux SPI subsystem.

This series does that for the intel-spi driver. This also renames the
driver to follow the convention used in the SPI subsystem. The first patch
improves the write protection handling to be slightly more safer. The
following two patches do the conversion itself. Note the Intel SPI flash
controller only allows commands such as read, write and so on and it
internally uses whatever addressing etc. it figured from the SFDP on the
flash device.

I have tested this series on two systems with hardware sequencer (full
erase, write) and on a laptop with software sequencer (read only since I
don't have any means to restore the flash contents if something goes
wrong).

Let me know if it is better to send the full patches without rename
detection.

Mika Westerberg (3):
  mtd: spi-nor: intel-spi: Disable write protection only if asked
  mtd: spi-nor: intel-spi: Convert to SPI MEM
  Documentation / MTD: Rename the intel-spi driver

 Documentation/driver-api/mtd/index.rst        |   2 +-
 .../mtd/{intel-spi.rst => spi-intel.rst}      |   8 +-
 drivers/mfd/lpc_ich.c                         |  59 ++-
 drivers/mtd/spi-nor/controllers/Kconfig       |  36 --
 drivers/mtd/spi-nor/controllers/Makefile      |   3 -
 drivers/mtd/spi-nor/controllers/intel-spi.h   |  21 --
 drivers/spi/Kconfig                           |  38 ++
 drivers/spi/Makefile                          |   3 +
 .../intel-spi-pci.c => spi/spi-intel-pci.c}   |  49 ++-
 .../spi-intel-platform.c}                     |  21 +-
 .../intel-spi.c => spi/spi-intel.c}           | 341 +++++++++++-------
 drivers/spi/spi-intel.h                       |  19 +
 include/linux/mfd/lpc_ich.h                   |   2 +-
 .../x86/{intel-spi.h => spi-intel.h}          |  12 +-
 14 files changed, 353 insertions(+), 261 deletions(-)
 rename Documentation/driver-api/mtd/{intel-spi.rst => spi-intel.rst} (94%)
 delete mode 100644 drivers/mtd/spi-nor/controllers/intel-spi.h
 rename drivers/{mtd/spi-nor/controllers/intel-spi-pci.c => spi/spi-intel-pci.c} (84%)
 rename drivers/{mtd/spi-nor/controllers/intel-spi-platform.c => spi/spi-intel-platform.c} (65%)
 rename drivers/{mtd/spi-nor/controllers/intel-spi.c => spi/spi-intel.c} (78%)
 create mode 100644 drivers/spi/spi-intel.h
 rename include/linux/platform_data/x86/{intel-spi.h => spi-intel.h} (64%)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2021-10-13 18:23 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 10:07 [PATCH 0/3] mtd: spi-nor / spi / MFD: Convert intel-spi to SPI MEM Mika Westerberg
2021-09-30 10:07 ` Mika Westerberg
2021-09-30 10:07 ` [PATCH 1/3] mtd: spi-nor: intel-spi: Disable write protection only if asked Mika Westerberg
2021-09-30 10:07   ` Mika Westerberg
2021-10-01 20:23   ` Mauro Lima
2021-10-01 20:23     ` Mauro Lima
2021-10-04  5:18     ` Mika Westerberg
2021-10-04  5:18       ` Mika Westerberg
2021-10-12 18:49       ` Mauro Lima
2021-10-12 18:49         ` Mauro Lima
2021-10-13  9:03         ` Mika Westerberg
2021-10-13  9:03           ` Mika Westerberg
2021-10-13 18:22           ` Mauro Lima
2021-10-13 18:22             ` Mauro Lima
2021-09-30 10:07 ` [PATCH 2/3] mtd: spi-nor: intel-spi: Convert to SPI MEM Mika Westerberg
2021-09-30 10:07   ` Mika Westerberg
2021-10-04  9:52   ` Pratyush Yadav
2021-10-04  9:52     ` Pratyush Yadav
2021-10-04 10:07     ` Mika Westerberg
2021-10-04 10:07       ` Mika Westerberg
2021-10-07 12:36       ` Pratyush Yadav
2021-10-07 12:36         ` Pratyush Yadav
2021-10-07 16:46         ` Mika Westerberg
2021-10-07 16:46           ` Mika Westerberg
2021-10-07 18:00           ` Pratyush Yadav
2021-10-07 18:00             ` Pratyush Yadav
2021-10-08  9:02             ` Mika Westerberg
2021-10-08  9:02               ` Mika Westerberg
2021-10-08 10:56               ` Pratyush Yadav
2021-10-08 10:56                 ` Pratyush Yadav
2021-10-04 14:29   ` Andy Shevchenko
2021-10-04 14:29     ` Andy Shevchenko
2021-10-05  9:41     ` Mika Westerberg
2021-10-05  9:41       ` Mika Westerberg
2021-09-30 10:07 ` [PATCH 3/3] Documentation / MTD: Rename the intel-spi driver Mika Westerberg
2021-09-30 10:07   ` Mika Westerberg
2021-09-30 15:03   ` Alexander Sverdlin
2021-09-30 15:03     ` Alexander Sverdlin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.