]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mfd: lpc_ich: Do not touch SPI-NOR write protection bit on Apollo Lake
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 4 Jan 2018 09:20:18 +0000 (12:20 +0300)
committerLee Jones <lee.jones@linaro.org>
Mon, 8 Jan 2018 11:03:35 +0000 (11:03 +0000)
Just to be on the safe side, don't touch the bit. If write access to the
flash chip is needed, the BIOS needs to enable it explicitly.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/lpc_ich.c

index cf1120abbf521f4c819ff2ab0318cdfaf86515e9..53dc1a43472ce0586d683e0e1dbf5ce3fdfb97e7 100644 (file)
@@ -1143,11 +1143,6 @@ static int lpc_ich_init_spi(struct pci_dev *dev)
                        res->end = res->start + SPIBASE_APL_SZ - 1;
 
                        pci_bus_read_config_dword(bus, spi, BCR, &bcr);
-                       if (!(bcr & BCR_WPD)) {
-                               bcr |= BCR_WPD;
-                               pci_bus_write_config_dword(bus, spi, BCR, bcr);
-                               pci_bus_read_config_dword(bus, spi, BCR, &bcr);
-                       }
                        info->writeable = !!(bcr & BCR_WPD);
                }