platform/x86: intel_pmc_core: Introduce PMC_DEVICE() macro
PATCH 1/1 platform/x86: intel_pmc_core: Introduce PMC_DEVICE() macro
Instead of open coding PCI_VDEVICE() and some of its parameters, introduce new macro and use it.
--- drivers/platform/x86/intel_pmc_core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/platform/x86/intel_pmc_core.c +4 -3
@@ -119,10 +119,11 @@ static const struct pmc_reg_map spt_reg_map = { .pm_read_disable_bit = SPT_PMC_READ_DISABLE_BIT, }; +#define PMC_DEVICE (id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data } +static const struct pci_device_id pmc_pci_ids[] = { - {PCI_VDEVICE (INTEL ,SPT_PMC_PCI_DEVICE_ID ), - (kernel_ulong_t)&spt_reg_map }, - {0 , }, +PMC_DEVICE (SPT_PMC_PCI_DEVICE_ID , &spt_reg_map), + {} };static inline u8 pmc_core_reg_read_byte (struct pmc_dev *pmcdev,int offset)
Signature · 1 line
2.15.0
Quoted 3 lines · Andy Shevchenko
Instead of open coding
PCI_VDEVICE()and some of its parameters, introduce new macro and use it.
Urgggghhhh, not my day.
Signature · 2 lines
With Best Regards, Andy Shevchenko
kbuild test robot
build botI love your patch! Yet something to improve:
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on platform-drivers-x86/for-next]
[also build test ERROR on v4.15-rc3 next-20171214]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/platform-x86-intel_pmc_core-Introduce-PMC_DEVICE-macro/20171215-040644 base: git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next config: x86_64-randconfig-x007-201750 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from drivers/platform/x86/intel_pmc_core.c:26:0:
include/linux/pci.h:817:2: error: field name not in record or union initializer
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:2: note: (near initialization for 'pmc_pci_ids')
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:34: error: field name not in record or union initializer
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:34: note: (near initialization for 'pmc_pci_ids')
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:2: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:2: note: (near initialization for 'pmc_pci_ids')
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:27: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:27: note: (near initialization for 'pmc_pci_ids')
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:122:54: error: initializer element is not computable at load time
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:122:54: note: (near initialization for 'pmc_pci_ids[3].subdevice')
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^
drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
drivers/platform/x86/intel_pmc_core.c:124:51: warning: missing braces around initializer [-Wmissing-braces]
static const struct pci_device_id pmc_pci_ids[] = {
^
drivers/platform/x86/intel_pmc_core.c:126:2: error: expected identifier or '(' before '{' token
{}
^
drivers/platform/x86/intel_pmc_core.c:127:1: error: expected identifier or '(' before '}' token
};
^vim +122 drivers/platform/x86/intel_pmc_core.c
121
> 122 #define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
123
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botI love your patch! Yet something to improve:
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on platform-drivers-x86/for-next]
[also build test ERROR on v4.15-rc3 next-20171214]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/platform-x86-intel_pmc_core-Introduce-PMC_DEVICE-macro/20171215-040644 base: git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next config: i386-randconfig-x072-201750 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: # save the attached .config to linux build tree make ARCH=i386
All error/warnings (new ones prefixed by >>):
In file included from drivers/platform/x86/intel_pmc_core.c:26:0:
>> include/linux/pci.h:817:2: error: field name not in record or union initializer
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
>> drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:2: note: (near initialization for 'pmc_pci_ids')
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
>> drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:34: error: field name not in record or union initializer
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
>> drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:34: note: (near initialization for 'pmc_pci_ids')
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
>> drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:2: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
>> drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:2: note: (near initialization for 'pmc_pci_ids')
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
>> drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:27: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
>> drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:27: note: (near initialization for 'pmc_pci_ids')
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
>> drivers/platform/x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
>> drivers/platform/x86/intel_pmc_core.c:124:51: warning: missing braces around initializer [-Wmissing-braces]
static const struct pci_device_id pmc_pci_ids[] = {
^
>> drivers/platform/x86/intel_pmc_core.c:126:2: error: expected identifier or '(' before '{' token
{}
^
drivers/platform/x86/intel_pmc_core.c:127:1: error: expected identifier or '(' before '}' token
};
^
--
In file included from drivers/platform//x86/intel_pmc_core.c:26:0:
>> include/linux/pci.h:817:2: error: field name not in record or union initializer
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform//x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:2: note: (near initialization for 'pmc_pci_ids')
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform//x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:34: error: field name not in record or union initializer
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform//x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:817:34: note: (near initialization for 'pmc_pci_ids')
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
^
drivers/platform//x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:2: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform//x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:2: note: (near initialization for 'pmc_pci_ids')
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform//x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:27: error: field name not in record or union initializer
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform//x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
include/linux/pci.h:818:27: note: (near initialization for 'pmc_pci_ids')
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
^
drivers/platform//x86/intel_pmc_core.c:122:30: note: in expansion of macro 'PCI_VDEVICE'
#define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
^~~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:125:2: note: in expansion of macro 'PMC_DEVICE'
PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
^~~~~~~~~~
drivers/platform//x86/intel_pmc_core.c:124:51: warning: missing braces around initializer [-Wmissing-braces]
static const struct pci_device_id pmc_pci_ids[] = {
^
drivers/platform//x86/intel_pmc_core.c:126:2: error: expected identifier or '(' before '{' token
{}
^
drivers/platform//x86/intel_pmc_core.c:127:1: error: expected identifier or '(' before '}' token
};
^vim +126 drivers/platform/x86/intel_pmc_core.c
> 26 #include <linux/pci.h>
27 #include <linux/uaccess.h>
28
29 #include <asm/cpu_device_id.h>
30 #include <asm/intel-family.h>
31 #include <asm/pmc_core.h>
32
33 #include "intel_pmc_core.h"
34
35 static struct pmc_dev pmc;
36
37 static const struct pmc_bit_map spt_pll_map[] = {
38 {"MIPI PLL", SPT_PMC_BIT_MPHY_CMN_LANE0},
39 {"GEN2 USB2PCIE2 PLL", SPT_PMC_BIT_MPHY_CMN_LANE1},
40 {"DMIPCIE3 PLL", SPT_PMC_BIT_MPHY_CMN_LANE2},
41 {"SATA PLL", SPT_PMC_BIT_MPHY_CMN_LANE3},
42 {},
43 };
44
45 static const struct pmc_bit_map spt_mphy_map[] = {
46 {"MPHY CORE LANE 0", SPT_PMC_BIT_MPHY_LANE0},
47 {"MPHY CORE LANE 1", SPT_PMC_BIT_MPHY_LANE1},
48 {"MPHY CORE LANE 2", SPT_PMC_BIT_MPHY_LANE2},
49 {"MPHY CORE LANE 3", SPT_PMC_BIT_MPHY_LANE3},
50 {"MPHY CORE LANE 4", SPT_PMC_BIT_MPHY_LANE4},
51 {"MPHY CORE LANE 5", SPT_PMC_BIT_MPHY_LANE5},
52 {"MPHY CORE LANE 6", SPT_PMC_BIT_MPHY_LANE6},
53 {"MPHY CORE LANE 7", SPT_PMC_BIT_MPHY_LANE7},
54 {"MPHY CORE LANE 8", SPT_PMC_BIT_MPHY_LANE8},
55 {"MPHY CORE LANE 9", SPT_PMC_BIT_MPHY_LANE9},
56 {"MPHY CORE LANE 10", SPT_PMC_BIT_MPHY_LANE10},
57 {"MPHY CORE LANE 11", SPT_PMC_BIT_MPHY_LANE11},
58 {"MPHY CORE LANE 12", SPT_PMC_BIT_MPHY_LANE12},
59 {"MPHY CORE LANE 13", SPT_PMC_BIT_MPHY_LANE13},
60 {"MPHY CORE LANE 14", SPT_PMC_BIT_MPHY_LANE14},
61 {"MPHY CORE LANE 15", SPT_PMC_BIT_MPHY_LANE15},
62 {},
63 };
64
65 static const struct pmc_bit_map spt_pfear_map[] = {
66 {"PMC", SPT_PMC_BIT_PMC},
67 {"OPI-DMI", SPT_PMC_BIT_OPI},
68 {"SPI / eSPI", SPT_PMC_BIT_SPI},
69 {"XHCI", SPT_PMC_BIT_XHCI},
70 {"SPA", SPT_PMC_BIT_SPA},
71 {"SPB", SPT_PMC_BIT_SPB},
72 {"SPC", SPT_PMC_BIT_SPC},
73 {"GBE", SPT_PMC_BIT_GBE},
74 {"SATA", SPT_PMC_BIT_SATA},
75 {"HDA-PGD0", SPT_PMC_BIT_HDA_PGD0},
76 {"HDA-PGD1", SPT_PMC_BIT_HDA_PGD1},
77 {"HDA-PGD2", SPT_PMC_BIT_HDA_PGD2},
78 {"HDA-PGD3", SPT_PMC_BIT_HDA_PGD3},
79 {"RSVD", SPT_PMC_BIT_RSVD_0B},
80 {"LPSS", SPT_PMC_BIT_LPSS},
81 {"LPC", SPT_PMC_BIT_LPC},
82 {"SMB", SPT_PMC_BIT_SMB},
83 {"ISH", SPT_PMC_BIT_ISH},
84 {"P2SB", SPT_PMC_BIT_P2SB},
85 {"DFX", SPT_PMC_BIT_DFX},
86 {"SCC", SPT_PMC_BIT_SCC},
87 {"RSVD", SPT_PMC_BIT_RSVD_0C},
88 {"FUSE", SPT_PMC_BIT_FUSE},
89 {"CAMERA", SPT_PMC_BIT_CAMREA},
90 {"RSVD", SPT_PMC_BIT_RSVD_0D},
91 {"USB3-OTG", SPT_PMC_BIT_USB3_OTG},
92 {"EXI", SPT_PMC_BIT_EXI},
93 {"CSE", SPT_PMC_BIT_CSE},
94 {"CSME_KVM", SPT_PMC_BIT_CSME_KVM},
95 {"CSME_PMT", SPT_PMC_BIT_CSME_PMT},
96 {"CSME_CLINK", SPT_PMC_BIT_CSME_CLINK},
97 {"CSME_PTIO", SPT_PMC_BIT_CSME_PTIO},
98 {"CSME_USBR", SPT_PMC_BIT_CSME_USBR},
99 {"CSME_SUSRAM", SPT_PMC_BIT_CSME_SUSRAM},
100 {"CSME_SMT", SPT_PMC_BIT_CSME_SMT},
101 {"RSVD", SPT_PMC_BIT_RSVD_1A},
102 {"CSME_SMS2", SPT_PMC_BIT_CSME_SMS2},
103 {"CSME_SMS1", SPT_PMC_BIT_CSME_SMS1},
104 {"CSME_RTC", SPT_PMC_BIT_CSME_RTC},
105 {"CSME_PSF", SPT_PMC_BIT_CSME_PSF},
106 {},
107 };
108
109 static const struct pmc_reg_map spt_reg_map = {
110 .pfear_sts = spt_pfear_map,
111 .mphy_sts = spt_mphy_map,
112 .pll_sts = spt_pll_map,
113 .slp_s0_offset = SPT_PMC_SLP_S0_RES_COUNTER_OFFSET,
114 .ltr_ignore_offset = SPT_PMC_LTR_IGNORE_OFFSET,
115 .regmap_length = SPT_PMC_MMIO_REG_LEN,
116 .ppfear0_offset = SPT_PMC_XRAM_PPFEAR0A,
117 .ppfear_buckets = SPT_PPFEAR_NUM_ENTRIES,
118 .pm_cfg_offset = SPT_PMC_PM_CFG_OFFSET,
119 .pm_read_disable_bit = SPT_PMC_READ_DISABLE_BIT,
120 };
121
> 122 #define PMC_DEVICE(id, data) PCI_VDEVICE(INTEL, id), (kernel_ulong_t)data }
123
> 124 static const struct pci_device_id pmc_pci_ids[] = {
> 125 PMC_DEVICE(SPT_PMC_PCI_DEVICE_ID, &spt_reg_map),
> 126 {} 127 };
128
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation