spi-nor: Add support for Intel SPI serial flash controller
Subsystems (5)
v6 cover spi-nor: Add support for Intel SPI serial flash controller
This is 6th iteration of the series. You can find the previous versions archived on:
v5: https://lwn.net/Articles/706363/
v4: https://lwn.net/Articles/703773/
v3: https://lwn.net/Articles/697231/
v2: http://lists.infradead.org/pipermail/linux-mtd/2016-June/068277.html
v1: https://lkml.org/lkml/2016/6/14/269
This patch series adds support for the Intel SPI serial flash controller found on many recent Intel CPUs including Baytrail and Braswell. This driver makes it possible to access the BIOS and other platform data which is stored on the SPI serial flash. It is also possible to upgrade the BIOS using this driver if it has not been protected by special hardware bits.
The patch [1/3] includes documentation how to upgrade BIOS on MinnowBoard MAX.
Since poking the SPI serial flash can brick the machine, this driver can only be enabled when CONFIG_EXPERT=y and even then it will remain read-only unless instructed othwerwise by module parameter.
Changes from v5:
* Use readl_poll_timeout() from iopoll.h instead of open-coding busy waiting.
* First clear bits and then set them in intel_spi_read() and
intel_spi_write().
* Use round_down() in lpc_ich_init_spi().
* Add ACKs
Changes from v4:
* Use INTEL_SPI_FIFO_SZ instead of hard coded value of 64 bytes
* Don't increment i inside call to FDATA() macro
* Check nor->read_opcode in intel_spi_read() and return -EINVAL if not supported. We may add SFDP support later on.
Changes from v3:
* Added ACKs from Lee Jones.
* Use bus instead of dev->bus in PCI accesses
Changes from v2:
* Rebased on top of v4.8-rc2
* Updated intel_spi_read/write() according spi-nor core changes which drops retlen parameter and returns number of bytes read/written.
Changes from v1:
* Older hardware does not support 64k erase command so added erase_64k flag which is set only for Broxton (BXT).
* Fix protection range offset for Broxton. Now there is ispi->pregs pointing to the start of the protection registers.
* Change naming of constants from BCR_BYT -> BYT_BCR and so on.
* Drop lpc_ich_finalize_spi_cell() and initialize cell directly in
lpc_ich_init_spi().
* Use info->type in switch in lpc_ich_init_spi().
* Add defines for magic numbers used in lpc_ich_init_spi().
* Use PLATFORM_DEVID_NONE with mfd_add_devices().
Mika Westerberg (3):
spi-nor: Add support for Intel SPI serial flash controller
mfd: lpc_ich: Add support for SPI serial flash host controller
mfd: lpc_ich: Add support for Intel Apollo Lake SoC
Documentation/mtd/intel-spi.txt | 88 ++++ drivers/mfd/lpc_ich.c | 131 ++++++ drivers/mtd/spi-nor/Kconfig | 20 + drivers/mtd/spi-nor/Makefile | 2 + drivers/mtd/spi-nor/intel-spi-platform.c | 57 +++ drivers/mtd/spi-nor/intel-spi.c | 777 +++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/intel-spi.h | 24 + include/linux/mfd/lpc_ich.h | 3 + include/linux/platform_data/intel-spi.h | 31 ++ 9 files changed, 1133 insertions(+) create mode 100644 Documentation/mtd/intel-spi.txt create mode 100644 drivers/mtd/spi-nor/intel-spi-platform.c create mode 100644 drivers/mtd/spi-nor/intel-spi.c create mode 100644 drivers/mtd/spi-nor/intel-spi.h create mode 100644 include/linux/platform_data/intel-spi.h
Signature · 1 line
2.10.2
PATCH v6 2/3 mfd: lpc_ich: Add support for SPI serial flash host controller
Many Intel CPUs including Haswell, Broadwell and Baytrail have SPI serial flash host controller as part of the LPC device. This will populate an MFD cell suitable for the SPI host controller driver if we know that the LPC device has one.
--- drivers/mfd/lpc_ich.c | 92 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/lpc_ich.h | 3 ++ 2 files changed, 95 insertions(+)
drivers/mfd/lpc_ich.c +92 -0
@@ -83,6 +83,15 @@#define ACPIBASE_GCS_OFF 0x3410#define ACPIBASE_GCS_END 0x3414 +#define SPIBASE_BYT 0x54 +#define SPIBASE_BYT_SZ 512 +#define SPIBASE_BYT_EN BIT(1) + +#define SPIBASE_LPT 0x3800 +#define SPIBASE_LPT_SZ 512 +#define BCR 0xdc +#define BCR_WPD BIT(0) +#define GPIOBASE_ICH0 0x58#define GPIOCTRL_ICH0 0x5C#define GPIOBASE_ICH6 0x48
@@ -133,6 +142,12 @@ static struct resource gpio_ich_res[] = { }, }; +static struct resource intel_spi_res[] = { + { + .flags =IORESOURCE_MEM , + } +}; +static struct mfd_cell lpc_ich_wdt_cell = { .name ="iTCO_wdt" , .num_resources =ARRAY_SIZE (wdt_ich_res),
@@ -147,6 +162,14 @@ static struct mfd_cell lpc_ich_gpio_cell = { .ignore_resource_conflicts = true, }; + +static struct mfd_cell lpc_ich_spi_cell = { + .name ="intel-spi" , + .num_resources =ARRAY_SIZE (intel_spi_res), + .resources = intel_spi_res, + .ignore_resource_conflicts = true, +}; +/* chipset related info */ enum lpc_chipsets {LPC_ICH =0 ,/* ICH */
@@ -493,10 +516,12 @@ static struct lpc_ich_info lpc_chipset_info[] = { [LPC_LPT] = { .name = "Lynx Point", .iTCO_version = 2, + .spi_type = INTEL_SPI_LPT, }, [LPC_LPT_LP] = { .name = "Lynx Point_LP", .iTCO_version = 2, + .spi_type = INTEL_SPI_LPT, }, [LPC_WBG] = { .name = "Wellsburg",
@@ -510,6 +535,7 @@ static struct lpc_ich_info lpc_chipset_info[] = { [LPC_BAYTRAIL] = { .name = "Bay Trail SoC", .iTCO_version = 3, + .spi_type = INTEL_SPI_BYT, }, [LPC_COLETO] = { .name = "Coleto Creek",
@@ -518,10 +544,12 @@ static struct lpc_ich_info lpc_chipset_info[] = { [LPC_WPT_LP] = { .name = "Wildcat Point_LP", .iTCO_version = 2, + .spi_type = INTEL_SPI_LPT, }, [LPC_BRASWELL] = { .name = "Braswell SoC", .iTCO_version = 3, + .spi_type = INTEL_SPI_BYT, }, [LPC_LEWISBURG] = { .name = "Lewisburg",
@@ -1054,6 +1082,64 @@ static int lpc_ich_init_wdt(struct pci_dev *dev)return ret; } +static int lpc_ich_init_spi (struct pci_dev *dev) +{ +struct lpc_ich_priv *priv =pci_get_drvdata (dev); +struct resource *res = &intel_spi_res[0 ]; +struct intel_spi_boardinfo *info; +u32 spi_base, rcba, bcr; + + info =devm_kzalloc (&dev->dev,sizeof (*info),GFP_KERNEL ); +if (!info) +return -ENOMEM ; + + info->type = lpc_chipset_info[priv->chipset].spi_type; + +switch (info->type) { +case INTEL_SPI_BYT : +pci_read_config_dword (dev,SPIBASE_BYT , &spi_base); +if (spi_base &SPIBASE_BYT_EN ) { + res->start = spi_base & ~(SPIBASE_BYT_SZ -1 ); + res->end = res->start +SPIBASE_BYT_SZ -1 ; + } +break ; + +case INTEL_SPI_LPT : +pci_read_config_dword (dev,RCBABASE , &rcba); +if (rcba &1 ) { + spi_base =round_down (rcba,SPIBASE_LPT_SZ ); + res->start = spi_base +SPIBASE_LPT ; + res->end = res->start +SPIBASE_LPT_SZ -1 ; + +/* +* Try to make the flash chip writeable now by +* setting BCR_WPD. It it fails we tell the driver +* that it can only read the chip. +*/ +pci_read_config_dword (dev,BCR , &bcr); +if (!(bcr &BCR_WPD )) { + bcr |=BCR_WPD ; +pci_write_config_dword (dev,BCR , bcr); +pci_read_config_dword (dev,BCR , &bcr); + } + info->writeable = !!(bcr &BCR_WPD ); + } +break ; + +default : +return -EINVAL ; + } + +if (!res->start) +return -ENODEV ; + + lpc_ich_spi_cell.platform_data = info; + lpc_ich_spi_cell.pdata_size =sizeof (*info); + +return mfd_add_devices (&dev->dev,PLATFORM_DEVID_NONE , + &lpc_ich_spi_cell,1 ,NULL ,0 ,NULL ); +} +static int lpc_ich_probe (struct pci_dev *dev,const struct pci_device_id *id) {
@@ -1097,6 +1183,12 @@ static int lpc_ich_probe(struct pci_dev *dev, cell_added = true; } +if (lpc_chipset_info[priv->chipset].spi_type) { + ret =lpc_ich_init_spi (dev); +if (!ret) + cell_added = true; + } +/* * We only care if at least one or none of the cells registered * successfully.
include/linux/mfd/lpc_ich.h +3 -0
@@ -20,6 +20,8 @@#ifndef LPC_ICH_H #define LPC_ICH_H +#include <linux/platform_data/intel-spi.h> +/* GPIO resources */ #define ICH_RES_GPIO 0#define ICH_RES_GPE0 1
@@ -40,6 +42,7 @@ struct lpc_ich_info {char name[32 ];unsigned int iTCO_version;unsigned int gpio_version; +enum intel_spi_type spi_type;u8 use_gpio; };
Signature · 1 line
2.10.2
PATCH v6 1/3 spi-nor: Add support for Intel SPI serial flash controller
In reply to Mika WesterbergAdd support for the SPI serial flash host controller found on many Intel CPUs including Baytrail and Braswell. The SPI serial flash controller is used to access BIOS and other platform specific information. By default the driver exposes a single read-only MTD device but with a module parameter "writeable=1" the MTD device can be made read-write which makes it possible to upgrade BIOS directly from Linux.
--- Documentation/mtd/intel-spi.txt | 88 ++++ drivers/mtd/spi-nor/Kconfig | 20 + drivers/mtd/spi-nor/Makefile | 2 + drivers/mtd/spi-nor/intel-spi-platform.c | 57 +++ drivers/mtd/spi-nor/intel-spi.c | 777 +++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/intel-spi.h | 24 + include/linux/platform_data/intel-spi.h | 31 ++ 7 files changed, 999 insertions(+) create mode 100644 Documentation/mtd/intel-spi.txt create mode 100644 drivers/mtd/spi-nor/intel-spi-platform.c create mode 100644 drivers/mtd/spi-nor/intel-spi.c create mode 100644 drivers/mtd/spi-nor/intel-spi.h create mode 100644 include/linux/platform_data/intel-spi.h
Documentation/mtd/intel-spi.txt new file +88 -0
@@ -0,0 +1,88 @@ +Upgrading BIOS using intel-spi +------------------------------ + +Many Intel CPUs like Baytrail and Braswell include SPI serial flash host +controller which is used to hold BIOS and other platform specific data. +Since contents of the SPI serial flash is crucial for machine to function, +it is typically protected by different hardware protection mechanisms to +avoid accidental (or on purpose) overwrite of the content. + +Not all manufacturers protect the SPI serial flash, mainly because it +allows upgrading the BIOS image directly from an OS. + +The intel-spi driver makes it possible to read and write the SPI serial +flash, if certain protection bits are not set and locked. If it finds +any of them set, the whole MTD device is made read-only to prevent +partial overwrites. By default the driver exposes SPI serial flash +contents as read-only but it can be changed from kernel command line, +passing "intel-spi.writeable=1". + +Please keep in mind that overwriting the BIOS image on SPI serial flash +might render the machine unbootable and requires special equipment like +Dediprog to revive. You have been warned! + +Below are the steps how to upgrade MinnowBoard MAX BIOS directly from +Linux. + + 1) Download and extract the latest Minnowboard MAX BIOS SPI image + [1]. At the time writing this the latest image is v92. + + 2) Install mtd-utils package [2]. We need this in order to erase the SPI + serial flash. Distros like Debian and Fedora have this prepackaged with + name "mtd-utils". + + 3) Add "intel-spi.writeable=1" to the kernel command line and reboot + the board (you can also reload the driver passing "writeable=1" as + module parameter to modprobe). + + 4) Once the board is up and running again, find the right MTD partition + (it is named as "BIOS"): + + # cat /proc/mtd + dev: size erasesize name + mtd0: 00800000 00001000 "BIOS" + + So here it will be /dev/mtd0 but it may vary. + + 5) Make backup of the existing image first: + + # dd if=/dev/mtd0ro of=bios.bak + 16384+0 records in + 16384+0 records out + 8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s + + 6) Verify the backup + + # sha1sum /dev/mtd0ro bios.bak + fdbb011920572ca6c991377c4b418a0502668b73 /dev/mtd0ro + fdbb011920572ca6c991377c4b418a0502668b73 bios.bak + + The SHA1 sums must match. Otherwise do not continue any further! + + 7) Erase the SPI serial flash. After this step, do not reboot the + board! Otherwise it will not start anymore. + + # flash_erase /dev/mtd0 0 0 + Erasing 4 Kibyte @ 7ff000 -- 100 % complete + + 8) Once completed without errors you can write the new BIOS image: + + # dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0 + + 9) Verify that the new content of the SPI serial flash matches the new + BIOS image: + + # sha1sum /dev/mtd0ro MNW2MAX1.X64.0092.R01.1605221712.bin + 9b4df9e4be2057fceec3a5529ec3d950836c87a2 /dev/mtd0ro + 9b4df9e4be2057fceec3a5529ec3d950836c87a2 MNW2MAX1.X64.0092.R01.1605221712.bin + + The SHA1 sums should match. + + 10) Now you can reboot your board and observe the new BIOS starting up + properly. + +References +---------- + +[1] https://firmware.intel.com/sites/default/files/MinnowBoard.MAX_.X64.92.R01.zip +[2] http://www.linux-mtd.infradead.org/
drivers/mtd/spi-nor/Kconfig +20 -0
@@ -76,4 +76,24 @@ config SPI_NXP_SPIFI Flash. Enable this option if you have a device with a SPIFI controller and want to access the Flash as a mtd device. +config SPI_INTEL_SPI + tristate + +config SPI_INTEL_SPI_PLATFORM + tristate "Intel PCH/PCU SPI flash platform driver" if EXPERT + depends on X86 + select SPI_INTEL_SPI + help + This enables platform support for the Intel PCH/PCU SPI + controller in master mode. This controller is present in modern + Intel hardware and is used to hold BIOS and other persistent + settings. Using this driver it is possible to upgrade BIOS + directly from Linux. + + Say N here unless you know what you are doing. Overwriting the + SPI flash may render the system unbootable. + + To compile this driver as a module, choose M here: the module + will be called intel-spi-platform. + endif # MTD_SPI_NOR
drivers/mtd/spi-nor/Makefile +2 -0
@@ -5,3 +5,5 @@ obj-$(CONFIG_SPI_FSL_QUADSPI) += fsl-quadspi.o obj-$(CONFIG_SPI_HISI_SFC) += hisi-sfc.o obj-$(CONFIG_MTD_MT81xx_NOR) += mtk-quadspi.o obj-$(CONFIG_SPI_NXP_SPIFI) += nxp-spifi.o +obj-$(CONFIG_SPI_INTEL_SPI) += intel-spi.o +obj-$(CONFIG_SPI_INTEL_SPI_PLATFORM) += intel-spi-platform.o
drivers/mtd/spi-nor/intel-spi-platform.c new file +57 -0
57 lines not on this page · raw message
drivers/mtd/spi-nor/intel-spi.c new file +777 -0
777 lines not on this page · raw message
drivers/mtd/spi-nor/intel-spi.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* Intel PCH/PCU SPI flash driver. +* +* Copyright (C) 2016, Intel Corporation +* Author: Mika Westerberg <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef INTEL_SPI_H +#define INTEL_SPI_H + +#include <linux/platform_data/intel-spi.h> + +struct intel_spi ; +struct resource ; + +struct intel_spi *intel_spi_probe (struct device *dev, +struct resource *mem,const struct intel_spi_boardinfo *info); +int intel_spi_remove (struct intel_spi *ispi); + +#endif /* INTEL_SPI_H */
include/linux/platform_data/intel-spi.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Intel PCH/PCU SPI flash driver. +* +* Copyright (C) 2016, Intel Corporation +* Author: Mika Westerberg <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef INTEL_SPI_PDATA_H +#define INTEL_SPI_PDATA_H + +enum intel_spi_type { +INTEL_SPI_BYT =1 , +INTEL_SPI_LPT , +INTEL_SPI_BXT , +}; + +/** +* struct intel_spi_boardinfo - Board specific data for Intel SPI driver +* @type: Type which this controller is compatible with +* @writeable: The chip is writeable +*/ +struct intel_spi_boardinfo { +enum intel_spi_type type; +bool writeable; +}; + +#endif /* INTEL_SPI_PDATA_H */
Signature · 1 line
2.10.2
PATCH v6 3/3 mfd: lpc_ich: Add support for Intel Apollo Lake SoC
In reply to Mika WesterbergIntel Apollo Lake SoC exposes serial SPI flash through the LPC device. The SPI flash host controller is not discoverable through PCI config cycles because P2SB (function 0 of the device 13) is hidden by the BIOS. We unhide the device briefly in order to read BAR 0 of the SPI host controller.
--- drivers/mfd/lpc_ich.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
drivers/mfd/lpc_ich.c +39 -0
@@ -56,6 +56,7 @@* document number TBD : Wildcat Point-LP * document number TBD : 9 Series * document number TBD : Lewisburg +* document number TBD : Apollo Lake SoC */ #define pr_fmt (fmt) KBUILD_MODNAME ": " fmt
@@ -92,6 +93,8 @@#define BCR 0xdc#define BCR_WPD BIT(0) +#define SPIBASE_APL_SZ 4096 +#define GPIOBASE_ICH0 0x58#define GPIOCTRL_ICH0 0x5C#define GPIOBASE_ICH6 0x48
@@ -239,6 +242,7 @@ enum lpc_chipsets {LPC_BRASWELL ,/* Braswell SoC */ LPC_LEWISBURG ,/* Lewisburg */ LPC_9S ,/* 9 Series */ + LPC_APL, /* Apollo Lake SoC */ }; static struct lpc_ich_info lpc_chipset_info[] = {
@@ -559,6 +563,10 @@ static struct lpc_ich_info lpc_chipset_info[] = { .name = "9 Series", .iTCO_version = 2, }, + [LPC_APL] = { + .name = "Apollo Lake SoC", + .spi_type = INTEL_SPI_BXT, + }, };/*
@@ -707,6 +715,7 @@ static const struct pci_device_id lpc_ich_ids[] = { { PCI_VDEVICE(INTEL, 0x3b14), LPC_3420}, { PCI_VDEVICE(INTEL, 0x3b16), LPC_3450}, { PCI_VDEVICE(INTEL, 0x5031), LPC_EP80579}, + { PCI_VDEVICE(INTEL, 0x5ae8), LPC_APL}, { PCI_VDEVICE(INTEL, 0x8c40), LPC_LPT}, { PCI_VDEVICE(INTEL, 0x8c41), LPC_LPT}, { PCI_VDEVICE(INTEL, 0x8c42), LPC_LPT},
@@ -1126,6 +1135,36 @@ static int lpc_ich_init_spi(struct pci_dev *dev) }break ; +case INTEL_SPI_BXT : { +unsigned int p2sb =PCI_DEVFN (13 ,0 ); +unsigned int spi =PCI_DEVFN (13 ,2 ); +struct pci_bus *bus = dev->bus; + +/* +* The P2SB is hidden by BIOS and we need to unhide it in +* order to read BAR of the SPI flash device. Once that is +* done we hide it again. +*/ +pci_bus_write_config_byte (bus, p2sb,0xe1 ,0x0 ); +pci_bus_read_config_dword (bus, spi,PCI_BASE_ADDRESS_0 , + &spi_base); +if (spi_base != ~0 ) { + res->start = spi_base &0xfffffff0 ; + 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 ); + } + +pci_bus_write_config_byte (bus, p2sb,0xe1 ,0x1 ); +break ; + } +default :return -EINVAL ; }
Signature · 1 line
2.10.2
Re: [PATCH v6 2/3] mfd: lpc_ich: Add support for SPI serial flash host controller
In reply to Mika WesterbergQuoted 7 lines · Mika Westerberg
Many Intel CPUs including Haswell, Broadwell and Baytrail have SPI serial flash host controller as part of the LPC device. This will populate an MFD cell suitable for the SPI host controller driver if we know that the LPC device has one.
Signed-off-by Mika Westerberg <[email protected]>Acked-by Lee Jones <[email protected]>
Signature · 2 lines
Best regards, Marek Vasut
Quoted 10 lines · Mika Westerberg
Add support for the SPI serial flash host controller found on many Intel CPUs including Baytrail and Braswell. The SPI serial flash controller is used to access BIOS and other platform specific information. By default the driver exposes a single read-only MTD device but with a module parameter "writeable=1" the MTD device can be made read-write which makes it possible to upgrade BIOS directly from Linux.
Signed-off-by Mika Westerberg <[email protected]>Acked-by Cyrille Pitchen <[email protected]>---
[...]
Signature · 2 lines
Best regards, Marek Vasut
Quoted 15 lines · Mika Westerberg
This is 6th iteration of the series. You can find the previous versions archived on:
v5: https://lwn.net/Articles/706363/
v4: https://lwn.net/Articles/703773/
v3: https://lwn.net/Articles/697231/
v2: http://lists.infradead.org/pipermail/linux-mtd/2016-June/068277.html
v1: https://lkml.org/lkml/2016/6/14/269This patch series adds support for the Intel SPI serial flash controller found on many recent Intel CPUs including Baytrail and Braswell. This driver makes it possible to access the BIOS and other platform data which is stored on the SPI serial flash. It is also possible to upgrade the BIOS using this driver if it has not been protected by special hardware bits.
Quoted 6 lines
The patch [1/3] includes documentation how to upgrade BIOS on MinnowBoard MAX.
Since poking the SPI serial flash can brick the machine, this driver can only be enabled when
CONFIG_EXPERT=yand even then it will remain read-only unless instructed othwerwise by module parameter.
Hi Lee,
I think we have enough acks from the MTD maintainers. I wonder if you could merge this series via your MFD tree?
Quoted 19 lines · Mika Westerberg
Quoted 18 lines · Mika Westerberg
This is 6th iteration of the series. You can find the previous versions archived on:
v5: https://lwn.net/Articles/706363/
v4: https://lwn.net/Articles/703773/
v3: https://lwn.net/Articles/697231/
v2: http://lists.infradead.org/pipermail/linux-mtd/2016-June/068277.html
v1: https://lkml.org/lkml/2016/6/14/269This patch series adds support for the Intel SPI serial flash controller found on many recent Intel CPUs including Baytrail and Braswell. This driver makes it possible to access the BIOS and other platform data which is stored on the SPI serial flash. It is also possible to upgrade the BIOS using this driver if it has not been protected by special hardware bits.
The patch [1/3] includes documentation how to upgrade BIOS on MinnowBoard MAX.
Quoted 9 lines
Quoted 3 lines
Since poking the SPI serial flash can brick the machine, this driver can only be enabled when
CONFIG_EXPERT=yand even then it will remain read-only unless instructed othwerwise by module parameter.Hi Lee,
I think we have enough acks from the MTD maintainers. I wonder if you could merge this series via your MFD tree?
Ideally you'd merge 1/3 via MTD and 2,3/3 via MFD, but I'm not sure if that is possible and if that is a sensible thing to do.
Signature · 2 lines
Best regards, Marek Vasut
Quoted 24 lines · Marek Vasut
Quoted 23 lines · Mika Westerberg
Quoted 21 lines · Mika Westerberg
This is 6th iteration of the series. You can find the previous versions archived on:
v5: https://lwn.net/Articles/706363/
v4: https://lwn.net/Articles/703773/
v3: https://lwn.net/Articles/697231/
v2: http://lists.infradead.org/pipermail/linux-mtd/2016-June/068277.html
v1: https://lkml.org/lkml/2016/6/14/269This patch series adds support for the Intel SPI serial flash controller found on many recent Intel CPUs including Baytrail and Braswell. This driver makes it possible to access the BIOS and other platform data which is stored on the SPI serial flash. It is also possible to upgrade the BIOS using this driver if it has not been protected by special hardware bits.
The patch [1/3] includes documentation how to upgrade BIOS on MinnowBoard MAX.
Since poking the SPI serial flash can brick the machine, this driver can only be enabled when
CONFIG_EXPERT=yand even then it will remain read-only unless instructed othwerwise by module parameter.
Quoted 7 lines
Quoted 5 lines
Hi Lee,
I think we have enough acks from the MTD maintainers. I wonder if you could merge this series via your MFD tree?
Ideally you'd merge 1/3 via MTD and 2,3/3 via MFD, but I'm not sure if that is possible and if that is a sensible thing to do.
There is a dependency between patches 1 and 2 (and 3) so they should be merged together to avoid build errors. I'm fine if they go via either tree as long as someone picks them up ;-)
Quoted 30 lines · Mika Westerberg
Quoted 29 lines · Marek Vasut
Quoted 28 lines · Mika Westerberg
Quoted 15 lines · Mika Westerberg
This is 6th iteration of the series. You can find the previous versions archived on:
v5: https://lwn.net/Articles/706363/
v4: https://lwn.net/Articles/703773/
v3: https://lwn.net/Articles/697231/
v2: http://lists.infradead.org/pipermail/linux-mtd/2016-June/068277.html
v1: https://lkml.org/lkml/2016/6/14/269This patch series adds support for the Intel SPI serial flash controller found on many recent Intel CPUs including Baytrail and Braswell. This driver makes it possible to access the BIOS and other platform data which is stored on the SPI serial flash. It is also possible to upgrade the BIOS using this driver if it has not been protected by special hardware bits.
Quoted 6 lines
The patch [1/3] includes documentation how to upgrade BIOS on MinnowBoard MAX.
Since poking the SPI serial flash can brick the machine, this driver can only be enabled when
CONFIG_EXPERT=yand even then it will remain read-only unless instructed othwerwise by module parameter.Hi Lee,
I think we have enough acks from the MTD maintainers. I wonder if you could merge this series via your MFD tree?
Quoted 7 lines
Quoted 2 lines
Ideally you'd merge 1/3 via MTD and 2,3/3 via MFD, but I'm not sure if that is possible and if that is a sensible thing to do.
There is a dependency between patches 1 and 2 (and 3) so they should be merged together to avoid build errors. I'm fine if they go via either tree as long as someone picks them up ;-)
Hi Lee,
we can take it in the mtd: spi-nor: tree if you want, just let us know whether it's fine with you or if you prefer to take it from mtd.
Best regards,
Cyrille
Quoted 34 lines · Cyrille Pitchen
Quoted 33 lines · Mika Westerberg
Quoted 31 lines · Marek Vasut
Quoted 19 lines · Mika Westerberg
Quoted 18 lines · Mika Westerberg
This is 6th iteration of the series. You can find the previous versions archived on:
v5: https://lwn.net/Articles/706363/
v4: https://lwn.net/Articles/703773/
v3: https://lwn.net/Articles/697231/
v2: http://lists.infradead.org/pipermail/linux-mtd/2016-June/068277.html
v1: https://lkml.org/lkml/2016/6/14/269This patch series adds support for the Intel SPI serial flash controller found on many recent Intel CPUs including Baytrail and Braswell. This driver makes it possible to access the BIOS and other platform data which is stored on the SPI serial flash. It is also possible to upgrade the BIOS using this driver if it has not been protected by special hardware bits.
The patch [1/3] includes documentation how to upgrade BIOS on MinnowBoard MAX.
Quoted 9 lines
Quoted 3 lines
Since poking the SPI serial flash can brick the machine, this driver can only be enabled when
CONFIG_EXPERT=yand even then it will remain read-only unless instructed othwerwise by module parameter.Hi Lee,
I think we have enough acks from the MTD maintainers. I wonder if you could merge this series via your MFD tree?
Ideally you'd merge 1/3 via MTD and 2,3/3 via MFD, but I'm not sure if that is possible and if that is a sensible thing to do.
Quoted 7 lines
Quoted 4 lines
There is a dependency between patches 1 and 2 (and 3) so they should be merged together to avoid build errors. I'm fine if they go via either tree as long as someone picks them up ;-)
we can take it in the mtd: spi-nor: tree if you want, just let us know whether it's fine with you or if you prefer to take it from mtd.
I'm happy either way. However if you take them, I will require a pull-request to an immutable branch containing only these patches.
If I take them, it won't be until v4.11, since we are half way though -rc8 already and I would like them to soak in -next for at least a couple of weeks.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 6 lines · Lee Jones
I'm happy either way. However if you take them, I will require a pull-request to an immutable branch containing only these patches.
If I take them, it won't be until v4.11, since we are half way though -rc8 already and I would like them to soak in -next for at least a couple of weeks.
This series already missed v4.8 and v4.9 so I don't think there is a rush to get it for v4.10 either ;-) I'm fine if it goes for v4.11.
Quoted 10 lines · Mika Westerberg
Quoted 6 lines · Lee Jones
I'm happy either way. However if you take them, I will require a pull-request to an immutable branch containing only these patches.
If I take them, it won't be until v4.11, since we are half way though -rc8 already and I would like them to soak in -next for at least a couple of weeks.
This series already missed v4.8 and v4.9 so I don't think there is a rush to get it for v4.10 either ;-) I'm fine if it goes for v4.11.
Hmmmmmmmmmmm, that kinda sucks. Lee, are you positive this isn't 4.10 material ?
Signature · 2 lines
Best regards, Marek Vasut
Quoted 9 lines · Marek Vasut
Quoted 8 lines · Mika Westerberg
Quoted 6 lines · Lee Jones
I'm happy either way. However if you take them, I will require a pull-request to an immutable branch containing only these patches.
If I take them, it won't be until v4.11, since we are half way though -rc8 already and I would like them to soak in -next for at least a couple of weeks.
Quoted 5 lines
Quoted 2 lines
This series already missed v4.8 and v4.9 so I don't think there is a rush to get it for v4.10 either ;-) I'm fine if it goes for v4.11.
Hmmmmmmmmmmm, that kinda sucks. Lee, are you positive this isn't 4.10 material ?
The merge-window opens in 2 days.
As I mentioned, I like patches to reside in -next for at least 1 maybe 2 RC cycles before merging. It's far to easy to accept code, then get bitten if/when it breaks after being merged by Linus.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 14 lines · Lee Jones
Quoted 12 lines · Marek Vasut
Quoted 10 lines · Mika Westerberg
Quoted 6 lines · Lee Jones
I'm happy either way. However if you take them, I will require a pull-request to an immutable branch containing only these patches.
If I take them, it won't be until v4.11, since we are half way though -rc8 already and I would like them to soak in -next for at least a couple of weeks.
This series already missed v4.8 and v4.9 so I don't think there is a rush to get it for v4.10 either ;-) I'm fine if it goes for v4.11.
Quoted 8 lines
Quoted 2 lines
Hmmmmmmmmmmm, that kinda sucks. Lee, are you positive this isn't 4.10 material ?
The merge-window opens in 2 days.
As I mentioned, I like patches to reside in -next for at least 1 maybe 2 RC cycles before merging. It's far to easy to accept code, then get bitten if/when it breaks after being merged by Linus.
I agree. Better to give it some time in linux-next.
Can you queue this series for v4.11?
Quoted 20 lines · Mika Westerberg
Quoted 19 lines · Lee Jones
Quoted 9 lines · Marek Vasut
Quoted 8 lines · Mika Westerberg
Quoted 6 lines · Lee Jones
I'm happy either way. However if you take them, I will require a pull-request to an immutable branch containing only these patches.
If I take them, it won't be until v4.11, since we are half way though -rc8 already and I would like them to soak in -next for at least a couple of weeks.
Quoted 5 lines
Quoted 2 lines
This series already missed v4.8 and v4.9 so I don't think there is a rush to get it for v4.10 either ;-) I'm fine if it goes for v4.11.
Hmmmmmmmmmmm, that kinda sucks. Lee, are you positive this isn't 4.10 material ?
The merge-window opens in 2 days.
Quoted 7 lines
Quoted 3 lines
As I mentioned, I like patches to reside in -next for at least 1 maybe 2 RC cycles before merging. It's far to easy to accept code, then get bitten if/when it breaks after being merged by Linus.
I agree. Better to give it some time in linux-next.
Can you queue this series for v4.11?
OK, I'm fine with this.
Signature · 2 lines
Best regards, Marek Vasut
Quoted 25 lines · Marek Vasut
Quoted 24 lines · Mika Westerberg
Quoted 22 lines · Lee Jones
Quoted 9 lines · Marek Vasut
Quoted 8 lines · Mika Westerberg
Quoted 6 lines · Lee Jones
I'm happy either way. However if you take them, I will require a pull-request to an immutable branch containing only these patches.
If I take them, it won't be until v4.11, since we are half way though -rc8 already and I would like them to soak in -next for at least a couple of weeks.
Quoted 5 lines
Quoted 2 lines
This series already missed v4.8 and v4.9 so I don't think there is a rush to get it for v4.10 either ;-) I'm fine if it goes for v4.11.
Hmmmmmmmmmmm, that kinda sucks. Lee, are you positive this isn't 4.10 material ?
The merge-window opens in 2 days.
As I mentioned, I like patches to reside in -next for at least 1 maybe 2 RC cycles before merging. It's far to easy to accept code, then get bitten if/when it breaks after being merged by Linus.
Quoted 5 lines
Quoted 3 lines
I agree. Better to give it some time in linux-next.
Can you queue this series for v4.11?
OK, I'm fine with this.
Yes, no problem.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 27 lines · Lee Jones
Quoted 25 lines · Marek Vasut
Quoted 24 lines · Mika Westerberg
Quoted 22 lines · Lee Jones
Quoted 9 lines · Marek Vasut
Quoted 8 lines · Mika Westerberg
Quoted 6 lines · Lee Jones
I'm happy either way. However if you take them, I will require a pull-request to an immutable branch containing only these patches.
If I take them, it won't be until v4.11, since we are half way though -rc8 already and I would like them to soak in -next for at least a couple of weeks.
Quoted 5 lines
Quoted 2 lines
This series already missed v4.8 and v4.9 so I don't think there is a rush to get it for v4.10 either ;-) I'm fine if it goes for v4.11.
Hmmmmmmmmmmm, that kinda sucks. Lee, are you positive this isn't 4.10 material ?
The merge-window opens in 2 days.
As I mentioned, I like patches to reside in -next for at least 1 maybe 2 RC cycles before merging. It's far to easy to accept code, then get bitten if/when it breaks after being merged by Linus.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
I agree. Better to give it some time in linux-next.
Can you queue this series for v4.11?
OK, I'm fine with this.
Yes, no problem.
Cool, thanks !
Signature · 2 lines
Best regards, Marek Vasut
[GIT PULL] Immutable branch between MFD and MTD due for the v4.11 merge window
In reply to Mika WesterbergMTD Maintainers,
Enjoy!
The following changes since commit 7ce7d89f48834cefece7804d38fc5d85382edf77:
Linux 4.10-rc1 (2016-12-25 16:13:08 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-mtd-v4.11
for you to fetch changes up to 87eb832ae9748fab00588b98c2e33e89de065438:
mfd: lpc_ich: Add support for Intel Apollo Lake SoC (2017-01-03 17:34:16 +0000)
----------------------------------------------------------------
Immutable branch between MFD and MTD due for the v4.11 merge window
----------------------------------------------------------------
Mika Westerberg (3):
spi-nor: Add support for Intel SPI serial flash controller
mfd: lpc_ich: Add support for SPI serial flash host controller
mfd: lpc_ich: Add support for Intel Apollo Lake SoC
Documentation/mtd/intel-spi.txt | 88 ++++ drivers/mfd/lpc_ich.c | 131 ++++++ drivers/mtd/spi-nor/Kconfig | 20 + drivers/mtd/spi-nor/Makefile | 2 + drivers/mtd/spi-nor/intel-spi-platform.c | 57 +++ drivers/mtd/spi-nor/intel-spi.c | 777 +++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/intel-spi.h | 24 + include/linux/mfd/lpc_ich.h | 3 + include/linux/platform_data/intel-spi.h | 31 ++ 9 files changed, 1133 insertions(+) create mode 100644 Documentation/mtd/intel-spi.txt create mode 100644 drivers/mtd/spi-nor/intel-spi-platform.c create mode 100644 drivers/mtd/spi-nor/intel-spi.c create mode 100644 drivers/mtd/spi-nor/intel-spi.h create mode 100644 include/linux/platform_data/intel-spi.h
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [GIT PULL] Immutable branch between MFD and MTD due for the v4.11 merge window
Quoted 16 lines · Lee Jones
MTD Maintainers,
Enjoy!
The following changes since commit
7ce7d89f48834cefece7804d38fc5d85382edf77:Linux 4.10-rc1 (2016-12-25 16:13:08 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.gitib-mfd-mtd-v4.11for you to fetch changes up to
87eb832ae9748fab00588b98c2e33e89de065438:mfd:
lpc_ich: Add support for Intel Apollo Lake SoC (2017-01-03 17:34:16 +0000)
Quoted 8 lines
----------------------------------------------------------------
Immutable branch between MFD and MTD due for the v4.11 merge window----------------------------------------------------------------
Mika Westerberg (3):
spi-nor: Add support for Intel SPI serial flash controller
mfd:lpc_ich: Add support for SPI serial flash host controller
mfd:lpc_ich: Add support for Intel Apollo Lake SoC
Thanks Lee for picking these up!
Cyrille Pitchen
AppliedRe: [GIT PULL] Immutable branch between MFD and MTD due for the v4.11 merge window
Quoted 20 lines · Mika Westerberg
Quoted 19 lines · Lee Jones
MTD Maintainers,
Enjoy!
The following changes since commit
7ce7d89f48834cefece7804d38fc5d85382edf77:Linux 4.10-rc1 (2016-12-25 16:13:08 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.gitib-mfd-mtd-v4.11for you to fetch changes up to
87eb832ae9748fab00588b98c2e33e89de065438:mfd:
lpc_ich: Add support for Intel Apollo Lake SoC (2017-01-03 17:34:16 +0000)----------------------------------------------------------------
Immutable branch between MFD and MTD due for the v4.11 merge window
Quoted 8 lines
Quoted 5 lines
----------------------------------------------------------------
Mika Westerberg (3):
spi-nor: Add support for Intel SPI serial flash controller
mfd:lpc_ich: Add support for SPI serial flash host controller
mfd:lpc_ich: Add support for Intel Apollo Lake SoCThanks Lee for picking these up!
Merged to git://github.com/spi-nor/linux.git
Thanks!
Re: [GIT PULL] Immutable branch between MFD and MTD due for the v4.11 merge window
In reply to Lee JonesQuoted 25 lines · Lee Jones
MTD Maintainers,
Enjoy!
The following changes since commit
7ce7d89f48834cefece7804d38fc5d85382edf77:Linux 4.10-rc1 (2016-12-25 16:13:08 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.gitib-mfd-mtd-v4.11for you to fetch changes up to
87eb832ae9748fab00588b98c2e33e89de065438:mfd:
lpc_ich: Add support for Intel Apollo Lake SoC (2017-01-03 17:34:16 +0000)----------------------------------------------------------------
Immutable branch between MFD and MTD due for the v4.11 merge window----------------------------------------------------------------
Mika Westerberg (3):
spi-nor: Add support for Intel SPI serial flash controller
mfd:lpc_ich: Add support for SPI serial flash host controller
mfd:lpc_ich: Add support for Intel Apollo Lake SoC
Quoted 15 lines
Documentation/mtd/intel-spi.txt | 88 ++++ drivers/mfd/lpc_ich.c | 131 ++++++ drivers/mtd/spi-nor/Kconfig | 20 + drivers/mtd/spi-nor/Makefile | 2 + drivers/mtd/spi-nor/intel-spi-platform.c | 57 +++ drivers/mtd/spi-nor/intel-spi.c | 777 +++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/intel-spi.h | 24 + include/linux/mfd/lpc_ich.h | 3 + include/linux/platform_data/intel-spi.h | 31 ++ 9 files changed, 1133 insertions(+) create mode 100644 Documentation/mtd/intel-spi.txt create mode 100644 drivers/mtd/spi-nor/intel-spi-platform.c create mode 100644 drivers/mtd/spi-nor/intel-spi.c create mode 100644 drivers/mtd/spi-nor/intel-spi.h create mode 100644 include/linux/platform_data/intel-spi.h
Hmm, I don't see the driver in linux-next. Is there something preventing you from merging the branch to your next branch?
Re: [GIT PULL] Immutable branch between MFD and MTD due for the v4.11 merge window
Hi Mika,
Quoted 42 lines · Mika Westerberg
Quoted 25 lines · Lee Jones
MTD Maintainers,
Enjoy!
The following changes since commit
7ce7d89f48834cefece7804d38fc5d85382edf77:Linux 4.10-rc1 (2016-12-25 16:13:08 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.gitib-mfd-mtd-v4.11for you to fetch changes up to
87eb832ae9748fab00588b98c2e33e89de065438:mfd:
lpc_ich: Add support for Intel Apollo Lake SoC (2017-01-03 17:34:16 +0000)----------------------------------------------------------------
Immutable branch between MFD and MTD due for the v4.11 merge window----------------------------------------------------------------
Mika Westerberg (3):
spi-nor: Add support for Intel SPI serial flash controller
mfd:lpc_ich: Add support for SPI serial flash host controller
mfd:lpc_ich: Add support for Intel Apollo Lake SoCQuoted 15 lines
Documentation/mtd/intel-spi.txt | 88 ++++ drivers/mfd/lpc_ich.c | 131 ++++++ drivers/mtd/spi-nor/Kconfig | 20 + drivers/mtd/spi-nor/Makefile | 2 + drivers/mtd/spi-nor/intel-spi-platform.c | 57 +++ drivers/mtd/spi-nor/intel-spi.c | 777 +++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/intel-spi.h | 24 + include/linux/mfd/lpc_ich.h | 3 + include/linux/platform_data/intel-spi.h | 31 ++ 9 files changed, 1133 insertions(+) create mode 100644 Documentation/mtd/intel-spi.txt create mode 100644 drivers/mtd/spi-nor/intel-spi-platform.c create mode 100644 drivers/mtd/spi-nor/intel-spi.c create mode 100644 drivers/mtd/spi-nor/intel-spi.h create mode 100644 include/linux/platform_data/intel-spi.h
Quoted 3 lines
Hmm, I don't see the driver in linux-next. Is there something preventing you from merging the branch to your next branch?
I've just sent an email to Stephen Rothwell to ask him whether he could include the "next" branch of the spi-nor tree into linux-next builds.
Best regards,
Cyrille
Re: [GIT PULL] Immutable branch between MFD and MTD due for the v4.11 merge window
Quoted 2 lines · Cyrille Pitchen
I've just sent an email to Stephen Rothwell to ask him whether he could include the "next" branch of the spi-nor tree into linux-next builds.
OK, thanks!
Re: [GIT PULL] Immutable branch between MFD and MTD due for the v4.11 merge window
In reply to Mika WesterbergQuoted 42 lines · Mika Westerberg
Quoted 25 lines · Lee Jones
MTD Maintainers,
Enjoy!
The following changes since commit
7ce7d89f48834cefece7804d38fc5d85382edf77:Linux 4.10-rc1 (2016-12-25 16:13:08 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.gitib-mfd-mtd-v4.11for you to fetch changes up to
87eb832ae9748fab00588b98c2e33e89de065438:mfd:
lpc_ich: Add support for Intel Apollo Lake SoC (2017-01-03 17:34:16 +0000)----------------------------------------------------------------
Immutable branch between MFD and MTD due for the v4.11 merge window----------------------------------------------------------------
Mika Westerberg (3):
spi-nor: Add support for Intel SPI serial flash controller
mfd:lpc_ich: Add support for SPI serial flash host controller
mfd:lpc_ich: Add support for Intel Apollo Lake SoCQuoted 15 lines
Documentation/mtd/intel-spi.txt | 88 ++++ drivers/mfd/lpc_ich.c | 131 ++++++ drivers/mtd/spi-nor/Kconfig | 20 + drivers/mtd/spi-nor/Makefile | 2 + drivers/mtd/spi-nor/intel-spi-platform.c | 57 +++ drivers/mtd/spi-nor/intel-spi.c | 777 +++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/intel-spi.h | 24 + include/linux/mfd/lpc_ich.h | 3 + include/linux/platform_data/intel-spi.h | 31 ++ 9 files changed, 1133 insertions(+) create mode 100644 Documentation/mtd/intel-spi.txt create mode 100644 drivers/mtd/spi-nor/intel-spi-platform.c create mode 100644 drivers/mtd/spi-nor/intel-spi.c create mode 100644 drivers/mtd/spi-nor/intel-spi.h create mode 100644 include/linux/platform_data/intel-spi.h
Quoted 2 lines
Hmm, I don't see the driver in linux-next. Is there something preventing you from merging the branch to your next branch?
Should be in -next by tomorrow.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog