* [PATCH v7 1/6] x86/platform/p2sb: New Primary to Sideband bridge support driver for Intel SOC's
2016-09-28 9:52 [PATCH v7 0/6] pinctrl/broxton: enable platform device in the absent of ACPI enumeration Tan Jui Nee
@ 2016-09-28 9:52 ` Tan Jui Nee
2016-09-29 17:34 ` Thomas Gleixner
2016-09-28 9:52 ` [PATCH v7 2/6] mfd: lpc_ich: Rename lpc-ich driver Tan Jui Nee
` (4 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Tan Jui Nee @ 2016-09-28 9:52 UTC (permalink / raw)
To: mika.westerberg, heikki.krogerus, andriy.shevchenko, tglx, mingo,
hpa, x86, ptyser, lee.jones, linus.walleij
Cc: linux-gpio, linux-kernel, jui.nee.tan, jonathan.yong, ong.hock.yu,
tony.luck, wan.ahmad.zainie.wan.mohamad
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
There is already one and at least one more user coming which
require an access to Primary to Sideband bridge (P2SB) in order
to get IO or MMIO bar hidden by BIOS.
Create a driver to access P2SB for x86 devices.
Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
Changes in V7:
- EXPORT_SYMBOL_GPL() and MODULE_LICENSE("GPL v2") are used for new file
p2sb.c.
Changes in V6:
- No change
Changes in V5:
- No change
Changes in V4:
- Move Kconfig option CONFIG_X86_INTEL_NON_ACPI from
[PATCH 2/3] x86/platform/p2sb: New Primary to Sideband bridge support driver for Intel SOC's
to
[PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
since the config is used in latter patch.
Changes in V3:
- No change
Changes in V2:
- Add new config option CONFIG_X86_INTEL_NON_ACPI and "select PINCTRL"
to fix kbuildbot error
arch/x86/Kconfig | 4 ++
arch/x86/include/asm/p2sb.h | 27 +++++++++++
arch/x86/platform/intel/Makefile | 1 +
arch/x86/platform/intel/p2sb.c | 98 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 130 insertions(+)
create mode 100644 arch/x86/include/asm/p2sb.h
create mode 100644 arch/x86/platform/intel/p2sb.c
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2a1f0ce..edc0313 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -602,6 +602,10 @@ config IOSF_MBI_DEBUG
If you don't require the option or are in doubt, say N.
+config P2SB
+ tristate
+ depends on PCI
+
config X86_RDC321X
bool "RDC R-321x SoC"
depends on X86_32
diff --git a/arch/x86/include/asm/p2sb.h b/arch/x86/include/asm/p2sb.h
new file mode 100644
index 0000000..686e07b
--- /dev/null
+++ b/arch/x86/include/asm/p2sb.h
@@ -0,0 +1,27 @@
+/*
+ * Primary to Sideband bridge (P2SB) access support
+ */
+
+#ifndef P2SB_SYMS_H
+#define P2SB_SYMS_H
+
+#include <linux/ioport.h>
+#include <linux/pci.h>
+
+#if IS_ENABLED(CONFIG_P2SB)
+
+int p2sb_bar(struct pci_dev *pdev, unsigned int devfn,
+ struct resource *res);
+
+#else /* CONFIG_P2SB is not set */
+
+static inline
+int p2sb_bar(struct pci_dev *pdev, unsigned int devfn,
+ struct resource *res)
+{
+ return -ENODEV;
+}
+
+#endif /* CONFIG_P2SB */
+
+#endif /* P2SB_SYMS_H */
diff --git a/arch/x86/platform/intel/Makefile b/arch/x86/platform/intel/Makefile
index b878032..dbf9f10 100644
--- a/arch/x86/platform/intel/Makefile
+++ b/arch/x86/platform/intel/Makefile
@@ -1 +1,2 @@
obj-$(CONFIG_IOSF_MBI) += iosf_mbi.o
+obj-$(CONFIG_P2SB) += p2sb.o
diff --git a/arch/x86/platform/intel/p2sb.c b/arch/x86/platform/intel/p2sb.c
new file mode 100644
index 0000000..b1d784c
--- /dev/null
+++ b/arch/x86/platform/intel/p2sb.c
@@ -0,0 +1,98 @@
+/*
+ * Primary to Sideband bridge (P2SB) driver
+ *
+ * Copyright (c) 2016, Intel Corporation.
+ *
+ * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+ * Jonathan Yong <jonathan.yong@intel.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ */
+
+#include <linux/ioport.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/spinlock.h>
+
+#include <asm/p2sb.h>
+
+#define SBREG_BAR 0x10
+#define SBREG_HIDE 0xe1
+
+static DEFINE_SPINLOCK(p2sb_spinlock);
+
+/*
+ * p2sb_bar - Get Primary to Sideband bridge (P2SB) BAR
+ * @pdev: PCI device to get PCI bus to communicate with
+ * @devfn: PCI device and function to communicate with
+ * @res: resources to be filled in
+ *
+ * The BIOS prevents the P2SB device from being enumerated by the PCI
+ * subsystem, so we need to unhide and hide it back to lookup the P2SB BAR.
+ *
+ * Locking is handled by spinlock - cannot sleep.
+ *
+ * Return:
+ * 0 on success or appropriate errno value on error.
+ */
+int p2sb_bar(struct pci_dev *pdev, unsigned int devfn,
+ struct resource *res)
+{
+ u32 base_addr;
+ u64 base64_addr;
+ unsigned long flags;
+
+ if (!res)
+ return -EINVAL;
+
+ spin_lock(&p2sb_spinlock);
+
+ /* Unhide the P2SB device */
+ pci_bus_write_config_byte(pdev->bus, devfn, SBREG_HIDE, 0x00);
+
+ /* Check if device present */
+ pci_bus_read_config_dword(pdev->bus, devfn, 0, &base_addr);
+ if (base_addr == 0xffffffff || base_addr == 0x00000000) {
+ spin_unlock(&p2sb_spinlock);
+ dev_warn(&pdev->dev, "P2SB device access disabled by BIOS?\n");
+ return -ENODEV;
+ }
+
+ /* Get IO or MMIO BAR */
+ pci_bus_read_config_dword(pdev->bus, devfn, SBREG_BAR, &base_addr);
+ if ((base_addr & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) {
+ flags = IORESOURCE_IO;
+ base64_addr = base_addr & PCI_BASE_ADDRESS_IO_MASK;
+ } else {
+ flags = IORESOURCE_MEM;
+ base64_addr = base_addr & PCI_BASE_ADDRESS_MEM_MASK;
+ if (base_addr & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ flags |= IORESOURCE_MEM_64;
+ pci_bus_read_config_dword(pdev->bus, devfn,
+ SBREG_BAR + 4, &base_addr);
+ base64_addr |= (u64)base_addr << 32;
+ }
+ }
+
+ /* Hide the P2SB device */
+ pci_bus_write_config_byte(pdev->bus, devfn, SBREG_HIDE, 0x01);
+
+ spin_unlock(&p2sb_spinlock);
+
+ /* User provides prefilled resources */
+ res->start = (resource_size_t)base64_addr;
+ res->flags = flags;
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(p2sb_bar);
+
+MODULE_LICENSE("GPL v2");
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v7 1/6] x86/platform/p2sb: New Primary to Sideband bridge support driver for Intel SOC's
2016-09-28 9:52 ` [PATCH v7 1/6] x86/platform/p2sb: New Primary to Sideband bridge support driver for Intel SOC's Tan Jui Nee
@ 2016-09-29 17:34 ` Thomas Gleixner
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Gleixner @ 2016-09-29 17:34 UTC (permalink / raw)
To: Tan Jui Nee
Cc: mika.westerberg, heikki.krogerus, andriy.shevchenko, mingo,
H. Peter Anvin, x86, ptyser, lee.jones, linus.walleij, linux-gpio,
LKML, jonathan.yong, ong.hock.yu, Tony Luck,
wan.ahmad.zainie.wan.mohamad, Darren Hart
On Wed, 28 Sep 2016, Tan Jui Nee wrote:
> arch/x86/Kconfig | 4 ++
> arch/x86/include/asm/p2sb.h | 27 +++++++++++
> arch/x86/platform/intel/Makefile | 1 +
> arch/x86/platform/intel/p2sb.c | 98 ++++++++++++++++++++++++++++++++++++++++
I think this should go into drivers/platform/x86
Thanks,
tglx
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v7 2/6] mfd: lpc_ich: Rename lpc-ich driver
2016-09-28 9:52 [PATCH v7 0/6] pinctrl/broxton: enable platform device in the absent of ACPI enumeration Tan Jui Nee
2016-09-28 9:52 ` [PATCH v7 1/6] x86/platform/p2sb: New Primary to Sideband bridge support driver for Intel SOC's Tan Jui Nee
@ 2016-09-28 9:52 ` Tan Jui Nee
2016-09-30 0:31 ` Lee Jones
2016-09-28 9:52 ` [PATCH v7 3/6] x86/intel-ivi: Add Intel In-Vehicle Infotainment (IVI) systems used in cars support Tan Jui Nee
` (3 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Tan Jui Nee @ 2016-09-28 9:52 UTC (permalink / raw)
To: mika.westerberg, heikki.krogerus, andriy.shevchenko, tglx, mingo,
hpa, x86, ptyser, lee.jones, linus.walleij
Cc: linux-gpio, linux-kernel, jui.nee.tan, jonathan.yong, ong.hock.yu,
tony.luck, wan.ahmad.zainie.wan.mohamad
This patch follows the example of mfd/wm831x to rename the driver
from "lpc_ich" to "lpc_ich-core".
Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
---
Changes in V7:
- No change
Changes in V6:
- none, just a subject line and commit message change.
drivers/mfd/Makefile | 1 +
drivers/mfd/{lpc_ich.c => lpc_ich-core.c} | 0
2 files changed, 1 insertion(+)
rename drivers/mfd/{lpc_ich.c => lpc_ich-core.c} (100%)
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 2ba3ba3..260f46f 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -155,6 +155,7 @@ obj-$(CONFIG_PMIC_ADP5520) += adp5520.o
obj-$(CONFIG_MFD_KEMPLD) += kempld-core.o
obj-$(CONFIG_MFD_INTEL_QUARK_I2C_GPIO) += intel_quark_i2c_gpio.o
obj-$(CONFIG_LPC_SCH) += lpc_sch.o
+lpc_ich-objs := lpc_ich-core.o
obj-$(CONFIG_LPC_ICH) += lpc_ich.o
obj-$(CONFIG_MFD_RDC321X) += rdc321x-southbridge.o
obj-$(CONFIG_MFD_JANZ_CMODIO) += janz-cmodio.o
diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich-core.c
similarity index 100%
rename from drivers/mfd/lpc_ich.c
rename to drivers/mfd/lpc_ich-core.c
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v7 2/6] mfd: lpc_ich: Rename lpc-ich driver
2016-09-28 9:52 ` [PATCH v7 2/6] mfd: lpc_ich: Rename lpc-ich driver Tan Jui Nee
@ 2016-09-30 0:31 ` Lee Jones
2016-10-07 7:39 ` Tan, Jui Nee
0 siblings, 1 reply; 14+ messages in thread
From: Lee Jones @ 2016-09-30 0:31 UTC (permalink / raw)
To: Tan Jui Nee
Cc: mika.westerberg, heikki.krogerus, andriy.shevchenko, tglx, mingo,
hpa, x86, ptyser, linus.walleij, linux-gpio, linux-kernel,
jonathan.yong, ong.hock.yu, tony.luck,
wan.ahmad.zainie.wan.mohamad
On Wed, 28 Sep 2016, Tan Jui Nee wrote:
> This patch follows the example of mfd/wm831x to rename the driver
> from "lpc_ich" to "lpc_ich-core".
>
> Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
> ---
> Changes in V7:
> - No change
>
> Changes in V6:
> - none, just a subject line and commit message change.
>
> drivers/mfd/Makefile | 1 +
> drivers/mfd/{lpc_ich.c => lpc_ich-core.c} | 0
> 2 files changed, 1 insertion(+)
> rename drivers/mfd/{lpc_ich.c => lpc_ich-core.c} (100%)
>
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index 2ba3ba3..260f46f 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -155,6 +155,7 @@ obj-$(CONFIG_PMIC_ADP5520) += adp5520.o
> obj-$(CONFIG_MFD_KEMPLD) += kempld-core.o
> obj-$(CONFIG_MFD_INTEL_QUARK_I2C_GPIO) += intel_quark_i2c_gpio.o
> obj-$(CONFIG_LPC_SCH) += lpc_sch.o
> +lpc_ich-objs := lpc_ich-core.o
Please use underscores OR obliques, not both.
> obj-$(CONFIG_LPC_ICH) += lpc_ich.o
> obj-$(CONFIG_MFD_RDC321X) += rdc321x-southbridge.o
> obj-$(CONFIG_MFD_JANZ_CMODIO) += janz-cmodio.o
> diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich-core.c
> similarity index 100%
> rename from drivers/mfd/lpc_ich.c
> rename to drivers/mfd/lpc_ich-core.c
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH v7 2/6] mfd: lpc_ich: Rename lpc-ich driver
2016-09-30 0:31 ` Lee Jones
@ 2016-10-07 7:39 ` Tan, Jui Nee
0 siblings, 0 replies; 14+ messages in thread
From: Tan, Jui Nee @ 2016-10-07 7:39 UTC (permalink / raw)
To: Lee Jones
Cc: mika.westerberg@linux.intel.com, heikki.krogerus@linux.intel.com,
andriy.shevchenko@linux.intel.com, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
ptyser@xes-inc.com, linus.walleij@linaro.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Yong, Jonathan, Yu, Ong Hock, Luck, Tony,
Wan Mohamad, Wan Ahmad Zainie
> -----Original Message-----
> From: Lee Jones [mailto:lee.jones@linaro.org]
> Sent: Friday, September 30, 2016 8:31 AM
> To: Tan, Jui Nee <jui.nee.tan@intel.com>
> Cc: mika.westerberg@linux.intel.com; heikki.krogerus@linux.intel.com;
> andriy.shevchenko@linux.intel.com; tglx@linutronix.de; mingo@redhat.com;
> hpa@zytor.com; x86@kernel.org; ptyser@xes-inc.com;
> linus.walleij@linaro.org; linux-gpio@vger.kernel.org; linux-
> kernel@vger.kernel.org; Yong, Jonathan <jonathan.yong@intel.com>; Yu, Ong
> Hock <ong.hock.yu@intel.com>; Luck, Tony <tony.luck@intel.com>; Wan
> Mohamad, Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
> Subject: Re: [PATCH v7 2/6] mfd: lpc_ich: Rename lpc-ich driver
>
> On Wed, 28 Sep 2016, Tan Jui Nee wrote:
>
> > This patch follows the example of mfd/wm831x to rename the driver from
> > "lpc_ich" to "lpc_ich-core".
> >
> > Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
> > ---
> > Changes in V7:
> > - No change
> >
> > Changes in V6:
> > - none, just a subject line and commit message change.
> >
> > drivers/mfd/Makefile | 1 +
> > drivers/mfd/{lpc_ich.c => lpc_ich-core.c} | 0
> > 2 files changed, 1 insertion(+)
> > rename drivers/mfd/{lpc_ich.c => lpc_ich-core.c} (100%)
> >
> > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index
> > 2ba3ba3..260f46f 100644
> > --- a/drivers/mfd/Makefile
> > +++ b/drivers/mfd/Makefile
> > @@ -155,6 +155,7 @@ obj-$(CONFIG_PMIC_ADP5520) += adp5520.o
> > obj-$(CONFIG_MFD_KEMPLD) += kempld-core.o
> > obj-$(CONFIG_MFD_INTEL_QUARK_I2C_GPIO) += intel_quark_i2c_gpio.o
> > obj-$(CONFIG_LPC_SCH) += lpc_sch.o
> > +lpc_ich-objs := lpc_ich-core.o
>
> Please use underscores OR obliques, not both.
>
Noted. I will send out another patch-set with filename lpc_ich_core.
> > obj-$(CONFIG_LPC_ICH) += lpc_ich.o
> > obj-$(CONFIG_MFD_RDC321X) += rdc321x-southbridge.o
> > obj-$(CONFIG_MFD_JANZ_CMODIO) += janz-cmodio.o
> > diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich-core.c
> > similarity index 100% rename from drivers/mfd/lpc_ich.c rename to
> > drivers/mfd/lpc_ich-core.c
>
> --
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source
> software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v7 3/6] x86/intel-ivi: Add Intel In-Vehicle Infotainment (IVI) systems used in cars support
2016-09-28 9:52 [PATCH v7 0/6] pinctrl/broxton: enable platform device in the absent of ACPI enumeration Tan Jui Nee
2016-09-28 9:52 ` [PATCH v7 1/6] x86/platform/p2sb: New Primary to Sideband bridge support driver for Intel SOC's Tan Jui Nee
2016-09-28 9:52 ` [PATCH v7 2/6] mfd: lpc_ich: Rename lpc-ich driver Tan Jui Nee
@ 2016-09-28 9:52 ` Tan Jui Nee
2016-09-28 9:52 ` [PATCH v7 4/6] mfd: move enum lpc_chipsets into lpc_ich.h Tan Jui Nee
` (2 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Tan Jui Nee @ 2016-09-28 9:52 UTC (permalink / raw)
To: mika.westerberg, heikki.krogerus, andriy.shevchenko, tglx, mingo,
hpa, x86, ptyser, lee.jones, linus.walleij
Cc: linux-gpio, linux-kernel, jui.nee.tan, jonathan.yong, ong.hock.yu,
tony.luck, wan.ahmad.zainie.wan.mohamad
Add support for non ACPI system, such as system that uses Advanced Boot
Loader (ABL) whereby a platform device has to be created in order to bind
with PINCTRL/GPIO.
At the moment, Intel Apollo Lake SoC requires P2SB driver to hide and
unhide P2SB to lookup P2SB BAR and pass the PCI BAR address to GPIO.
Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
---
arch/x86/Kconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index edc0313..ce5a048 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -511,6 +511,14 @@ config X86_INTEL_CE
This option compiles in support for the CE4100 SOC for settop
boxes and media devices.
+config X86_INTEL_IVI
+ bool "Intel In-Vehicle Infotainment (IVI) systems used in cars"
+ ---help---
+ Select this option to enable MMIO BAR access over the P2SB for
+ non-ACPI Intel Apollo Lake SoC platforms. This driver uses the P2SB
+ hide/unhide mechanism cooperatively to pass the PCI BAR address to
+ the platform driver, currently GPIO.
+
config X86_INTEL_MID
bool "Intel MID platform support"
depends on X86_EXTENDED_PLATFORM
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v7 4/6] mfd: move enum lpc_chipsets into lpc_ich.h
2016-09-28 9:52 [PATCH v7 0/6] pinctrl/broxton: enable platform device in the absent of ACPI enumeration Tan Jui Nee
` (2 preceding siblings ...)
2016-09-28 9:52 ` [PATCH v7 3/6] x86/intel-ivi: Add Intel In-Vehicle Infotainment (IVI) systems used in cars support Tan Jui Nee
@ 2016-09-28 9:52 ` Tan Jui Nee
2016-09-30 0:32 ` Lee Jones
2016-09-28 9:52 ` [PATCH v7 5/6] mfd: lpc_ich: Add Device IDs for Intel Apollo Lake PCH Tan Jui Nee
2016-09-28 9:52 ` [PATCH v7 6/6] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system Tan Jui Nee
5 siblings, 1 reply; 14+ messages in thread
From: Tan Jui Nee @ 2016-09-28 9:52 UTC (permalink / raw)
To: mika.westerberg, heikki.krogerus, andriy.shevchenko, tglx, mingo,
hpa, x86, ptyser, lee.jones, linus.walleij
Cc: linux-gpio, linux-kernel, jui.nee.tan, jonathan.yong, ong.hock.yu,
tony.luck, wan.ahmad.zainie.wan.mohamad
Move the enum's definition into a standalone header file which can be used
wherever its definition is needed.
Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
---
drivers/mfd/lpc_ich-core.c | 71 ---------------------------------------------
include/linux/mfd/lpc_ich.h | 71 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+), 71 deletions(-)
diff --git a/drivers/mfd/lpc_ich-core.c b/drivers/mfd/lpc_ich-core.c
index bd3aa45..05ed985 100644
--- a/drivers/mfd/lpc_ich-core.c
+++ b/drivers/mfd/lpc_ich-core.c
@@ -147,77 +147,6 @@ static struct mfd_cell lpc_ich_gpio_cell = {
.ignore_resource_conflicts = true,
};
-/* chipset related info */
-enum lpc_chipsets {
- LPC_ICH = 0, /* ICH */
- LPC_ICH0, /* ICH0 */
- LPC_ICH2, /* ICH2 */
- LPC_ICH2M, /* ICH2-M */
- LPC_ICH3, /* ICH3-S */
- LPC_ICH3M, /* ICH3-M */
- LPC_ICH4, /* ICH4 */
- LPC_ICH4M, /* ICH4-M */
- LPC_CICH, /* C-ICH */
- LPC_ICH5, /* ICH5 & ICH5R */
- LPC_6300ESB, /* 6300ESB */
- LPC_ICH6, /* ICH6 & ICH6R */
- LPC_ICH6M, /* ICH6-M */
- LPC_ICH6W, /* ICH6W & ICH6RW */
- LPC_631XESB, /* 631xESB/632xESB */
- LPC_ICH7, /* ICH7 & ICH7R */
- LPC_ICH7DH, /* ICH7DH */
- LPC_ICH7M, /* ICH7-M & ICH7-U */
- LPC_ICH7MDH, /* ICH7-M DH */
- LPC_NM10, /* NM10 */
- LPC_ICH8, /* ICH8 & ICH8R */
- LPC_ICH8DH, /* ICH8DH */
- LPC_ICH8DO, /* ICH8DO */
- LPC_ICH8M, /* ICH8M */
- LPC_ICH8ME, /* ICH8M-E */
- LPC_ICH9, /* ICH9 */
- LPC_ICH9R, /* ICH9R */
- LPC_ICH9DH, /* ICH9DH */
- LPC_ICH9DO, /* ICH9DO */
- LPC_ICH9M, /* ICH9M */
- LPC_ICH9ME, /* ICH9M-E */
- LPC_ICH10, /* ICH10 */
- LPC_ICH10R, /* ICH10R */
- LPC_ICH10D, /* ICH10D */
- LPC_ICH10DO, /* ICH10DO */
- LPC_PCH, /* PCH Desktop Full Featured */
- LPC_PCHM, /* PCH Mobile Full Featured */
- LPC_P55, /* P55 */
- LPC_PM55, /* PM55 */
- LPC_H55, /* H55 */
- LPC_QM57, /* QM57 */
- LPC_H57, /* H57 */
- LPC_HM55, /* HM55 */
- LPC_Q57, /* Q57 */
- LPC_HM57, /* HM57 */
- LPC_PCHMSFF, /* PCH Mobile SFF Full Featured */
- LPC_QS57, /* QS57 */
- LPC_3400, /* 3400 */
- LPC_3420, /* 3420 */
- LPC_3450, /* 3450 */
- LPC_EP80579, /* EP80579 */
- LPC_CPT, /* Cougar Point */
- LPC_CPTD, /* Cougar Point Desktop */
- LPC_CPTM, /* Cougar Point Mobile */
- LPC_PBG, /* Patsburg */
- LPC_DH89XXCC, /* DH89xxCC */
- LPC_PPT, /* Panther Point */
- LPC_LPT, /* Lynx Point */
- LPC_LPT_LP, /* Lynx Point-LP */
- LPC_WBG, /* Wellsburg */
- LPC_AVN, /* Avoton SoC */
- LPC_BAYTRAIL, /* Bay Trail SoC */
- LPC_COLETO, /* Coleto Creek */
- LPC_WPT_LP, /* Wildcat Point-LP */
- LPC_BRASWELL, /* Braswell SoC */
- LPC_LEWISBURG, /* Lewisburg */
- LPC_9S, /* 9 Series */
-};
-
static struct lpc_ich_info lpc_chipset_info[] = {
[LPC_ICH] = {
.name = "ICH",
diff --git a/include/linux/mfd/lpc_ich.h b/include/linux/mfd/lpc_ich.h
index 2b300b4..42307ee 100644
--- a/include/linux/mfd/lpc_ich.h
+++ b/include/linux/mfd/lpc_ich.h
@@ -43,4 +43,75 @@ struct lpc_ich_info {
u8 use_gpio;
};
+/* chipset related info */
+enum lpc_chipsets {
+ LPC_ICH = 0, /* ICH */
+ LPC_ICH0, /* ICH0 */
+ LPC_ICH2, /* ICH2 */
+ LPC_ICH2M, /* ICH2-M */
+ LPC_ICH3, /* ICH3-S */
+ LPC_ICH3M, /* ICH3-M */
+ LPC_ICH4, /* ICH4 */
+ LPC_ICH4M, /* ICH4-M */
+ LPC_CICH, /* C-ICH */
+ LPC_ICH5, /* ICH5 & ICH5R */
+ LPC_6300ESB, /* 6300ESB */
+ LPC_ICH6, /* ICH6 & ICH6R */
+ LPC_ICH6M, /* ICH6-M */
+ LPC_ICH6W, /* ICH6W & ICH6RW */
+ LPC_631XESB, /* 631xESB/632xESB */
+ LPC_ICH7, /* ICH7 & ICH7R */
+ LPC_ICH7DH, /* ICH7DH */
+ LPC_ICH7M, /* ICH7-M & ICH7-U */
+ LPC_ICH7MDH, /* ICH7-M DH */
+ LPC_NM10, /* NM10 */
+ LPC_ICH8, /* ICH8 & ICH8R */
+ LPC_ICH8DH, /* ICH8DH */
+ LPC_ICH8DO, /* ICH8DO */
+ LPC_ICH8M, /* ICH8M */
+ LPC_ICH8ME, /* ICH8M-E */
+ LPC_ICH9, /* ICH9 */
+ LPC_ICH9R, /* ICH9R */
+ LPC_ICH9DH, /* ICH9DH */
+ LPC_ICH9DO, /* ICH9DO */
+ LPC_ICH9M, /* ICH9M */
+ LPC_ICH9ME, /* ICH9M-E */
+ LPC_ICH10, /* ICH10 */
+ LPC_ICH10R, /* ICH10R */
+ LPC_ICH10D, /* ICH10D */
+ LPC_ICH10DO, /* ICH10DO */
+ LPC_PCH, /* PCH Desktop Full Featured */
+ LPC_PCHM, /* PCH Mobile Full Featured */
+ LPC_P55, /* P55 */
+ LPC_PM55, /* PM55 */
+ LPC_H55, /* H55 */
+ LPC_QM57, /* QM57 */
+ LPC_H57, /* H57 */
+ LPC_HM55, /* HM55 */
+ LPC_Q57, /* Q57 */
+ LPC_HM57, /* HM57 */
+ LPC_PCHMSFF, /* PCH Mobile SFF Full Featured */
+ LPC_QS57, /* QS57 */
+ LPC_3400, /* 3400 */
+ LPC_3420, /* 3420 */
+ LPC_3450, /* 3450 */
+ LPC_EP80579, /* EP80579 */
+ LPC_CPT, /* Cougar Point */
+ LPC_CPTD, /* Cougar Point Desktop */
+ LPC_CPTM, /* Cougar Point Mobile */
+ LPC_PBG, /* Patsburg */
+ LPC_DH89XXCC, /* DH89xxCC */
+ LPC_PPT, /* Panther Point */
+ LPC_LPT, /* Lynx Point */
+ LPC_LPT_LP, /* Lynx Point-LP */
+ LPC_WBG, /* Wellsburg */
+ LPC_AVN, /* Avoton SoC */
+ LPC_BAYTRAIL, /* Bay Trail SoC */
+ LPC_COLETO, /* Coleto Creek */
+ LPC_WPT_LP, /* Wildcat Point-LP */
+ LPC_BRASWELL, /* Braswell SoC */
+ LPC_LEWISBURG, /* Lewisburg */
+ LPC_9S, /* 9 Series */
+};
+
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v7 4/6] mfd: move enum lpc_chipsets into lpc_ich.h
2016-09-28 9:52 ` [PATCH v7 4/6] mfd: move enum lpc_chipsets into lpc_ich.h Tan Jui Nee
@ 2016-09-30 0:32 ` Lee Jones
2016-10-07 7:39 ` Tan, Jui Nee
0 siblings, 1 reply; 14+ messages in thread
From: Lee Jones @ 2016-09-30 0:32 UTC (permalink / raw)
To: Tan Jui Nee
Cc: mika.westerberg, heikki.krogerus, andriy.shevchenko, tglx, mingo,
hpa, x86, ptyser, linus.walleij, linux-gpio, linux-kernel,
jonathan.yong, ong.hock.yu, tony.luck,
wan.ahmad.zainie.wan.mohamad
On Wed, 28 Sep 2016, Tan Jui Nee wrote:
> Move the enum's definition into a standalone header file which can be used
> wherever its definition is needed.
>
> Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
> ---
> drivers/mfd/lpc_ich-core.c | 71 ---------------------------------------------
> include/linux/mfd/lpc_ich.h | 71 +++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 71 insertions(+), 71 deletions(-)
Did you use -M when creating this patch?
> diff --git a/drivers/mfd/lpc_ich-core.c b/drivers/mfd/lpc_ich-core.c
> index bd3aa45..05ed985 100644
> --- a/drivers/mfd/lpc_ich-core.c
> +++ b/drivers/mfd/lpc_ich-core.c
> @@ -147,77 +147,6 @@ static struct mfd_cell lpc_ich_gpio_cell = {
> .ignore_resource_conflicts = true,
> };
>
> -/* chipset related info */
> -enum lpc_chipsets {
> - LPC_ICH = 0, /* ICH */
> - LPC_ICH0, /* ICH0 */
> - LPC_ICH2, /* ICH2 */
> - LPC_ICH2M, /* ICH2-M */
> - LPC_ICH3, /* ICH3-S */
> - LPC_ICH3M, /* ICH3-M */
> - LPC_ICH4, /* ICH4 */
> - LPC_ICH4M, /* ICH4-M */
> - LPC_CICH, /* C-ICH */
> - LPC_ICH5, /* ICH5 & ICH5R */
> - LPC_6300ESB, /* 6300ESB */
> - LPC_ICH6, /* ICH6 & ICH6R */
> - LPC_ICH6M, /* ICH6-M */
> - LPC_ICH6W, /* ICH6W & ICH6RW */
> - LPC_631XESB, /* 631xESB/632xESB */
> - LPC_ICH7, /* ICH7 & ICH7R */
> - LPC_ICH7DH, /* ICH7DH */
> - LPC_ICH7M, /* ICH7-M & ICH7-U */
> - LPC_ICH7MDH, /* ICH7-M DH */
> - LPC_NM10, /* NM10 */
> - LPC_ICH8, /* ICH8 & ICH8R */
> - LPC_ICH8DH, /* ICH8DH */
> - LPC_ICH8DO, /* ICH8DO */
> - LPC_ICH8M, /* ICH8M */
> - LPC_ICH8ME, /* ICH8M-E */
> - LPC_ICH9, /* ICH9 */
> - LPC_ICH9R, /* ICH9R */
> - LPC_ICH9DH, /* ICH9DH */
> - LPC_ICH9DO, /* ICH9DO */
> - LPC_ICH9M, /* ICH9M */
> - LPC_ICH9ME, /* ICH9M-E */
> - LPC_ICH10, /* ICH10 */
> - LPC_ICH10R, /* ICH10R */
> - LPC_ICH10D, /* ICH10D */
> - LPC_ICH10DO, /* ICH10DO */
> - LPC_PCH, /* PCH Desktop Full Featured */
> - LPC_PCHM, /* PCH Mobile Full Featured */
> - LPC_P55, /* P55 */
> - LPC_PM55, /* PM55 */
> - LPC_H55, /* H55 */
> - LPC_QM57, /* QM57 */
> - LPC_H57, /* H57 */
> - LPC_HM55, /* HM55 */
> - LPC_Q57, /* Q57 */
> - LPC_HM57, /* HM57 */
> - LPC_PCHMSFF, /* PCH Mobile SFF Full Featured */
> - LPC_QS57, /* QS57 */
> - LPC_3400, /* 3400 */
> - LPC_3420, /* 3420 */
> - LPC_3450, /* 3450 */
> - LPC_EP80579, /* EP80579 */
> - LPC_CPT, /* Cougar Point */
> - LPC_CPTD, /* Cougar Point Desktop */
> - LPC_CPTM, /* Cougar Point Mobile */
> - LPC_PBG, /* Patsburg */
> - LPC_DH89XXCC, /* DH89xxCC */
> - LPC_PPT, /* Panther Point */
> - LPC_LPT, /* Lynx Point */
> - LPC_LPT_LP, /* Lynx Point-LP */
> - LPC_WBG, /* Wellsburg */
> - LPC_AVN, /* Avoton SoC */
> - LPC_BAYTRAIL, /* Bay Trail SoC */
> - LPC_COLETO, /* Coleto Creek */
> - LPC_WPT_LP, /* Wildcat Point-LP */
> - LPC_BRASWELL, /* Braswell SoC */
> - LPC_LEWISBURG, /* Lewisburg */
> - LPC_9S, /* 9 Series */
> -};
> -
> static struct lpc_ich_info lpc_chipset_info[] = {
> [LPC_ICH] = {
> .name = "ICH",
> diff --git a/include/linux/mfd/lpc_ich.h b/include/linux/mfd/lpc_ich.h
> index 2b300b4..42307ee 100644
> --- a/include/linux/mfd/lpc_ich.h
> +++ b/include/linux/mfd/lpc_ich.h
> @@ -43,4 +43,75 @@ struct lpc_ich_info {
> u8 use_gpio;
> };
>
> +/* chipset related info */
> +enum lpc_chipsets {
> + LPC_ICH = 0, /* ICH */
> + LPC_ICH0, /* ICH0 */
> + LPC_ICH2, /* ICH2 */
> + LPC_ICH2M, /* ICH2-M */
> + LPC_ICH3, /* ICH3-S */
> + LPC_ICH3M, /* ICH3-M */
> + LPC_ICH4, /* ICH4 */
> + LPC_ICH4M, /* ICH4-M */
> + LPC_CICH, /* C-ICH */
> + LPC_ICH5, /* ICH5 & ICH5R */
> + LPC_6300ESB, /* 6300ESB */
> + LPC_ICH6, /* ICH6 & ICH6R */
> + LPC_ICH6M, /* ICH6-M */
> + LPC_ICH6W, /* ICH6W & ICH6RW */
> + LPC_631XESB, /* 631xESB/632xESB */
> + LPC_ICH7, /* ICH7 & ICH7R */
> + LPC_ICH7DH, /* ICH7DH */
> + LPC_ICH7M, /* ICH7-M & ICH7-U */
> + LPC_ICH7MDH, /* ICH7-M DH */
> + LPC_NM10, /* NM10 */
> + LPC_ICH8, /* ICH8 & ICH8R */
> + LPC_ICH8DH, /* ICH8DH */
> + LPC_ICH8DO, /* ICH8DO */
> + LPC_ICH8M, /* ICH8M */
> + LPC_ICH8ME, /* ICH8M-E */
> + LPC_ICH9, /* ICH9 */
> + LPC_ICH9R, /* ICH9R */
> + LPC_ICH9DH, /* ICH9DH */
> + LPC_ICH9DO, /* ICH9DO */
> + LPC_ICH9M, /* ICH9M */
> + LPC_ICH9ME, /* ICH9M-E */
> + LPC_ICH10, /* ICH10 */
> + LPC_ICH10R, /* ICH10R */
> + LPC_ICH10D, /* ICH10D */
> + LPC_ICH10DO, /* ICH10DO */
> + LPC_PCH, /* PCH Desktop Full Featured */
> + LPC_PCHM, /* PCH Mobile Full Featured */
> + LPC_P55, /* P55 */
> + LPC_PM55, /* PM55 */
> + LPC_H55, /* H55 */
> + LPC_QM57, /* QM57 */
> + LPC_H57, /* H57 */
> + LPC_HM55, /* HM55 */
> + LPC_Q57, /* Q57 */
> + LPC_HM57, /* HM57 */
> + LPC_PCHMSFF, /* PCH Mobile SFF Full Featured */
> + LPC_QS57, /* QS57 */
> + LPC_3400, /* 3400 */
> + LPC_3420, /* 3420 */
> + LPC_3450, /* 3450 */
> + LPC_EP80579, /* EP80579 */
> + LPC_CPT, /* Cougar Point */
> + LPC_CPTD, /* Cougar Point Desktop */
> + LPC_CPTM, /* Cougar Point Mobile */
> + LPC_PBG, /* Patsburg */
> + LPC_DH89XXCC, /* DH89xxCC */
> + LPC_PPT, /* Panther Point */
> + LPC_LPT, /* Lynx Point */
> + LPC_LPT_LP, /* Lynx Point-LP */
> + LPC_WBG, /* Wellsburg */
> + LPC_AVN, /* Avoton SoC */
> + LPC_BAYTRAIL, /* Bay Trail SoC */
> + LPC_COLETO, /* Coleto Creek */
> + LPC_WPT_LP, /* Wildcat Point-LP */
> + LPC_BRASWELL, /* Braswell SoC */
> + LPC_LEWISBURG, /* Lewisburg */
> + LPC_9S, /* 9 Series */
> +};
> +
> #endif
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH v7 4/6] mfd: move enum lpc_chipsets into lpc_ich.h
2016-09-30 0:32 ` Lee Jones
@ 2016-10-07 7:39 ` Tan, Jui Nee
0 siblings, 0 replies; 14+ messages in thread
From: Tan, Jui Nee @ 2016-10-07 7:39 UTC (permalink / raw)
To: Lee Jones
Cc: mika.westerberg@linux.intel.com, heikki.krogerus@linux.intel.com,
andriy.shevchenko@linux.intel.com, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
ptyser@xes-inc.com, linus.walleij@linaro.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Yong, Jonathan, Yu, Ong Hock, Luck, Tony,
Wan Mohamad, Wan Ahmad Zainie
> -----Original Message-----
> From: Lee Jones [mailto:lee.jones@linaro.org]
> Sent: Friday, September 30, 2016 8:33 AM
> To: Tan, Jui Nee <jui.nee.tan@intel.com>
> Cc: mika.westerberg@linux.intel.com; heikki.krogerus@linux.intel.com;
> andriy.shevchenko@linux.intel.com; tglx@linutronix.de; mingo@redhat.com;
> hpa@zytor.com; x86@kernel.org; ptyser@xes-inc.com;
> linus.walleij@linaro.org; linux-gpio@vger.kernel.org; linux-
> kernel@vger.kernel.org; Yong, Jonathan <jonathan.yong@intel.com>; Yu, Ong
> Hock <ong.hock.yu@intel.com>; Luck, Tony <tony.luck@intel.com>; Wan
> Mohamad, Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
> Subject: Re: [PATCH v7 4/6] mfd: move enum lpc_chipsets into lpc_ich.h
>
> On Wed, 28 Sep 2016, Tan Jui Nee wrote:
>
> > Move the enum's definition into a standalone header file which can be
> > used wherever its definition is needed.
> >
> > Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
> > ---
> > drivers/mfd/lpc_ich-core.c | 71
> > ---------------------------------------------
> > include/linux/mfd/lpc_ich.h | 71
> > +++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 71 insertions(+), 71 deletions(-)
>
> Did you use -M when creating this patch?
>
This patch is to move part of the file and not the entire file to lpc_ich.h. It will not show similarity % info even I have used -M option when creating the patch.
> > diff --git a/drivers/mfd/lpc_ich-core.c b/drivers/mfd/lpc_ich-core.c
> > index bd3aa45..05ed985 100644
> > --- a/drivers/mfd/lpc_ich-core.c
> > +++ b/drivers/mfd/lpc_ich-core.c
> > @@ -147,77 +147,6 @@ static struct mfd_cell lpc_ich_gpio_cell = {
> > .ignore_resource_conflicts = true,
> > };
> >
> > -/* chipset related info */
> > -enum lpc_chipsets {
> > - LPC_ICH = 0, /* ICH */
> > - LPC_ICH0, /* ICH0 */
> > - LPC_ICH2, /* ICH2 */
> > - LPC_ICH2M, /* ICH2-M */
> > - LPC_ICH3, /* ICH3-S */
> > - LPC_ICH3M, /* ICH3-M */
> > - LPC_ICH4, /* ICH4 */
> > - LPC_ICH4M, /* ICH4-M */
> > - LPC_CICH, /* C-ICH */
> > - LPC_ICH5, /* ICH5 & ICH5R */
> > - LPC_6300ESB, /* 6300ESB */
> > - LPC_ICH6, /* ICH6 & ICH6R */
> > - LPC_ICH6M, /* ICH6-M */
> > - LPC_ICH6W, /* ICH6W & ICH6RW */
> > - LPC_631XESB, /* 631xESB/632xESB */
> > - LPC_ICH7, /* ICH7 & ICH7R */
> > - LPC_ICH7DH, /* ICH7DH */
> > - LPC_ICH7M, /* ICH7-M & ICH7-U */
> > - LPC_ICH7MDH, /* ICH7-M DH */
> > - LPC_NM10, /* NM10 */
> > - LPC_ICH8, /* ICH8 & ICH8R */
> > - LPC_ICH8DH, /* ICH8DH */
> > - LPC_ICH8DO, /* ICH8DO */
> > - LPC_ICH8M, /* ICH8M */
> > - LPC_ICH8ME, /* ICH8M-E */
> > - LPC_ICH9, /* ICH9 */
> > - LPC_ICH9R, /* ICH9R */
> > - LPC_ICH9DH, /* ICH9DH */
> > - LPC_ICH9DO, /* ICH9DO */
> > - LPC_ICH9M, /* ICH9M */
> > - LPC_ICH9ME, /* ICH9M-E */
> > - LPC_ICH10, /* ICH10 */
> > - LPC_ICH10R, /* ICH10R */
> > - LPC_ICH10D, /* ICH10D */
> > - LPC_ICH10DO, /* ICH10DO */
> > - LPC_PCH, /* PCH Desktop Full Featured */
> > - LPC_PCHM, /* PCH Mobile Full Featured */
> > - LPC_P55, /* P55 */
> > - LPC_PM55, /* PM55 */
> > - LPC_H55, /* H55 */
> > - LPC_QM57, /* QM57 */
> > - LPC_H57, /* H57 */
> > - LPC_HM55, /* HM55 */
> > - LPC_Q57, /* Q57 */
> > - LPC_HM57, /* HM57 */
> > - LPC_PCHMSFF, /* PCH Mobile SFF Full Featured */
> > - LPC_QS57, /* QS57 */
> > - LPC_3400, /* 3400 */
> > - LPC_3420, /* 3420 */
> > - LPC_3450, /* 3450 */
> > - LPC_EP80579, /* EP80579 */
> > - LPC_CPT, /* Cougar Point */
> > - LPC_CPTD, /* Cougar Point Desktop */
> > - LPC_CPTM, /* Cougar Point Mobile */
> > - LPC_PBG, /* Patsburg */
> > - LPC_DH89XXCC, /* DH89xxCC */
> > - LPC_PPT, /* Panther Point */
> > - LPC_LPT, /* Lynx Point */
> > - LPC_LPT_LP, /* Lynx Point-LP */
> > - LPC_WBG, /* Wellsburg */
> > - LPC_AVN, /* Avoton SoC */
> > - LPC_BAYTRAIL, /* Bay Trail SoC */
> > - LPC_COLETO, /* Coleto Creek */
> > - LPC_WPT_LP, /* Wildcat Point-LP */
> > - LPC_BRASWELL, /* Braswell SoC */
> > - LPC_LEWISBURG, /* Lewisburg */
> > - LPC_9S, /* 9 Series */
> > -};
> > -
> > static struct lpc_ich_info lpc_chipset_info[] = {
> > [LPC_ICH] = {
> > .name = "ICH",
> > diff --git a/include/linux/mfd/lpc_ich.h b/include/linux/mfd/lpc_ich.h
> > index 2b300b4..42307ee 100644
> > --- a/include/linux/mfd/lpc_ich.h
> > +++ b/include/linux/mfd/lpc_ich.h
> > @@ -43,4 +43,75 @@ struct lpc_ich_info {
> > u8 use_gpio;
> > };
> >
> > +/* chipset related info */
> > +enum lpc_chipsets {
> > + LPC_ICH = 0, /* ICH */
> > + LPC_ICH0, /* ICH0 */
> > + LPC_ICH2, /* ICH2 */
> > + LPC_ICH2M, /* ICH2-M */
> > + LPC_ICH3, /* ICH3-S */
> > + LPC_ICH3M, /* ICH3-M */
> > + LPC_ICH4, /* ICH4 */
> > + LPC_ICH4M, /* ICH4-M */
> > + LPC_CICH, /* C-ICH */
> > + LPC_ICH5, /* ICH5 & ICH5R */
> > + LPC_6300ESB, /* 6300ESB */
> > + LPC_ICH6, /* ICH6 & ICH6R */
> > + LPC_ICH6M, /* ICH6-M */
> > + LPC_ICH6W, /* ICH6W & ICH6RW */
> > + LPC_631XESB, /* 631xESB/632xESB */
> > + LPC_ICH7, /* ICH7 & ICH7R */
> > + LPC_ICH7DH, /* ICH7DH */
> > + LPC_ICH7M, /* ICH7-M & ICH7-U */
> > + LPC_ICH7MDH, /* ICH7-M DH */
> > + LPC_NM10, /* NM10 */
> > + LPC_ICH8, /* ICH8 & ICH8R */
> > + LPC_ICH8DH, /* ICH8DH */
> > + LPC_ICH8DO, /* ICH8DO */
> > + LPC_ICH8M, /* ICH8M */
> > + LPC_ICH8ME, /* ICH8M-E */
> > + LPC_ICH9, /* ICH9 */
> > + LPC_ICH9R, /* ICH9R */
> > + LPC_ICH9DH, /* ICH9DH */
> > + LPC_ICH9DO, /* ICH9DO */
> > + LPC_ICH9M, /* ICH9M */
> > + LPC_ICH9ME, /* ICH9M-E */
> > + LPC_ICH10, /* ICH10 */
> > + LPC_ICH10R, /* ICH10R */
> > + LPC_ICH10D, /* ICH10D */
> > + LPC_ICH10DO, /* ICH10DO */
> > + LPC_PCH, /* PCH Desktop Full Featured */
> > + LPC_PCHM, /* PCH Mobile Full Featured */
> > + LPC_P55, /* P55 */
> > + LPC_PM55, /* PM55 */
> > + LPC_H55, /* H55 */
> > + LPC_QM57, /* QM57 */
> > + LPC_H57, /* H57 */
> > + LPC_HM55, /* HM55 */
> > + LPC_Q57, /* Q57 */
> > + LPC_HM57, /* HM57 */
> > + LPC_PCHMSFF, /* PCH Mobile SFF Full Featured */
> > + LPC_QS57, /* QS57 */
> > + LPC_3400, /* 3400 */
> > + LPC_3420, /* 3420 */
> > + LPC_3450, /* 3450 */
> > + LPC_EP80579, /* EP80579 */
> > + LPC_CPT, /* Cougar Point */
> > + LPC_CPTD, /* Cougar Point Desktop */
> > + LPC_CPTM, /* Cougar Point Mobile */
> > + LPC_PBG, /* Patsburg */
> > + LPC_DH89XXCC, /* DH89xxCC */
> > + LPC_PPT, /* Panther Point */
> > + LPC_LPT, /* Lynx Point */
> > + LPC_LPT_LP, /* Lynx Point-LP */
> > + LPC_WBG, /* Wellsburg */
> > + LPC_AVN, /* Avoton SoC */
> > + LPC_BAYTRAIL, /* Bay Trail SoC */
> > + LPC_COLETO, /* Coleto Creek */
> > + LPC_WPT_LP, /* Wildcat Point-LP */
> > + LPC_BRASWELL, /* Braswell SoC */
> > + LPC_LEWISBURG, /* Lewisburg */
> > + LPC_9S, /* 9 Series */
> > +};
> > +
> > #endif
>
> --
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source
> software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v7 5/6] mfd: lpc_ich: Add Device IDs for Intel Apollo Lake PCH
2016-09-28 9:52 [PATCH v7 0/6] pinctrl/broxton: enable platform device in the absent of ACPI enumeration Tan Jui Nee
` (3 preceding siblings ...)
2016-09-28 9:52 ` [PATCH v7 4/6] mfd: move enum lpc_chipsets into lpc_ich.h Tan Jui Nee
@ 2016-09-28 9:52 ` Tan Jui Nee
2016-09-29 11:08 ` Mika Westerberg
2016-09-28 9:52 ` [PATCH v7 6/6] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system Tan Jui Nee
5 siblings, 1 reply; 14+ messages in thread
From: Tan Jui Nee @ 2016-09-28 9:52 UTC (permalink / raw)
To: mika.westerberg, heikki.krogerus, andriy.shevchenko, tglx, mingo,
hpa, x86, ptyser, lee.jones, linus.walleij
Cc: linux-gpio, linux-kernel, jui.nee.tan, jonathan.yong, ong.hock.yu,
tony.luck, wan.ahmad.zainie.wan.mohamad
Adding Intel codename Apollo Lake platform device IDs for PCH.
Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
---
drivers/mfd/lpc_ich-core.c | 6 ++++++
include/linux/mfd/lpc_ich.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/drivers/mfd/lpc_ich-core.c b/drivers/mfd/lpc_ich-core.c
index 05ed985..589155c 100644
--- a/drivers/mfd/lpc_ich-core.c
+++ b/drivers/mfd/lpc_ich-core.c
@@ -56,6 +56,7 @@
* document number TBD : Wildcat Point-LP
* document number TBD : 9 Series
* document number TBD : Lewisburg
+ * document number TBD : Apollo Lake
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -460,6 +461,10 @@ static struct lpc_ich_info lpc_chipset_info[] = {
.name = "9 Series",
.iTCO_version = 2,
},
+ [LPC_APL] = {
+ .name = "Apollo Lake SoC",
+ .iTCO_version = 5,
+ },
};
/*
@@ -608,6 +613,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},
diff --git a/include/linux/mfd/lpc_ich.h b/include/linux/mfd/lpc_ich.h
index 42307ee..397008c 100644
--- a/include/linux/mfd/lpc_ich.h
+++ b/include/linux/mfd/lpc_ich.h
@@ -112,6 +112,7 @@ enum lpc_chipsets {
LPC_BRASWELL, /* Braswell SoC */
LPC_LEWISBURG, /* Lewisburg */
LPC_9S, /* 9 Series */
+ LPC_APL, /* Apollo Lake SoC */
};
#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v7 5/6] mfd: lpc_ich: Add Device IDs for Intel Apollo Lake PCH
2016-09-28 9:52 ` [PATCH v7 5/6] mfd: lpc_ich: Add Device IDs for Intel Apollo Lake PCH Tan Jui Nee
@ 2016-09-29 11:08 ` Mika Westerberg
2016-10-07 7:39 ` Tan, Jui Nee
0 siblings, 1 reply; 14+ messages in thread
From: Mika Westerberg @ 2016-09-29 11:08 UTC (permalink / raw)
To: Tan Jui Nee
Cc: heikki.krogerus, andriy.shevchenko, tglx, mingo, hpa, x86, ptyser,
lee.jones, linus.walleij, linux-gpio, linux-kernel, jonathan.yong,
ong.hock.yu, tony.luck, wan.ahmad.zainie.wan.mohamad
On Wed, Sep 28, 2016 at 05:52:22PM +0800, Tan Jui Nee wrote:
> Adding Intel codename Apollo Lake platform device IDs for PCH.
>
> Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
> ---
> drivers/mfd/lpc_ich-core.c | 6 ++++++
It should be either lpc_ich_core.c or lpc-ich-core.c. Ditto for -apl.c
thing.
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH v7 5/6] mfd: lpc_ich: Add Device IDs for Intel Apollo Lake PCH
2016-09-29 11:08 ` Mika Westerberg
@ 2016-10-07 7:39 ` Tan, Jui Nee
0 siblings, 0 replies; 14+ messages in thread
From: Tan, Jui Nee @ 2016-10-07 7:39 UTC (permalink / raw)
To: 'Mika Westerberg'
Cc: heikki.krogerus@linux.intel.com,
andriy.shevchenko@linux.intel.com, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
ptyser@xes-inc.com, lee.jones@linaro.org,
linus.walleij@linaro.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, Yong, Jonathan, Yu, Ong Hock,
Luck, Tony, Wan Mohamad, Wan Ahmad Zainie
> -----Original Message-----
> From: Mika Westerberg [mailto:mika.westerberg@linux.intel.com]
> Sent: Thursday, September 29, 2016 7:09 PM
> To: Tan, Jui Nee <jui.nee.tan@intel.com>
> Cc: heikki.krogerus@linux.intel.com; andriy.shevchenko@linux.intel.com;
> tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; x86@kernel.org;
> ptyser@xes-inc.com; lee.jones@linaro.org; linus.walleij@linaro.org; linux-
> gpio@vger.kernel.org; linux-kernel@vger.kernel.org; Yong, Jonathan
> <jonathan.yong@intel.com>; Yu, Ong Hock <ong.hock.yu@intel.com>; Luck,
> Tony <tony.luck@intel.com>; Wan Mohamad, Wan Ahmad Zainie
> <wan.ahmad.zainie.wan.mohamad@intel.com>
> Subject: Re: [PATCH v7 5/6] mfd: lpc_ich: Add Device IDs for Intel Apollo
> Lake PCH
>
> On Wed, Sep 28, 2016 at 05:52:22PM +0800, Tan Jui Nee wrote:
> > Adding Intel codename Apollo Lake platform device IDs for PCH.
> >
> > Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
> > ---
> > drivers/mfd/lpc_ich-core.c | 6 ++++++
>
> It should be either lpc_ich_core.c or lpc-ich-core.c. Ditto for -apl.c
> thing.
Thanks for your comment. I will send out another patch-set with filename lpc_ich_core.c and lpc_ich_apl.c.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v7 6/6] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
2016-09-28 9:52 [PATCH v7 0/6] pinctrl/broxton: enable platform device in the absent of ACPI enumeration Tan Jui Nee
` (4 preceding siblings ...)
2016-09-28 9:52 ` [PATCH v7 5/6] mfd: lpc_ich: Add Device IDs for Intel Apollo Lake PCH Tan Jui Nee
@ 2016-09-28 9:52 ` Tan Jui Nee
5 siblings, 0 replies; 14+ messages in thread
From: Tan Jui Nee @ 2016-09-28 9:52 UTC (permalink / raw)
To: mika.westerberg, heikki.krogerus, andriy.shevchenko, tglx, mingo,
hpa, x86, ptyser, lee.jones, linus.walleij
Cc: linux-gpio, linux-kernel, jui.nee.tan, jonathan.yong, ong.hock.yu,
tony.luck, wan.ahmad.zainie.wan.mohamad
This driver uses the P2SB hide/unhide mechanism cooperatively
to pass the PCI BAR address to the gpio platform driver.
Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
---
Changes in V7:
- Add author information and rewrite description of source file
lpc_ich-apl.c and lpc_ich_apl.h.
- Sort the header files by alphabetical order in lpc_ich-apl.c.
- Rename header file lpc_ich-apl.h to lpc_ich_apl.h (suggested by Lee).
- Remove unneeded pdata_size and platform_data from mfd_cell.
Also, remove unneeded apl_pinctrl_pdata.
- Since variable apl_p2sb is only used once, hence switch it out for the
PCI_DEVFN macro (suggested by Lee).
- Define APL_GPIO_COMMUNITY_MAX as total Apollo Lake GPIO communities
supported.
- Set resources in mfd_cell for each GPIO community.
- Call p2sb_bar() function once instead of four times inside the for loop.
And make p2sb_bar() function just to fill in the base address into a
scratch "struct resource" and have the loop do the additions to base/end.
- Remove entire apl_pinctrl_pdata.name memory allocation since it is no
longer needed.
- Return ret at the end of lpc_ich_add_gpio() function.
Changes in V6:
- Rename CONFIG_X86_INTEL_APL to CONFIG_X86_INTEL_IVI so that it
relates to the actual product, as suggested by Mika.
- Rework Makefile according Andy's comments.
- Rename lpc_ich_misc() to lpc_ich_add_gpio() so that the name should not
be so generic, as suggested by Andy.
- Call lpc_ich_add_gpio() via priv->chipset.
- lpc_ich_add_gpio() function will be moved from
.../include/linux/mfd/lpc_ich.h to
.../drivers/mfd/lpc_ich-apl.h
as this is a part of internal driver interface as suggested by Andy.
- Move enum lpc_chipsets from
.../drivers/mfd/lpc_ich-core.c to
.../include/linux/mfd/lpc_ich.h
as lpc_chipsets is also accessed by lpc_ich_add_gpio().
- Check if kasprintf return value for all 4 gpio controllers before
proceed to add platform device by using mfd_add_devices().
Changes in V5:
- Split lpc-ich driver into two parts (lpc_ich-core and lpc_ich-apl).
The file lpc_ich-apl.c introduces gpio platform driver in MFD.
- Rename Kconfig option CONFIG_X86_INTEL_NON_ACPI to CONFIG_X86_INTEL_APL
so that it reflects actual product as suggested by Mika.
Changes in V4:
- Move Kconfig option CONFIG_X86_INTEL_NON_ACPI from
[PATCH 2/3] x86/platform/p2sb: New Primary to Sideband bridge support driver for Intel SOC's
to
[PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
since the config is used in latter patch.
- Select CONFIG_P2SB when CONFIG_LPC_ICH is enabled.
- Remove #ifdef CONFIG_X86_INTEL_NON_ACPI and use
#if defined(CONFIG_X86_INTEL_NON_ACPI) when lpc_ich_misc is called
as suggested by Lee Jones.
- Use single dimensional array instead of 2D array for apl_gpio_io_res
structure and use DEFINE_RES_IRQ for its IRQ resource.
Changes in V3:
- Simplify register addresses calculation and use DEFINE_RES_MEM_NAMED
defines for apl_gpio_io_res structure
- Define magic number for P2SB PCI ID
- Replace switch-case with if-else since currently we have only one
use case
- Only call mfd_add_devices() once for all gpio communities
Changes in V2:
- Add new config option CONFIG_X86_INTEL_NON_ACPI and "select PINCTRL"
to fix kbuildbot error
drivers/mfd/Kconfig | 3 +-
drivers/mfd/Makefile | 5 +-
drivers/mfd/lpc_ich-apl.c | 120 +++++++++++++++++++++++++++++++++++++++++++++
drivers/mfd/lpc_ich-core.c | 5 ++
drivers/mfd/lpc_ich_apl.h | 29 +++++++++++
5 files changed, 160 insertions(+), 2 deletions(-)
create mode 100644 drivers/mfd/lpc_ich-apl.c
create mode 100644 drivers/mfd/lpc_ich_apl.h
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 2d1fb64..8838e55 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -380,8 +380,9 @@ config MFD_INTEL_QUARK_I2C_GPIO
config LPC_ICH
tristate "Intel ICH LPC"
- depends on PCI
+ depends on X86 && PCI
select MFD_CORE
+ select P2SB
help
The LPC bridge function of the Intel ICH provides support for
many functional units. This driver provides needed support for
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 260f46f..3ad16c9 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -155,8 +155,11 @@ obj-$(CONFIG_PMIC_ADP5520) += adp5520.o
obj-$(CONFIG_MFD_KEMPLD) += kempld-core.o
obj-$(CONFIG_MFD_INTEL_QUARK_I2C_GPIO) += intel_quark_i2c_gpio.o
obj-$(CONFIG_LPC_SCH) += lpc_sch.o
-lpc_ich-objs := lpc_ich-core.o
obj-$(CONFIG_LPC_ICH) += lpc_ich.o
+lpc_ich-objs := lpc_ich-core.o
+ifeq ($(CONFIG_X86_INTEL_IVI),y)
+lpc_ich-objs += lpc_ich-apl.o
+endif
obj-$(CONFIG_MFD_RDC321X) += rdc321x-southbridge.o
obj-$(CONFIG_MFD_JANZ_CMODIO) += janz-cmodio.o
obj-$(CONFIG_MFD_JZ4740_ADC) += jz4740-adc.o
diff --git a/drivers/mfd/lpc_ich-apl.c b/drivers/mfd/lpc_ich-apl.c
new file mode 100644
index 0000000..7a79052
--- /dev/null
+++ b/drivers/mfd/lpc_ich-apl.c
@@ -0,0 +1,120 @@
+/*
+ * Intel Apollo Lake In-Vehicle Infotainment (IVI) systems used in cars support
+ *
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * Author: Tan, Jui Nee <jui.nee.tan@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 <asm/p2sb.h>
+#include <linux/pci.h>
+#include <linux/mfd/core.h>
+#include <linux/mfd/lpc_ich.h>
+#include <linux/pinctrl/pinctrl.h>
+
+#include "lpc_ich_apl.h"
+
+/* Offset data for Apollo Lake GPIO communities */
+#define APL_GPIO_SOUTHWEST_OFFSET 0xc00000
+#define APL_GPIO_NORTHWEST_OFFSET 0xc40000
+#define APL_GPIO_NORTH_OFFSET 0xc50000
+#define APL_GPIO_WEST_OFFSET 0xc70000
+
+#define APL_GPIO_SOUTHWEST_NPIN 43
+#define APL_GPIO_NORTHWEST_NPIN 77
+#define APL_GPIO_NORTH_NPIN 78
+#define APL_GPIO_WEST_NPIN 47
+
+#define APL_GPIO_COMMUNITY_MAX 4
+
+#define APL_GPIO_IRQ 14
+
+#define PCI_IDSEL_P2SB 0x0d
+
+static struct resource apl_gpio_io_res[] = {
+ DEFINE_RES_MEM_NAMED(APL_GPIO_NORTH_OFFSET,
+ APL_GPIO_NORTH_NPIN * SZ_8, "apl_pinctrl_n"),
+ DEFINE_RES_MEM_NAMED(APL_GPIO_NORTHWEST_OFFSET,
+ APL_GPIO_NORTHWEST_NPIN * SZ_8, "apl_pinctrl_nw"),
+ DEFINE_RES_MEM_NAMED(APL_GPIO_WEST_OFFSET,
+ APL_GPIO_WEST_NPIN * SZ_8, "apl_pinctrl_w"),
+ DEFINE_RES_MEM_NAMED(APL_GPIO_SOUTHWEST_OFFSET,
+ APL_GPIO_SOUTHWEST_NPIN * SZ_8, "apl_pinctrl_sw"),
+ DEFINE_RES_IRQ(APL_GPIO_IRQ),
+};
+
+static struct mfd_cell apl_gpio_devices[] = {
+ {
+ .name = "apl-pinctrl",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(apl_gpio_io_res),
+ .resources = &apl_gpio_io_res[0],
+ .ignore_resource_conflicts = true,
+ },
+ {
+ .name = "apl-pinctrl",
+ .id = 1,
+ .num_resources = ARRAY_SIZE(apl_gpio_io_res),
+ .resources = &apl_gpio_io_res[1],
+ .ignore_resource_conflicts = true,
+ },
+ {
+ .name = "apl-pinctrl",
+ .id = 2,
+ .num_resources = ARRAY_SIZE(apl_gpio_io_res),
+ .resources = &apl_gpio_io_res[2],
+ .ignore_resource_conflicts = true,
+ },
+ {
+ .name = "apl-pinctrl",
+ .id = 3,
+ .num_resources = ARRAY_SIZE(apl_gpio_io_res),
+ .resources = &apl_gpio_io_res[3],
+ .ignore_resource_conflicts = true,
+ },
+};
+
+int lpc_ich_add_gpio(struct pci_dev *dev, enum lpc_chipsets chipset)
+{
+ unsigned int i;
+ int ret;
+ struct resource base;
+
+ if (chipset != LPC_APL)
+ return -ENODEV;
+ /*
+ * Apollo lake, has not 1, but 4 gpio controllers,
+ * handle it a bit differently.
+ */
+
+ ret = p2sb_bar(dev, PCI_DEVFN(PCI_IDSEL_P2SB, 0), &base);
+ if (ret)
+ goto warn_continue;
+
+ for (i = 0; i < APL_GPIO_COMMUNITY_MAX; i++) {
+ struct resource *res = &apl_gpio_io_res[i];
+
+ /* Fill MEM resource */
+ res->start += base.start;
+ res->end += base.start;
+ res->flags = base.flags;
+
+ res++;
+ }
+
+ ret = mfd_add_devices(&dev->dev, 0,
+ apl_gpio_devices, ARRAY_SIZE(apl_gpio_devices),
+ NULL, 0, NULL);
+
+ if (ret)
+warn_continue:
+ dev_warn(&dev->dev,
+ "Failed to add Apollo Lake GPIO: %d\n",
+ ret);
+
+ return ret;
+}
diff --git a/drivers/mfd/lpc_ich-core.c b/drivers/mfd/lpc_ich-core.c
index 589155c..a15cc9f 100644
--- a/drivers/mfd/lpc_ich-core.c
+++ b/drivers/mfd/lpc_ich-core.c
@@ -70,6 +70,8 @@
#include <linux/mfd/lpc_ich.h>
#include <linux/platform_data/itco_wdt.h>
+#include "lpc_ich_apl.h"
+
#define ACPIBASE 0x40
#define ACPIBASE_GPE_OFF 0x28
#define ACPIBASE_GPE_END 0x2f
@@ -1028,6 +1030,9 @@ static int lpc_ich_probe(struct pci_dev *dev,
cell_added = true;
}
+ if (!lpc_ich_add_gpio(dev, priv->chipset))
+ cell_added = true;
+
/*
* We only care if at least one or none of the cells registered
* successfully.
diff --git a/drivers/mfd/lpc_ich_apl.h b/drivers/mfd/lpc_ich_apl.h
new file mode 100644
index 0000000..c82faa6
--- /dev/null
+++ b/drivers/mfd/lpc_ich_apl.h
@@ -0,0 +1,29 @@
+/*
+ * lpc_ich-apl.h - Intel In-Vehicle Infotainment (IVI) systems used in cars
+ * support
+ *
+ * Copyright (C) 2016, Intel Corporation
+ *
+ * Author: Tan, Jui Nee <jui.nee.tan@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 __LPC_ICH_APL_H__
+#define __LPC_ICH_APL_H__
+
+#include <linux/pci.h>
+
+#if IS_ENABLED(CONFIG_X86_INTEL_IVI)
+int lpc_ich_add_gpio(struct pci_dev *dev, enum lpc_chipsets chipset);
+#else /* CONFIG_X86_INTEL_IVI is not set */
+static inline int lpc_ich_add_gpio(struct pci_dev *dev,
+ enum lpc_chipsets chipset)
+{
+ return -ENODEV;
+}
+#endif
+
+#endif
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread