diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-07-28 23:03:09 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-07-28 23:03:09 -0700 | 
| commit | 0262163136de813894cb172aa8ccf762b92e5fd7 (patch) | |
| tree | ced41ea7888a5bf4a1670cff5ef74381123729ee /drivers/spi/spi-intel.c | |
| parent | bf977a9ad33d204c8ca646cef83184eb364820ff (diff) | |
| parent | 2d442a0c781403702de27ccfbc4bb233721585f5 (diff) | |
Merge tag 'spi-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi updates from Mark Brown:
 "This release is almost entirely driver work, mostly new drivers with
  the usual smattering of per driver updates anf fixes, with only
  trivial changes in the core. Highlights include:
   - Quite a bit of maintainence work on the STM32 and Qualcomm drivers
   - Usage of the newly added devm_dma_request_chan() in the ateml
     driver, pulling in the relevant dmaengine change
   - Cleanups of our usage of the PM autosuspend functions, this pulls
     in some PM core changes on a shared tag
   - Support for ADI sigma-delta triggers, Amlogic SPISG, Mediatek
     MT6991 and MT8196, Renesas RZ/V2H(P) and SOPHGO SG2042"
* tag 'spi-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (62 commits)
  spi: SPISG: Fix less than zero comparison on a u32 variable
  spi: intel: Allow writeable MTD partition with module param
  spi: Add driver for the RZ/V2H(P) RSPI IP
  spi: dt-bindings: Document the RZ/V2H(P) RSPI
  MAINTAINERS: Add an entry for Amlogic spi driver
  spi: Add Amlogic SPISG driver
  spi: dt-bindings: Add binding document of Amlogic SPISG controller
  spi: spi-sg2044-nor: Add SPI-NOR controller for SG2042
  spi: spi-sg2044-nor: Add configurable chip_info
  spi: dt-bindings: spi-sg2044-nor: Change SOPHGO SG2042
  spi: spi-qpic-snand: simplify bad block marker duplication
  spi: spidev: Add an entry for the ABB spi sensors
  dt-bindings: trivial-devices: Document ABB sensors
  spi: stm32-ospi: Fix NULL vs IS_ERR() bug in stm32_ospi_get_resources()
  spi: gpio: Use explicit 'unsigned int' for parameter types
  spi: dt-bindings: spi-mux: Drop "spi-max-frequency" as required
  spi: st: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr()
  spi: rspi: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  spi: sh-msiof: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
  spi: xilinx: Fix block comment style and minor cleanups
  ...
Diffstat (limited to 'drivers/spi/spi-intel.c')
| -rw-r--r-- | drivers/spi/spi-intel.c | 13 | 
1 files changed, 10 insertions, 3 deletions
| diff --git a/drivers/spi/spi-intel.c b/drivers/spi/spi-intel.c index 5d5a546c62ea..13bbb2133507 100644 --- a/drivers/spi/spi-intel.c +++ b/drivers/spi/spi-intel.c @@ -189,6 +189,11 @@ struct intel_spi_mem_op {  static bool writeable;  module_param(writeable, bool, 0);  MODULE_PARM_DESC(writeable, "Enable write access to SPI flash chip (default=0)"); +static bool ignore_protection_status; +module_param(ignore_protection_status, bool, 0); +MODULE_PARM_DESC( +	ignore_protection_status, +	"Do not block SPI flash chip write access even if it is write-protected (default=0)");  static void intel_spi_dump_regs(struct intel_spi *ispi)  { @@ -1248,13 +1253,15 @@ static void intel_spi_fill_partition(struct intel_spi *ispi,  			continue;  		/* -		 * If any of the regions have protection bits set, make the -		 * whole partition read-only to be on the safe side. +		 * If any of the regions have protection bits set and +		 * the ignore protection status parameter is not set, +		 * make the whole partition read-only to be on the safe side.  		 *  		 * Also if the user did not ask the chip to be writeable  		 * mask the bit too.  		 */ -		if (!writeable || intel_spi_is_protected(ispi, base, limit)) { +		if (!writeable || (!ignore_protection_status && +				   intel_spi_is_protected(ispi, base, limit))) {  			part->mask_flags |= MTD_WRITEABLE;  			ispi->protected = true;  		} | 
