Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
On Tue, 2016-04-12 at 08:34 +, Tan, Jui Nee wrote: > -Original Message- > > From: lkp > > Sent: Monday, April 11, 2016 12:35 PM > > To: Tan, Jui Nee <jui.nee@intel.com> > > Cc: kbuild-...@01.org; mika.westerb...@linux.intel.com; > > heikki.kroge...@linux.intel.com; andriy.shevche...@linux.intel.com; > > t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; > > pty...@xes-inc.com; lee.jo...@linaro.org; linux-g...@vger.kernel.org > > ; > > linux-kernel@vger.kernel.org; Tan, Jui Nee <jui.nee@intel.com>; > > Yong, > > Jonathan <jonathan.y...@intel.com>; Yu, Ong Hock > > <ong.hock...@intel.com>; Voon, Weifeng <weifeng.v...@intel.com>; Wan > > Mohamad, Wan Ahmad Zainie > > <wan.ahmad.zainie.wan.moha...@intel.com> > > Subject: Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo > > Lake GPIO > > pinctrl in non-ACPI system > > > > Hi Tan, > > > > [auto build test ERROR on tip/x86/core] > > [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is > > applied to > > the wrong git tree, please drop us a note to help improving the > > system] > > > > url:https://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl > > - > > broxton-enable-platform-device-in-the-absent-of-ACPI- > > enumeration/20160411-105542 > > config: x86_64-randconfig-n0-0431 (attached as .config) > > reproduce: > > # save the attached .config to linux build tree > > make ARCH=x86_64 > > > > All error/warnings (new ones prefixed by >>): > > > > drivers/mfd/lpc_ich.c:204:22: error: invalid application of > > 'sizeof' to > > incomplete type 'struct pinctrl_pin_desc' > > .pdata_size = sizeof(apl_pinctrl_pdata), > > ^ > > drivers/mfd/lpc_ich.c: In function 'lpc_ich_misc': > > drivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined > > type 'struct > > pinctrl_pin_desc' > > > Hi Andy, I will send patch v2 that looks like: > > +static int lpc_ich_misc(struct pci_dev *dev, enum lpc_chipsets > chipset) > +{ > ... > + const char *name; This will make things worse. > Please let me know if that isn't the right thing. Thanks. Nope. The complain by kbuidbot apparently about specific kernel configuration. I'm pretty sure it's about CONFIG_PINCTRL=n. I don't know the best solution here (only add select PINCTRL that sounds a bit overhead to me), perhaps Lee can advise something. Perhaps new config option is required for APL like you have arch/x86: config X86_INTEL_NON_ACPI bool "enable support non-ACPI Intel platforms" help … mfd: config LPC_ICH tristate "Intel ICH LPC" - depends on PCI + depends on X86 && PCI select MFD_CORE + select P2SB if X86_INTEL_NON_ACPI + select PINCTRL if X86_INTEL_NON_ACPI In the code #ifdef X86_INTEL_NON_ACPI #else #endif P.S. I don't like this either. -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy
Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
On Tue, 2016-04-12 at 08:34 +, Tan, Jui Nee wrote: > -Original Message- > > From: lkp > > Sent: Monday, April 11, 2016 12:35 PM > > To: Tan, Jui Nee > > Cc: kbuild-...@01.org; mika.westerb...@linux.intel.com; > > heikki.kroge...@linux.intel.com; andriy.shevche...@linux.intel.com; > > t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; > > pty...@xes-inc.com; lee.jo...@linaro.org; linux-g...@vger.kernel.org > > ; > > linux-kernel@vger.kernel.org; Tan, Jui Nee ; > > Yong, > > Jonathan ; Yu, Ong Hock > > ; Voon, Weifeng ; Wan > > Mohamad, Wan Ahmad Zainie > > > > Subject: Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo > > Lake GPIO > > pinctrl in non-ACPI system > > > > Hi Tan, > > > > [auto build test ERROR on tip/x86/core] > > [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is > > applied to > > the wrong git tree, please drop us a note to help improving the > > system] > > > > url:https://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl > > - > > broxton-enable-platform-device-in-the-absent-of-ACPI- > > enumeration/20160411-105542 > > config: x86_64-randconfig-n0-0431 (attached as .config) > > reproduce: > > # save the attached .config to linux build tree > > make ARCH=x86_64 > > > > All error/warnings (new ones prefixed by >>): > > > > drivers/mfd/lpc_ich.c:204:22: error: invalid application of > > 'sizeof' to > > incomplete type 'struct pinctrl_pin_desc' > > .pdata_size = sizeof(apl_pinctrl_pdata), > > ^ > > drivers/mfd/lpc_ich.c: In function 'lpc_ich_misc': > > drivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined > > type 'struct > > pinctrl_pin_desc' > > > Hi Andy, I will send patch v2 that looks like: > > +static int lpc_ich_misc(struct pci_dev *dev, enum lpc_chipsets > chipset) > +{ > ... > + const char *name; This will make things worse. > Please let me know if that isn't the right thing. Thanks. Nope. The complain by kbuidbot apparently about specific kernel configuration. I'm pretty sure it's about CONFIG_PINCTRL=n. I don't know the best solution here (only add select PINCTRL that sounds a bit overhead to me), perhaps Lee can advise something. Perhaps new config option is required for APL like you have arch/x86: config X86_INTEL_NON_ACPI bool "enable support non-ACPI Intel platforms" help … mfd: config LPC_ICH tristate "Intel ICH LPC" - depends on PCI + depends on X86 && PCI select MFD_CORE + select P2SB if X86_INTEL_NON_ACPI + select PINCTRL if X86_INTEL_NON_ACPI In the code #ifdef X86_INTEL_NON_ACPI #else #endif P.S. I don't like this either. -- Andy Shevchenko Intel Finland Oy
RE: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
> -Original Message- > From: lkp > Sent: Monday, April 11, 2016 12:35 PM > To: Tan, Jui Nee <jui.nee@intel.com> > Cc: kbuild-...@01.org; mika.westerb...@linux.intel.com; > heikki.kroge...@linux.intel.com; andriy.shevche...@linux.intel.com; > t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; > pty...@xes-inc.com; lee.jo...@linaro.org; linux-g...@vger.kernel.org; > linux-kernel@vger.kernel.org; Tan, Jui Nee <jui.nee@intel.com>; Yong, > Jonathan <jonathan.y...@intel.com>; Yu, Ong Hock > <ong.hock...@intel.com>; Voon, Weifeng <weifeng.v...@intel.com>; Wan > Mohamad, Wan Ahmad Zainie > <wan.ahmad.zainie.wan.moha...@intel.com> > Subject: Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO > pinctrl in non-ACPI system > > Hi Tan, > > [auto build test ERROR on tip/x86/core] > [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is applied to > the wrong git tree, please drop us a note to help improving the system] > > url:https://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl- > broxton-enable-platform-device-in-the-absent-of-ACPI- > enumeration/20160411-105542 > config: x86_64-randconfig-n0-0431 (attached as .config) > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All error/warnings (new ones prefixed by >>): > >drivers/mfd/lpc_ich.c:204:22: error: invalid application of 'sizeof' to > incomplete type 'struct pinctrl_pin_desc' > .pdata_size = sizeof(apl_pinctrl_pdata), > ^ >drivers/mfd/lpc_ich.c: In function 'lpc_ich_misc': >drivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined type 'struct > pinctrl_pin_desc' >apl_pinctrl_pdata.name = kasprintf(GFP_KERNEL, "%u", >^ >drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct > pinctrl_pin_desc' >if (apl_pinctrl_pdata.name) >^ >drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct > pinctrl_pin_desc' >In file included from include/linux/linkage.h:4:0, > from include/linux/kernel.h:6, > from drivers/mfd/lpc_ich.c:63: > >> include/linux/compiler.h:150:17: error: invalid use of undefined type > 'struct pinctrl_pin_desc' > static struct ftrace_branch_data \ > ^ >include/linux/compiler.h:145:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^ > >> drivers/mfd/lpc_ich.c:1148:4: note: in expansion of macro 'if' >if (apl_pinctrl_pdata.name) >^ >drivers/mfd/lpc_ich.c:1158:7: error: invalid use of undefined type 'struct > pinctrl_pin_desc' > apl_pinctrl_pdata.name, ret); > ^ >drivers/mfd/lpc_ich.c:1160:4: error: invalid use of undefined type 'struct > pinctrl_pin_desc' >kfree(apl_pinctrl_pdata.name); >^ > > vim +150 include/linux/compiler.h > > 2bcd521a Steven Rostedt 2008-11-21 144 */ > ab3c9c68 Linus Torvalds 2009-04-07 145 #define if(cond, ...) __trace_if( > (cond , ## __VA_ARGS__) ) > ab3c9c68 Linus Torvalds 2009-04-07 146 #define __trace_if(cond) \ > ab3c9c68 Linus Torvalds 2009-04-07 147 if > (__builtin_constant_p((cond)) ? !!(cond) :\ > 2bcd521a Steven Rostedt 2008-11-21 148 ({ > \ > 2bcd521a Steven Rostedt 2008-11-21 149 int __r; > \ > 2bcd521a Steven Rostedt 2008-11-21 @150 static struct > ftrace_branch_data\ > 2bcd521a Steven Rostedt 2008-11-21 151 > __attribute__((__aligned__(4))) \ > 2bcd521a Steven Rostedt 2008-11-21 152 > __attribute__((section("_ftrace_branch"))) \ > 2bcd521a Steven Rostedt 2008-11-21 153 __f = { > \ > > :: The code at line 150 was first introduced by commit > :: 2bcd521a684cc94befbe2ce7d5b613c841b0d304 trace: profile all if > conditionals > > :: TO: Steven Rostedt <srost...@redhat.com> > :: CC: Ingo Molnar <mi...@elte.hu> > > --- > 0-DAY kernel test infrastructureOpen Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation Hi Andy, I will send patch v2 that looks like: +static int lpc_ich_misc(struct pci_dev *dev, enum lpc_chipsets chipset) +{ ... + const char *name; ... + /* Fill IRQ resource */ +
RE: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
> -Original Message- > From: lkp > Sent: Monday, April 11, 2016 12:35 PM > To: Tan, Jui Nee > Cc: kbuild-...@01.org; mika.westerb...@linux.intel.com; > heikki.kroge...@linux.intel.com; andriy.shevche...@linux.intel.com; > t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; > pty...@xes-inc.com; lee.jo...@linaro.org; linux-g...@vger.kernel.org; > linux-kernel@vger.kernel.org; Tan, Jui Nee ; Yong, > Jonathan ; Yu, Ong Hock > ; Voon, Weifeng ; Wan > Mohamad, Wan Ahmad Zainie > > Subject: Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO > pinctrl in non-ACPI system > > Hi Tan, > > [auto build test ERROR on tip/x86/core] > [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is applied to > the wrong git tree, please drop us a note to help improving the system] > > url:https://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl- > broxton-enable-platform-device-in-the-absent-of-ACPI- > enumeration/20160411-105542 > config: x86_64-randconfig-n0-0431 (attached as .config) > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All error/warnings (new ones prefixed by >>): > >drivers/mfd/lpc_ich.c:204:22: error: invalid application of 'sizeof' to > incomplete type 'struct pinctrl_pin_desc' > .pdata_size = sizeof(apl_pinctrl_pdata), > ^ >drivers/mfd/lpc_ich.c: In function 'lpc_ich_misc': >drivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined type 'struct > pinctrl_pin_desc' >apl_pinctrl_pdata.name = kasprintf(GFP_KERNEL, "%u", >^ >drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct > pinctrl_pin_desc' >if (apl_pinctrl_pdata.name) >^ >drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct > pinctrl_pin_desc' >In file included from include/linux/linkage.h:4:0, > from include/linux/kernel.h:6, > from drivers/mfd/lpc_ich.c:63: > >> include/linux/compiler.h:150:17: error: invalid use of undefined type > 'struct pinctrl_pin_desc' > static struct ftrace_branch_data \ > ^ >include/linux/compiler.h:145:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^ > >> drivers/mfd/lpc_ich.c:1148:4: note: in expansion of macro 'if' >if (apl_pinctrl_pdata.name) >^ >drivers/mfd/lpc_ich.c:1158:7: error: invalid use of undefined type 'struct > pinctrl_pin_desc' > apl_pinctrl_pdata.name, ret); > ^ >drivers/mfd/lpc_ich.c:1160:4: error: invalid use of undefined type 'struct > pinctrl_pin_desc' >kfree(apl_pinctrl_pdata.name); >^ > > vim +150 include/linux/compiler.h > > 2bcd521a Steven Rostedt 2008-11-21 144 */ > ab3c9c68 Linus Torvalds 2009-04-07 145 #define if(cond, ...) __trace_if( > (cond , ## __VA_ARGS__) ) > ab3c9c68 Linus Torvalds 2009-04-07 146 #define __trace_if(cond) \ > ab3c9c68 Linus Torvalds 2009-04-07 147 if > (__builtin_constant_p((cond)) ? !!(cond) :\ > 2bcd521a Steven Rostedt 2008-11-21 148 ({ > \ > 2bcd521a Steven Rostedt 2008-11-21 149 int __r; > \ > 2bcd521a Steven Rostedt 2008-11-21 @150 static struct > ftrace_branch_data\ > 2bcd521a Steven Rostedt 2008-11-21 151 > __attribute__((__aligned__(4))) \ > 2bcd521a Steven Rostedt 2008-11-21 152 > __attribute__((section("_ftrace_branch"))) \ > 2bcd521a Steven Rostedt 2008-11-21 153 __f = { > \ > > :: The code at line 150 was first introduced by commit > :: 2bcd521a684cc94befbe2ce7d5b613c841b0d304 trace: profile all if > conditionals > > :: TO: Steven Rostedt > :: CC: Ingo Molnar > > --- > 0-DAY kernel test infrastructureOpen Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation Hi Andy, I will send patch v2 that looks like: +static int lpc_ich_misc(struct pci_dev *dev, enum lpc_chipsets chipset) +{ ... + const char *name; ... + /* Fill IRQ resource */ + res->start = APL_GPIO_IRQ; + res->end = res->start; + res->flags = IORESOURCE_IRQ; + + name = kasprintf(GFP_KERNEL, "%
Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
Hi Tan, [auto build test ERROR on tip/x86/core] [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl-broxton-enable-platform-device-in-the-absent-of-ACPI-enumeration/20160411-105542 config: x86_64-randconfig-n0-0431 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): drivers/mfd/lpc_ich.c:204:22: error: invalid application of 'sizeof' to incomplete type 'struct pinctrl_pin_desc' .pdata_size = sizeof(apl_pinctrl_pdata), ^ drivers/mfd/lpc_ich.c: In function 'lpc_ich_misc': drivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' apl_pinctrl_pdata.name = kasprintf(GFP_KERNEL, "%u", ^ drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' if (apl_pinctrl_pdata.name) ^ drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' In file included from include/linux/linkage.h:4:0, from include/linux/kernel.h:6, from drivers/mfd/lpc_ich.c:63: >> include/linux/compiler.h:150:17: error: invalid use of undefined type >> 'struct pinctrl_pin_desc' static struct ftrace_branch_data \ ^ include/linux/compiler.h:145:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^ >> drivers/mfd/lpc_ich.c:1148:4: note: in expansion of macro 'if' if (apl_pinctrl_pdata.name) ^ drivers/mfd/lpc_ich.c:1158:7: error: invalid use of undefined type 'struct pinctrl_pin_desc' apl_pinctrl_pdata.name, ret); ^ drivers/mfd/lpc_ich.c:1160:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' kfree(apl_pinctrl_pdata.name); ^ vim +150 include/linux/compiler.h 2bcd521a Steven Rostedt 2008-11-21 144 */ ab3c9c68 Linus Torvalds 2009-04-07 145 #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ab3c9c68 Linus Torvalds 2009-04-07 146 #define __trace_if(cond) \ ab3c9c68 Linus Torvalds 2009-04-07 147 if (__builtin_constant_p((cond)) ? !!(cond) : \ 2bcd521a Steven Rostedt 2008-11-21 148 ({ \ 2bcd521a Steven Rostedt 2008-11-21 149 int __r; \ 2bcd521a Steven Rostedt 2008-11-21 @150 static struct ftrace_branch_data\ 2bcd521a Steven Rostedt 2008-11-21 151 __attribute__((__aligned__(4))) \ 2bcd521a Steven Rostedt 2008-11-21 152 __attribute__((section("_ftrace_branch"))) \ 2bcd521a Steven Rostedt 2008-11-21 153 __f = { \ :: The code at line 150 was first introduced by commit :: 2bcd521a684cc94befbe2ce7d5b613c841b0d304 trace: profile all if conditionals :: TO: Steven Rostedt:: CC: Ingo Molnar --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
Hi Tan, [auto build test ERROR on tip/x86/core] [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl-broxton-enable-platform-device-in-the-absent-of-ACPI-enumeration/20160411-105542 config: x86_64-randconfig-n0-0431 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): drivers/mfd/lpc_ich.c:204:22: error: invalid application of 'sizeof' to incomplete type 'struct pinctrl_pin_desc' .pdata_size = sizeof(apl_pinctrl_pdata), ^ drivers/mfd/lpc_ich.c: In function 'lpc_ich_misc': drivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' apl_pinctrl_pdata.name = kasprintf(GFP_KERNEL, "%u", ^ drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' if (apl_pinctrl_pdata.name) ^ drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' In file included from include/linux/linkage.h:4:0, from include/linux/kernel.h:6, from drivers/mfd/lpc_ich.c:63: >> include/linux/compiler.h:150:17: error: invalid use of undefined type >> 'struct pinctrl_pin_desc' static struct ftrace_branch_data \ ^ include/linux/compiler.h:145:23: note: in expansion of macro '__trace_if' #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ^ >> drivers/mfd/lpc_ich.c:1148:4: note: in expansion of macro 'if' if (apl_pinctrl_pdata.name) ^ drivers/mfd/lpc_ich.c:1158:7: error: invalid use of undefined type 'struct pinctrl_pin_desc' apl_pinctrl_pdata.name, ret); ^ drivers/mfd/lpc_ich.c:1160:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' kfree(apl_pinctrl_pdata.name); ^ vim +150 include/linux/compiler.h 2bcd521a Steven Rostedt 2008-11-21 144 */ ab3c9c68 Linus Torvalds 2009-04-07 145 #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) ab3c9c68 Linus Torvalds 2009-04-07 146 #define __trace_if(cond) \ ab3c9c68 Linus Torvalds 2009-04-07 147 if (__builtin_constant_p((cond)) ? !!(cond) : \ 2bcd521a Steven Rostedt 2008-11-21 148 ({ \ 2bcd521a Steven Rostedt 2008-11-21 149 int __r; \ 2bcd521a Steven Rostedt 2008-11-21 @150 static struct ftrace_branch_data\ 2bcd521a Steven Rostedt 2008-11-21 151 __attribute__((__aligned__(4))) \ 2bcd521a Steven Rostedt 2008-11-21 152 __attribute__((section("_ftrace_branch"))) \ 2bcd521a Steven Rostedt 2008-11-21 153 __f = { \ :: The code at line 150 was first introduced by commit :: 2bcd521a684cc94befbe2ce7d5b613c841b0d304 trace: profile all if conditionals :: TO: Steven Rostedt :: CC: Ingo Molnar --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
Hi Tan, [auto build test ERROR on tip/x86/core] [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl-broxton-enable-platform-device-in-the-absent-of-ACPI-enumeration/20160411-105542 config: x86_64-randconfig-x019-201615 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> drivers/mfd/lpc_ich.c:204:22: error: invalid application of 'sizeof' to >> incomplete type 'struct pinctrl_pin_desc' .pdata_size = sizeof(apl_pinctrl_pdata), ^ drivers/mfd/lpc_ich.c: In function 'lpc_ich_misc': >> drivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined type 'struct >> pinctrl_pin_desc' apl_pinctrl_pdata.name = kasprintf(GFP_KERNEL, "%u", ^ drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' if (apl_pinctrl_pdata.name) ^ drivers/mfd/lpc_ich.c:1158:7: error: invalid use of undefined type 'struct pinctrl_pin_desc' apl_pinctrl_pdata.name, ret); ^ drivers/mfd/lpc_ich.c:1160:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' kfree(apl_pinctrl_pdata.name); ^ vim +204 drivers/mfd/lpc_ich.c 198 }; 199 200 static struct mfd_cell apl_gpio_devices = { 201 .name = "apl-pinctrl", 202 .num_resources = ARRAY_SIZE(apl_gpio_io_res), 203 .resources = apl_gpio_io_res[1], > 204 .pdata_size = sizeof(apl_pinctrl_pdata), 205 .platform_data = _pinctrl_pdata, 206 .ignore_resource_conflicts = true, 207 }; --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
Hi Tan, [auto build test ERROR on tip/x86/core] [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl-broxton-enable-platform-device-in-the-absent-of-ACPI-enumeration/20160411-105542 config: x86_64-randconfig-x019-201615 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> drivers/mfd/lpc_ich.c:204:22: error: invalid application of 'sizeof' to >> incomplete type 'struct pinctrl_pin_desc' .pdata_size = sizeof(apl_pinctrl_pdata), ^ drivers/mfd/lpc_ich.c: In function 'lpc_ich_misc': >> drivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined type 'struct >> pinctrl_pin_desc' apl_pinctrl_pdata.name = kasprintf(GFP_KERNEL, "%u", ^ drivers/mfd/lpc_ich.c:1148:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' if (apl_pinctrl_pdata.name) ^ drivers/mfd/lpc_ich.c:1158:7: error: invalid use of undefined type 'struct pinctrl_pin_desc' apl_pinctrl_pdata.name, ret); ^ drivers/mfd/lpc_ich.c:1160:4: error: invalid use of undefined type 'struct pinctrl_pin_desc' kfree(apl_pinctrl_pdata.name); ^ vim +204 drivers/mfd/lpc_ich.c 198 }; 199 200 static struct mfd_cell apl_gpio_devices = { 201 .name = "apl-pinctrl", 202 .num_resources = ARRAY_SIZE(apl_gpio_io_res), 203 .resources = apl_gpio_io_res[1], > 204 .pdata_size = sizeof(apl_pinctrl_pdata), 205 .platform_data = _pinctrl_pdata, 206 .ignore_resource_conflicts = true, 207 }; --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
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--- drivers/mfd/Kconfig | 3 +- drivers/mfd/lpc_ich.c | 119 ++ 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index eea61e3..54fed50 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -359,8 +359,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/lpc_ich.c b/drivers/mfd/lpc_ich.c index bd3aa45..c28ca26 100644 --- a/drivers/mfd/lpc_ich.c +++ b/drivers/mfd/lpc_ich.c @@ -68,6 +68,10 @@ #include #include #include +#include +#include + +#include #define ACPIBASE 0x40 #define ACPIBASE_GPE_OFF 0x28 @@ -94,6 +98,19 @@ #define wdt_mem_res(i) wdt_res(ICH_RES_MEM_OFF, i) #define wdt_res(b, i) (_ich_res[(b) + (i)]) +/* Offset data for Apollo Lake GPIO communities */ +#define APL_GPIO_SOUTHWEST_OFFSET 0xc0 +#define APL_GPIO_NORTHWEST_OFFSET 0xc4 +#define APL_GPIO_NORTH_OFFSET 0xc5 +#define APL_GPIO_WEST_OFFSET 0xc7 + +#define APL_GPIO_SOUTHWEST_END (43 * 0x8) +#define APL_GPIO_NORTHWEST_END (77 * 0x8) +#define APL_GPIO_NORTH_END (90 * 0x8) +#define APL_GPIO_WEST_END (47 * 0x8) + +#define APL_GPIO_IRQ 14 + struct lpc_ich_priv { int chipset; @@ -133,6 +150,39 @@ static struct resource gpio_ich_res[] = { }, }; +static struct resource apl_gpio_io_res[][2] = { + { + { + .start = APL_GPIO_NORTH_OFFSET << 16, + .end = (APL_GPIO_NORTH_OFFSET << 16) + + APL_GPIO_NORTH_END, + }, + }, + { + { + .start = APL_GPIO_NORTHWEST_OFFSET << 16, + .end = (APL_GPIO_NORTHWEST_OFFSET << 16) + + APL_GPIO_NORTHWEST_END, + }, + }, + { + { + .start = APL_GPIO_WEST_OFFSET << 16, + .end = (APL_GPIO_WEST_OFFSET << 16) + + APL_GPIO_WEST_END, + }, + }, + { + { + .start = APL_GPIO_SOUTHWEST_OFFSET << 16, + .end = (APL_GPIO_SOUTHWEST_OFFSET << 16) + + APL_GPIO_SOUTHWEST_END, + }, + }, +}; + +static struct pinctrl_pin_desc apl_pinctrl_pdata; + static struct mfd_cell lpc_ich_wdt_cell = { .name = "iTCO_wdt", .num_resources = ARRAY_SIZE(wdt_ich_res), @@ -147,6 +197,15 @@ static struct mfd_cell lpc_ich_gpio_cell = { .ignore_resource_conflicts = true, }; +static struct mfd_cell apl_gpio_devices = { + .name = "apl-pinctrl", + .num_resources = ARRAY_SIZE(apl_gpio_io_res), + .resources = apl_gpio_io_res[1], + .pdata_size = sizeof(apl_pinctrl_pdata), + .platform_data = _pinctrl_pdata, + .ignore_resource_conflicts = true, +}; + /* chipset related info */ enum lpc_chipsets { LPC_ICH = 0,/* ICH */ @@ -216,6 +275,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[] = { @@ -531,6 +591,10 @@ static struct lpc_ich_info lpc_chipset_info[] = { .name = "9 Series", .iTCO_version = 2, }, + [LPC_APL] = { + .name = "Apollo Lake SoC", + .iTCO_version = 5, + }, }; /* @@ -679,6 +743,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}, @@ -1050,6 +1115,57 @@ wdt_done: return ret; } +static int lpc_ich_misc(struct pci_dev *dev, enum lpc_chipsets chipset) +{ + unsigned int apl_p2sb = PCI_DEVFN(0x0d, 0); + unsigned int i; + int ret; + + switch (chipset) { + case LPC_APL: + /* +* Apollo lake, has not 1, but 4 gpio controllers, +* handle it a bit differently. +*/ + + for (i = 0; i <
[PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system
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 --- drivers/mfd/Kconfig | 3 +- drivers/mfd/lpc_ich.c | 119 ++ 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index eea61e3..54fed50 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -359,8 +359,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/lpc_ich.c b/drivers/mfd/lpc_ich.c index bd3aa45..c28ca26 100644 --- a/drivers/mfd/lpc_ich.c +++ b/drivers/mfd/lpc_ich.c @@ -68,6 +68,10 @@ #include #include #include +#include +#include + +#include #define ACPIBASE 0x40 #define ACPIBASE_GPE_OFF 0x28 @@ -94,6 +98,19 @@ #define wdt_mem_res(i) wdt_res(ICH_RES_MEM_OFF, i) #define wdt_res(b, i) (_ich_res[(b) + (i)]) +/* Offset data for Apollo Lake GPIO communities */ +#define APL_GPIO_SOUTHWEST_OFFSET 0xc0 +#define APL_GPIO_NORTHWEST_OFFSET 0xc4 +#define APL_GPIO_NORTH_OFFSET 0xc5 +#define APL_GPIO_WEST_OFFSET 0xc7 + +#define APL_GPIO_SOUTHWEST_END (43 * 0x8) +#define APL_GPIO_NORTHWEST_END (77 * 0x8) +#define APL_GPIO_NORTH_END (90 * 0x8) +#define APL_GPIO_WEST_END (47 * 0x8) + +#define APL_GPIO_IRQ 14 + struct lpc_ich_priv { int chipset; @@ -133,6 +150,39 @@ static struct resource gpio_ich_res[] = { }, }; +static struct resource apl_gpio_io_res[][2] = { + { + { + .start = APL_GPIO_NORTH_OFFSET << 16, + .end = (APL_GPIO_NORTH_OFFSET << 16) + + APL_GPIO_NORTH_END, + }, + }, + { + { + .start = APL_GPIO_NORTHWEST_OFFSET << 16, + .end = (APL_GPIO_NORTHWEST_OFFSET << 16) + + APL_GPIO_NORTHWEST_END, + }, + }, + { + { + .start = APL_GPIO_WEST_OFFSET << 16, + .end = (APL_GPIO_WEST_OFFSET << 16) + + APL_GPIO_WEST_END, + }, + }, + { + { + .start = APL_GPIO_SOUTHWEST_OFFSET << 16, + .end = (APL_GPIO_SOUTHWEST_OFFSET << 16) + + APL_GPIO_SOUTHWEST_END, + }, + }, +}; + +static struct pinctrl_pin_desc apl_pinctrl_pdata; + static struct mfd_cell lpc_ich_wdt_cell = { .name = "iTCO_wdt", .num_resources = ARRAY_SIZE(wdt_ich_res), @@ -147,6 +197,15 @@ static struct mfd_cell lpc_ich_gpio_cell = { .ignore_resource_conflicts = true, }; +static struct mfd_cell apl_gpio_devices = { + .name = "apl-pinctrl", + .num_resources = ARRAY_SIZE(apl_gpio_io_res), + .resources = apl_gpio_io_res[1], + .pdata_size = sizeof(apl_pinctrl_pdata), + .platform_data = _pinctrl_pdata, + .ignore_resource_conflicts = true, +}; + /* chipset related info */ enum lpc_chipsets { LPC_ICH = 0,/* ICH */ @@ -216,6 +275,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[] = { @@ -531,6 +591,10 @@ static struct lpc_ich_info lpc_chipset_info[] = { .name = "9 Series", .iTCO_version = 2, }, + [LPC_APL] = { + .name = "Apollo Lake SoC", + .iTCO_version = 5, + }, }; /* @@ -679,6 +743,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}, @@ -1050,6 +1115,57 @@ wdt_done: return ret; } +static int lpc_ich_misc(struct pci_dev *dev, enum lpc_chipsets chipset) +{ + unsigned int apl_p2sb = PCI_DEVFN(0x0d, 0); + unsigned int i; + int ret; + + switch (chipset) { + case LPC_APL: + /* +* Apollo lake, has not 1, but 4 gpio controllers, +* handle it a bit differently. +*/ + + for (i = 0; i < ARRAY_SIZE(apl_gpio_io_res); i++) { +