
[ Upstream commit cd149eff8d2201a63c074a6d9d03e52926aa535d ] Currently the driver tries to disable the BIOS write protection automatically even if this is not what the user wants. For this reason modify the driver so that by default it does not touch the write protection. Only if specifically asked by the user (setting writeable=1 command line parameter) the driver tries to disable the BIOS write protection. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mauro Lima <mauro.lima@eclypsium.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220209122706.42439-2-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Stable-dep-of: 92a66cbf6b30 ("spi: intel: Use correct mask for flash and protected regions") Signed-off-by: Sasha Levin <sashal@kernel.org>
32 lines
756 B
C
32 lines
756 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Intel PCH/PCU SPI flash driver.
|
|
*
|
|
* Copyright (C) 2016, Intel Corporation
|
|
* Author: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
*/
|
|
|
|
#ifndef INTEL_SPI_PDATA_H
|
|
#define INTEL_SPI_PDATA_H
|
|
|
|
enum intel_spi_type {
|
|
INTEL_SPI_BYT = 1,
|
|
INTEL_SPI_LPT,
|
|
INTEL_SPI_BXT,
|
|
INTEL_SPI_CNL,
|
|
};
|
|
|
|
/**
|
|
* struct intel_spi_boardinfo - Board specific data for Intel SPI driver
|
|
* @type: Type which this controller is compatible with
|
|
* @set_writeable: Try to make the chip writeable (optional)
|
|
* @data: Data to be passed to @set_writeable can be %NULL
|
|
*/
|
|
struct intel_spi_boardinfo {
|
|
enum intel_spi_type type;
|
|
bool (*set_writeable)(void __iomem *base, void *data);
|
|
void *data;
|
|
};
|
|
|
|
#endif /* INTEL_SPI_PDATA_H */
|