You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'ib-mfd-mtd-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
From Lee Jones: """ Immutable branch between MFD and MTD due for the v4.11 merge window """
This commit is contained in:
@@ -86,4 +86,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
|
||||
|
||||
@@ -6,3 +6,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
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Intel PCH/PCU SPI flash platform driver.
|
||||
*
|
||||
* Copyright (C) 2016, Intel Corporation
|
||||
* Author: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "intel-spi.h"
|
||||
|
||||
static int intel_spi_platform_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct intel_spi_boardinfo *info;
|
||||
struct intel_spi *ispi;
|
||||
struct resource *mem;
|
||||
|
||||
info = dev_get_platdata(&pdev->dev);
|
||||
if (!info)
|
||||
return -EINVAL;
|
||||
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
ispi = intel_spi_probe(&pdev->dev, mem, info);
|
||||
if (IS_ERR(ispi))
|
||||
return PTR_ERR(ispi);
|
||||
|
||||
platform_set_drvdata(pdev, ispi);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int intel_spi_platform_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct intel_spi *ispi = platform_get_drvdata(pdev);
|
||||
|
||||
return intel_spi_remove(ispi);
|
||||
}
|
||||
|
||||
static struct platform_driver intel_spi_platform_driver = {
|
||||
.probe = intel_spi_platform_probe,
|
||||
.remove = intel_spi_platform_remove,
|
||||
.driver = {
|
||||
.name = "intel-spi",
|
||||
},
|
||||
};
|
||||
|
||||
module_platform_driver(intel_spi_platform_driver);
|
||||
|
||||
MODULE_DESCRIPTION("Intel PCH/PCU SPI flash platform driver");
|
||||
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_ALIAS("platform:intel-spi");
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Intel PCH/PCU SPI flash driver.
|
||||
*
|
||||
* Copyright (C) 2016, Intel Corporation
|
||||
* Author: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
*
|
||||
* 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 */
|
||||
Reference in New Issue
Block a user