diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-25 22:15:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-25 22:15:35 -0400 |
commit | 8e466955d6f78896cc6519b6f07e89173d3ba58b (patch) | |
tree | fa9885445ae54ece2835ba69ca5ba776262bdb6e | |
parent | 2d724ffddd958f21e2711b7400c63bdfee287d75 (diff) | |
parent | 05f310e26fe9d97fec0ce1752edc16bf1ea55a2d (diff) |
Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform updates from Ingo Molnar:
"The main changes in this cycle were:
- Intel-SoC enhancements (Andy Shevchenko)
- Intel CPU symbolic model definition rework (Dave Hansen)
- ... other misc changes"
* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
x86/sfi: Enable enumeration of SD devices
x86/pci: Use MRFLD abbreviation for Merrifield
x86/platform/intel-mid: Make vertical indentation consistent
x86/platform/intel-mid: Mark regulators explicitly defined
x86/platform/intel-mid: Rename mrfl.c to mrfld.c
x86/platform/intel-mid: Enable spidev on Intel Edison boards
x86/platform/intel-mid: Extend PWRMU to support Penwell
x86/pci, x86/platform/intel_mid_pci: Remove duplicate power off code
x86/platform/intel-mid: Add pinctrl for Intel Merrifield
x86/platform/intel-mid: Enable GPIO expanders on Edison
x86/platform/intel-mid: Add Power Management Unit driver
x86/platform/atom/punit: Enable support for Merrifield
x86/platform/intel_mid_pci: Rework IRQ0 workaround
x86, thermal: Clean up and fix CPU model detection for intel_soc_dts_thermal
x86, mmc: Use Intel family name macros for mmc driver
x86/intel_telemetry: Use Intel family name macros for telemetry driver
x86/acpi/lss: Use Intel family name macros for the acpi_lpss driver
x86/cpufreq: Use Intel family name macros for the intel_pstate cpufreq driver
x86/platform: Use new Intel model number macros
x86/intel_idle: Use Intel family macros for intel_idle
...
25 files changed, 955 insertions, 143 deletions
diff --git a/arch/x86/include/asm/intel-mid.h b/arch/x86/include/asm/intel-mid.h index 7c5af123bdbd..9d6b097aa73d 100644 --- a/arch/x86/include/asm/intel-mid.h +++ b/arch/x86/include/asm/intel-mid.h | |||
@@ -12,9 +12,17 @@ | |||
12 | #define _ASM_X86_INTEL_MID_H | 12 | #define _ASM_X86_INTEL_MID_H |
13 | 13 | ||
14 | #include <linux/sfi.h> | 14 | #include <linux/sfi.h> |
15 | #include <linux/pci.h> | ||
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | 17 | ||
17 | extern int intel_mid_pci_init(void); | 18 | extern int intel_mid_pci_init(void); |
19 | extern int intel_mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state); | ||
20 | |||
21 | #define INTEL_MID_PWR_LSS_OFFSET 4 | ||
22 | #define INTEL_MID_PWR_LSS_TYPE (1 << 7) | ||
23 | |||
24 | extern int intel_mid_pwr_get_lss_id(struct pci_dev *pdev); | ||
25 | |||
18 | extern int get_gpio_by_name(const char *name); | 26 | extern int get_gpio_by_name(const char *name); |
19 | extern void intel_scu_device_register(struct platform_device *pdev); | 27 | extern void intel_scu_device_register(struct platform_device *pdev); |
20 | extern int __init sfi_parse_mrtc(struct sfi_table_header *table); | 28 | extern int __init sfi_parse_mrtc(struct sfi_table_header *table); |
@@ -34,13 +42,28 @@ struct devs_id { | |||
34 | void *(*get_platform_data)(void *info); | 42 | void *(*get_platform_data)(void *info); |
35 | /* Custom handler for devices */ | 43 | /* Custom handler for devices */ |
36 | void (*device_handler)(struct sfi_device_table_entry *pentry, | 44 | void (*device_handler)(struct sfi_device_table_entry *pentry, |
37 | struct devs_id *dev); | 45 | struct devs_id *dev); |
38 | }; | 46 | }; |
39 | 47 | ||
40 | #define sfi_device(i) \ | 48 | #define sfi_device(i) \ |
41 | static const struct devs_id *const __intel_mid_sfi_##i##_dev __used \ | 49 | static const struct devs_id *const __intel_mid_sfi_##i##_dev __used \ |
42 | __attribute__((__section__(".x86_intel_mid_dev.init"))) = &i | 50 | __attribute__((__section__(".x86_intel_mid_dev.init"))) = &i |
43 | 51 | ||
52 | /** | ||
53 | * struct mid_sd_board_info - template for SD device creation | ||
54 | * @name: identifies the driver | ||
55 | * @bus_num: board-specific identifier for a given SD controller | ||
56 | * @max_clk: the maximum frequency device supports | ||
57 | * @platform_data: the particular data stored there is driver-specific | ||
58 | */ | ||
59 | struct mid_sd_board_info { | ||
60 | char name[SFI_NAME_LEN]; | ||
61 | int bus_num; | ||
62 | unsigned short addr; | ||
63 | u32 max_clk; | ||
64 | void *platform_data; | ||
65 | }; | ||
66 | |||
44 | /* | 67 | /* |
45 | * Medfield is the follow-up of Moorestown, it combines two chip solution into | 68 | * Medfield is the follow-up of Moorestown, it combines two chip solution into |
46 | * one. Other than that it also added always-on and constant tsc and lapic | 69 | * one. Other than that it also added always-on and constant tsc and lapic |
@@ -60,7 +83,7 @@ extern enum intel_mid_cpu_type __intel_mid_cpu_chip; | |||
60 | /** | 83 | /** |
61 | * struct intel_mid_ops - Interface between intel-mid & sub archs | 84 | * struct intel_mid_ops - Interface between intel-mid & sub archs |
62 | * @arch_setup: arch_setup function to re-initialize platform | 85 | * @arch_setup: arch_setup function to re-initialize platform |
63 | * structures (x86_init, x86_platform_init) | 86 | * structures (x86_init, x86_platform_init) |
64 | * | 87 | * |
65 | * This structure can be extended if any new interface is required | 88 | * This structure can be extended if any new interface is required |
66 | * between intel-mid & its sub arch files. | 89 | * between intel-mid & its sub arch files. |
@@ -70,20 +93,20 @@ struct intel_mid_ops { | |||
70 | }; | 93 | }; |
71 | 94 | ||
72 | /* Helper API's for INTEL_MID_OPS_INIT */ | 95 | /* Helper API's for INTEL_MID_OPS_INIT */ |
73 | #define DECLARE_INTEL_MID_OPS_INIT(cpuname, cpuid) \ | 96 | #define DECLARE_INTEL_MID_OPS_INIT(cpuname, cpuid) \ |
74 | [cpuid] = get_##cpuname##_ops | 97 | [cpuid] = get_##cpuname##_ops |
75 | 98 | ||
76 | /* Maximum number of CPU ops */ | 99 | /* Maximum number of CPU ops */ |
77 | #define MAX_CPU_OPS(a) (sizeof(a)/sizeof(void *)) | 100 | #define MAX_CPU_OPS(a) (sizeof(a)/sizeof(void *)) |
78 | 101 | ||
79 | /* | 102 | /* |
80 | * For every new cpu addition, a weak get_<cpuname>_ops() function needs be | 103 | * For every new cpu addition, a weak get_<cpuname>_ops() function needs be |
81 | * declared in arch/x86/platform/intel_mid/intel_mid_weak_decls.h. | 104 | * declared in arch/x86/platform/intel_mid/intel_mid_weak_decls.h. |
82 | */ | 105 | */ |
83 | #define INTEL_MID_OPS_INIT {\ | 106 | #define INTEL_MID_OPS_INIT { \ |
84 | DECLARE_INTEL_MID_OPS_INIT(penwell, INTEL_MID_CPU_CHIP_PENWELL), \ | 107 | DECLARE_INTEL_MID_OPS_INIT(penwell, INTEL_MID_CPU_CHIP_PENWELL), \ |
85 | DECLARE_INTEL_MID_OPS_INIT(cloverview, INTEL_MID_CPU_CHIP_CLOVERVIEW), \ | 108 | DECLARE_INTEL_MID_OPS_INIT(cloverview, INTEL_MID_CPU_CHIP_CLOVERVIEW), \ |
86 | DECLARE_INTEL_MID_OPS_INIT(tangier, INTEL_MID_CPU_CHIP_TANGIER) \ | 109 | DECLARE_INTEL_MID_OPS_INIT(tangier, INTEL_MID_CPU_CHIP_TANGIER) \ |
87 | }; | 110 | }; |
88 | 111 | ||
89 | #ifdef CONFIG_X86_INTEL_MID | 112 | #ifdef CONFIG_X86_INTEL_MID |
@@ -100,8 +123,8 @@ static inline bool intel_mid_has_msic(void) | |||
100 | 123 | ||
101 | #else /* !CONFIG_X86_INTEL_MID */ | 124 | #else /* !CONFIG_X86_INTEL_MID */ |
102 | 125 | ||
103 | #define intel_mid_identify_cpu() (0) | 126 | #define intel_mid_identify_cpu() 0 |
104 | #define intel_mid_has_msic() (0) | 127 | #define intel_mid_has_msic() 0 |
105 | 128 | ||
106 | #endif /* !CONFIG_X86_INTEL_MID */ | 129 | #endif /* !CONFIG_X86_INTEL_MID */ |
107 | 130 | ||
@@ -117,35 +140,38 @@ extern enum intel_mid_timer_options intel_mid_timer_options; | |||
117 | * Penwell uses spread spectrum clock, so the freq number is not exactly | 140 | * Penwell uses spread spectrum clock, so the freq number is not exactly |
118 | * the same as reported by MSR based on SDM. | 141 | * the same as reported by MSR based on SDM. |
119 | */ | 142 | */ |
120 | #define FSB_FREQ_83SKU 83200 | 143 | #define FSB_FREQ_83SKU 83200 |
121 | #define FSB_FREQ_100SKU 99840 | 144 | #define FSB_FREQ_100SKU 99840 |
122 | #define FSB_FREQ_133SKU 133000 | 145 | #define FSB_FREQ_133SKU 133000 |
123 | 146 | ||
124 | #define FSB_FREQ_167SKU 167000 | 147 | #define FSB_FREQ_167SKU 167000 |
125 | #define FSB_FREQ_200SKU 200000 | 148 | #define FSB_FREQ_200SKU 200000 |
126 | #define FSB_FREQ_267SKU 267000 | 149 | #define FSB_FREQ_267SKU 267000 |
127 | #define FSB_FREQ_333SKU 333000 | 150 | #define FSB_FREQ_333SKU 333000 |
128 | #define FSB_FREQ_400SKU 400000 | 151 | #define FSB_FREQ_400SKU 400000 |
129 | 152 | ||
130 | /* Bus Select SoC Fuse value */ | 153 | /* Bus Select SoC Fuse value */ |
131 | #define BSEL_SOC_FUSE_MASK 0x7 | 154 | #define BSEL_SOC_FUSE_MASK 0x7 |
132 | #define BSEL_SOC_FUSE_001 0x1 /* FSB 133MHz */ | 155 | /* FSB 133MHz */ |
133 | #define BSEL_SOC_FUSE_101 0x5 /* FSB 100MHz */ | 156 | #define BSEL_SOC_FUSE_001 0x1 |
134 | #define BSEL_SOC_FUSE_111 0x7 /* FSB 83MHz */ | 157 | /* FSB 100MHz */ |
158 | #define BSEL_SOC_FUSE_101 0x5 | ||
159 | /* FSB 83MHz */ | ||
160 | #define BSEL_SOC_FUSE_111 0x7 | ||
135 | 161 | ||
136 | #define SFI_MTMR_MAX_NUM 8 | 162 | #define SFI_MTMR_MAX_NUM 8 |
137 | #define SFI_MRTC_MAX 8 | 163 | #define SFI_MRTC_MAX 8 |
138 | 164 | ||
139 | extern void intel_scu_devices_create(void); | 165 | extern void intel_scu_devices_create(void); |
140 | extern void intel_scu_devices_destroy(void); | 166 | extern void intel_scu_devices_destroy(void); |
141 | 167 | ||
142 | /* VRTC timer */ | 168 | /* VRTC timer */ |
143 | #define MRST_VRTC_MAP_SZ (1024) | 169 | #define MRST_VRTC_MAP_SZ 1024 |
144 | /*#define MRST_VRTC_PGOFFSET (0xc00) */ | 170 | /* #define MRST_VRTC_PGOFFSET 0xc00 */ |
145 | 171 | ||
146 | extern void intel_mid_rtc_init(void); | 172 | extern void intel_mid_rtc_init(void); |
147 | 173 | ||
148 | /* the offset for the mapping of global gpio pin to irq */ | 174 | /* The offset for the mapping of global gpio pin to irq */ |
149 | #define INTEL_MID_IRQ_OFFSET 0x100 | 175 | #define INTEL_MID_IRQ_OFFSET 0x100 |
150 | 176 | ||
151 | #endif /* _ASM_X86_INTEL_MID_H */ | 177 | #endif /* _ASM_X86_INTEL_MID_H */ |
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index e346572841a0..43e87a3dd95c 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -25,16 +25,6 @@ | |||
25 | #ifndef _ASM_X86_TOPOLOGY_H | 25 | #ifndef _ASM_X86_TOPOLOGY_H |
26 | #define _ASM_X86_TOPOLOGY_H | 26 | #define _ASM_X86_TOPOLOGY_H |
27 | 27 | ||
28 | #ifdef CONFIG_X86_32 | ||
29 | # ifdef CONFIG_SMP | ||
30 | # define ENABLE_TOPO_DEFINES | ||
31 | # endif | ||
32 | #else | ||
33 | # ifdef CONFIG_SMP | ||
34 | # define ENABLE_TOPO_DEFINES | ||
35 | # endif | ||
36 | #endif | ||
37 | |||
38 | /* | 28 | /* |
39 | * to preserve the visibility of NUMA_NO_NODE definition, | 29 | * to preserve the visibility of NUMA_NO_NODE definition, |
40 | * moved to there from here. May be used independent of | 30 | * moved to there from here. May be used independent of |
@@ -123,7 +113,7 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu); | |||
123 | #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) | 113 | #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) |
124 | #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) | 114 | #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) |
125 | 115 | ||
126 | #ifdef ENABLE_TOPO_DEFINES | 116 | #ifdef CONFIG_SMP |
127 | #define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu)) | 117 | #define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu)) |
128 | #define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu)) | 118 | #define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu)) |
129 | 119 | ||
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 6e2ffbebbcdb..c1a89bc026ac 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -300,15 +300,14 @@ static void intel_workarounds(struct cpuinfo_x86 *c) | |||
300 | } | 300 | } |
301 | 301 | ||
302 | /* | 302 | /* |
303 | * P4 Xeon errata 037 workaround. | 303 | * P4 Xeon erratum 037 workaround. |
304 | * Hardware prefetcher may cause stale data to be loaded into the cache. | 304 | * Hardware prefetcher may cause stale data to be loaded into the cache. |
305 | */ | 305 | */ |
306 | if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) { | 306 | if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) { |
307 | if (msr_set_bit(MSR_IA32_MISC_ENABLE, | 307 | if (msr_set_bit(MSR_IA32_MISC_ENABLE, |
308 | MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE_BIT) | 308 | MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE_BIT) > 0) { |
309 | > 0) { | ||
310 | pr_info("CPU: C0 stepping P4 Xeon detected.\n"); | 309 | pr_info("CPU: C0 stepping P4 Xeon detected.\n"); |
311 | pr_info("CPU: Disabling hardware prefetching (Errata 037)\n"); | 310 | pr_info("CPU: Disabling hardware prefetching (Erratum 037)\n"); |
312 | } | 311 | } |
313 | } | 312 | } |
314 | 313 | ||
diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c index 8b93e634af84..5a18aedcb341 100644 --- a/arch/x86/pci/intel_mid_pci.c +++ b/arch/x86/pci/intel_mid_pci.c | |||
@@ -36,7 +36,8 @@ | |||
36 | #define PCIE_CAP_OFFSET 0x100 | 36 | #define PCIE_CAP_OFFSET 0x100 |
37 | 37 | ||
38 | /* Quirks for the listed devices */ | 38 | /* Quirks for the listed devices */ |
39 | #define PCI_DEVICE_ID_INTEL_MRFL_MMC 0x1190 | 39 | #define PCI_DEVICE_ID_INTEL_MRFLD_MMC 0x1190 |
40 | #define PCI_DEVICE_ID_INTEL_MRFLD_HSU 0x1191 | ||
40 | 41 | ||
41 | /* Fixed BAR fields */ | 42 | /* Fixed BAR fields */ |
42 | #define PCIE_VNDR_CAP_ID_FIXED_BAR 0x00 /* Fixed BAR (TBD) */ | 43 | #define PCIE_VNDR_CAP_ID_FIXED_BAR 0x00 /* Fixed BAR (TBD) */ |
@@ -225,13 +226,20 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev) | |||
225 | /* Special treatment for IRQ0 */ | 226 | /* Special treatment for IRQ0 */ |
226 | if (dev->irq == 0) { | 227 | if (dev->irq == 0) { |
227 | /* | 228 | /* |
229 | * Skip HS UART common registers device since it has | ||
230 | * IRQ0 assigned and not used by the kernel. | ||
231 | */ | ||
232 | if (dev->device == PCI_DEVICE_ID_INTEL_MRFLD_HSU) | ||
233 | return -EBUSY; | ||
234 | /* | ||
228 | * TNG has IRQ0 assigned to eMMC controller. But there | 235 | * TNG has IRQ0 assigned to eMMC controller. But there |
229 | * are also other devices with bogus PCI configuration | 236 | * are also other devices with bogus PCI configuration |
230 | * that have IRQ0 assigned. This check ensures that | 237 | * that have IRQ0 assigned. This check ensures that |
231 | * eMMC gets it. | 238 | * eMMC gets it. The rest of devices still could be |
239 | * enabled without interrupt line being allocated. | ||
232 | */ | 240 | */ |
233 | if (dev->device != PCI_DEVICE_ID_INTEL_MRFL_MMC) | 241 | if (dev->device != PCI_DEVICE_ID_INTEL_MRFLD_MMC) |
234 | return -EBUSY; | 242 | return 0; |
235 | } | 243 | } |
236 | break; | 244 | break; |
237 | default: | 245 | default: |
@@ -308,14 +316,39 @@ static void pci_d3delay_fixup(struct pci_dev *dev) | |||
308 | } | 316 | } |
309 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup); | 317 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup); |
310 | 318 | ||
311 | static void mrst_power_off_unused_dev(struct pci_dev *dev) | 319 | static void mid_power_off_one_device(struct pci_dev *dev) |
312 | { | 320 | { |
321 | u16 pmcsr; | ||
322 | |||
323 | /* | ||
324 | * Update current state first, otherwise PCI core enforces PCI_D0 in | ||
325 | * pci_set_power_state() for devices which status was PCI_UNKNOWN. | ||
326 | */ | ||
327 | pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr); | ||
328 | dev->current_state = (pci_power_t __force)(pmcsr & PCI_PM_CTRL_STATE_MASK); | ||
329 | |||
313 | pci_set_power_state(dev, PCI_D3hot); | 330 | pci_set_power_state(dev, PCI_D3hot); |
314 | } | 331 | } |
315 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0801, mrst_power_off_unused_dev); | 332 | |
316 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0809, mrst_power_off_unused_dev); | 333 | static void mid_power_off_devices(struct pci_dev *dev) |
317 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x080C, mrst_power_off_unused_dev); | 334 | { |
318 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0815, mrst_power_off_unused_dev); | 335 | int id; |
336 | |||
337 | if (!pci_soc_mode) | ||
338 | return; | ||
339 | |||
340 | id = intel_mid_pwr_get_lss_id(dev); | ||
341 | if (id < 0) | ||
342 | return; | ||
343 | |||
344 | /* | ||
345 | * This sets only PMCSR bits. The actual power off will happen in | ||
346 | * arch/x86/platform/intel-mid/pwr.c. | ||
347 | */ | ||
348 | mid_power_off_one_device(dev); | ||
349 | } | ||
350 | |||
351 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, mid_power_off_devices); | ||
319 | 352 | ||
320 | /* | 353 | /* |
321 | * Langwell devices reside at fixed offsets, don't try to move them. | 354 | * Langwell devices reside at fixed offsets, don't try to move them. |
diff --git a/arch/x86/platform/atom/punit_atom_debug.c b/arch/x86/platform/atom/punit_atom_debug.c index 81c769e80614..8ff7b9355416 100644 --- a/arch/x86/platform/atom/punit_atom_debug.c +++ b/arch/x86/platform/atom/punit_atom_debug.c | |||
@@ -23,10 +23,9 @@ | |||
23 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <asm/cpu_device_id.h> | 25 | #include <asm/cpu_device_id.h> |
26 | #include <asm/intel-family.h> | ||
26 | #include <asm/iosf_mbi.h> | 27 | #include <asm/iosf_mbi.h> |
27 | 28 | ||
28 | /* Power gate status reg */ | ||
29 | #define PWRGT_STATUS 0x61 | ||
30 | /* Subsystem config/status Video processor */ | 29 | /* Subsystem config/status Video processor */ |
31 | #define VED_SS_PM0 0x32 | 30 | #define VED_SS_PM0 0x32 |
32 | /* Subsystem config/status ISP (Image Signal Processor) */ | 31 | /* Subsystem config/status ISP (Image Signal Processor) */ |
@@ -35,12 +34,16 @@ | |||
35 | #define MIO_SS_PM 0x3B | 34 | #define MIO_SS_PM 0x3B |
36 | /* Shift bits for getting status for video, isp and i/o */ | 35 | /* Shift bits for getting status for video, isp and i/o */ |
37 | #define SSS_SHIFT 24 | 36 | #define SSS_SHIFT 24 |
37 | |||
38 | /* Power gate status reg */ | ||
39 | #define PWRGT_STATUS 0x61 | ||
38 | /* Shift bits for getting status for graphics rendering */ | 40 | /* Shift bits for getting status for graphics rendering */ |
39 | #define RENDER_POS 0 | 41 | #define RENDER_POS 0 |
40 | /* Shift bits for getting status for media control */ | 42 | /* Shift bits for getting status for media control */ |
41 | #define MEDIA_POS 2 | 43 | #define MEDIA_POS 2 |
42 | /* Shift bits for getting status for Valley View/Baytrail display */ | 44 | /* Shift bits for getting status for Valley View/Baytrail display */ |
43 | #define VLV_DISPLAY_POS 6 | 45 | #define VLV_DISPLAY_POS 6 |
46 | |||
44 | /* Subsystem config/status display for Cherry Trail SOC */ | 47 | /* Subsystem config/status display for Cherry Trail SOC */ |
45 | #define CHT_DSP_SSS 0x36 | 48 | #define CHT_DSP_SSS 0x36 |
46 | /* Shift bits for getting status for display */ | 49 | /* Shift bits for getting status for display */ |
@@ -52,6 +55,14 @@ struct punit_device { | |||
52 | int sss_pos; | 55 | int sss_pos; |
53 | }; | 56 | }; |
54 | 57 | ||
58 | static const struct punit_device punit_device_tng[] = { | ||
59 | { "DISPLAY", CHT_DSP_SSS, SSS_SHIFT }, | ||
60 | { "VED", VED_SS_PM0, SSS_SHIFT }, | ||
61 | { "ISP", ISP_SS_PM0, SSS_SHIFT }, | ||
62 | { "MIO", MIO_SS_PM, SSS_SHIFT }, | ||
63 | { NULL } | ||
64 | }; | ||
65 | |||
55 | static const struct punit_device punit_device_byt[] = { | 66 | static const struct punit_device punit_device_byt[] = { |
56 | { "GFX RENDER", PWRGT_STATUS, RENDER_POS }, | 67 | { "GFX RENDER", PWRGT_STATUS, RENDER_POS }, |
57 | { "GFX MEDIA", PWRGT_STATUS, MEDIA_POS }, | 68 | { "GFX MEDIA", PWRGT_STATUS, MEDIA_POS }, |
@@ -143,8 +154,9 @@ static void punit_dbgfs_unregister(void) | |||
143 | (kernel_ulong_t)&drv_data } | 154 | (kernel_ulong_t)&drv_data } |
144 | 155 | ||
145 | static const struct x86_cpu_id intel_punit_cpu_ids[] = { | 156 | static const struct x86_cpu_id intel_punit_cpu_ids[] = { |
146 | ICPU(55, punit_device_byt), /* Valleyview, Bay Trail */ | 157 | ICPU(INTEL_FAM6_ATOM_SILVERMONT1, punit_device_byt), |
147 | ICPU(76, punit_device_cht), /* Braswell, Cherry Trail */ | 158 | ICPU(INTEL_FAM6_ATOM_MERRIFIELD1, punit_device_tng), |
159 | ICPU(INTEL_FAM6_ATOM_AIRMONT, punit_device_cht), | ||
148 | {} | 160 | {} |
149 | }; | 161 | }; |
150 | 162 | ||
diff --git a/arch/x86/platform/intel-mid/Makefile b/arch/x86/platform/intel-mid/Makefile index 0ce1b1913673..fa021dfab088 100644 --- a/arch/x86/platform/intel-mid/Makefile +++ b/arch/x86/platform/intel-mid/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-$(CONFIG_X86_INTEL_MID) += intel-mid.o intel_mid_vrtc.o mfld.o mrfl.o | 1 | obj-$(CONFIG_X86_INTEL_MID) += intel-mid.o intel_mid_vrtc.o mfld.o mrfld.o pwr.o |
2 | 2 | ||
3 | # SFI specific code | 3 | # SFI specific code |
4 | ifdef CONFIG_X86_INTEL_MID | 4 | ifdef CONFIG_X86_INTEL_MID |
diff --git a/arch/x86/platform/intel-mid/device_libs/Makefile b/arch/x86/platform/intel-mid/device_libs/Makefile index 91ec9f8704bf..fc135bf70511 100644 --- a/arch/x86/platform/intel-mid/device_libs/Makefile +++ b/arch/x86/platform/intel-mid/device_libs/Makefile | |||
@@ -1,3 +1,5 @@ | |||
1 | # Family-Level Interface Shim (FLIS) | ||
2 | obj-$(subst m,y,$(CONFIG_PINCTRL_MERRIFIELD)) += platform_mrfld_pinctrl.o | ||
1 | # IPC Devices | 3 | # IPC Devices |
2 | obj-y += platform_ipc.o | 4 | obj-y += platform_ipc.o |
3 | obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic.o | 5 | obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic.o |
@@ -8,14 +10,18 @@ obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic_battery.o | |||
8 | obj-$(subst m,y,$(CONFIG_INTEL_MID_POWER_BUTTON)) += platform_msic_power_btn.o | 10 | obj-$(subst m,y,$(CONFIG_INTEL_MID_POWER_BUTTON)) += platform_msic_power_btn.o |
9 | obj-$(subst m,y,$(CONFIG_GPIO_INTEL_PMIC)) += platform_pmic_gpio.o | 11 | obj-$(subst m,y,$(CONFIG_GPIO_INTEL_PMIC)) += platform_pmic_gpio.o |
10 | obj-$(subst m,y,$(CONFIG_INTEL_MFLD_THERMAL)) += platform_msic_thermal.o | 12 | obj-$(subst m,y,$(CONFIG_INTEL_MFLD_THERMAL)) += platform_msic_thermal.o |
13 | # SPI Devices | ||
14 | obj-$(subst m,y,$(CONFIG_SPI_SPIDEV)) += platform_spidev.o | ||
11 | # I2C Devices | 15 | # I2C Devices |
12 | obj-$(subst m,y,$(CONFIG_SENSORS_EMC1403)) += platform_emc1403.o | 16 | obj-$(subst m,y,$(CONFIG_SENSORS_EMC1403)) += platform_emc1403.o |
13 | obj-$(subst m,y,$(CONFIG_SENSORS_LIS3LV02D)) += platform_lis331.o | 17 | obj-$(subst m,y,$(CONFIG_SENSORS_LIS3LV02D)) += platform_lis331.o |
14 | obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_max7315.o | ||
15 | obj-$(subst m,y,$(CONFIG_INPUT_MPU3050)) += platform_mpu3050.o | 18 | obj-$(subst m,y,$(CONFIG_INPUT_MPU3050)) += platform_mpu3050.o |
16 | obj-$(subst m,y,$(CONFIG_INPUT_BMA150)) += platform_bma023.o | 19 | obj-$(subst m,y,$(CONFIG_INPUT_BMA150)) += platform_bma023.o |
17 | obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_tca6416.o | ||
18 | obj-$(subst m,y,$(CONFIG_DRM_MEDFIELD)) += platform_tc35876x.o | 20 | obj-$(subst m,y,$(CONFIG_DRM_MEDFIELD)) += platform_tc35876x.o |
21 | # I2C GPIO Expanders | ||
22 | obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_max7315.o | ||
23 | obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_pcal9555a.o | ||
24 | obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_tca6416.o | ||
19 | # MISC Devices | 25 | # MISC Devices |
20 | obj-$(subst m,y,$(CONFIG_KEYBOARD_GPIO)) += platform_gpio_keys.o | 26 | obj-$(subst m,y,$(CONFIG_KEYBOARD_GPIO)) += platform_gpio_keys.o |
21 | obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_wdt.o | 27 | obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_wdt.o |
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c new file mode 100644 index 000000000000..4de8a664e6a1 --- /dev/null +++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_pinctrl.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Intel Merrifield FLIS platform device initialization file | ||
3 | * | ||
4 | * Copyright (C) 2016, Intel Corporation | ||
5 | * | ||
6 | * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; version 2 | ||
11 | * of the License. | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/ioport.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | #include <asm/intel-mid.h> | ||
19 | |||
20 | #define FLIS_BASE_ADDR 0xff0c0000 | ||
21 | #define FLIS_LENGTH 0x8000 | ||
22 | |||
23 | static struct resource mrfld_pinctrl_mmio_resource = { | ||
24 | .start = FLIS_BASE_ADDR, | ||
25 | .end = FLIS_BASE_ADDR + FLIS_LENGTH - 1, | ||
26 | .flags = IORESOURCE_MEM, | ||
27 | }; | ||
28 | |||
29 | static struct platform_device mrfld_pinctrl_device = { | ||
30 | .name = "pinctrl-merrifield", | ||
31 | .id = PLATFORM_DEVID_NONE, | ||
32 | .resource = &mrfld_pinctrl_mmio_resource, | ||
33 | .num_resources = 1, | ||
34 | }; | ||
35 | |||
36 | static int __init mrfld_pinctrl_init(void) | ||
37 | { | ||
38 | if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER) | ||
39 | return platform_device_register(&mrfld_pinctrl_device); | ||
40 | |||
41 | return -ENODEV; | ||
42 | } | ||
43 | arch_initcall(mrfld_pinctrl_init); | ||
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c b/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c new file mode 100644 index 000000000000..429a94192671 --- /dev/null +++ b/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * PCAL9555a platform data initilization file | ||
3 | * | ||
4 | * Copyright (C) 2016, Intel Corporation | ||
5 | * | ||
6 | * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
7 | * Dan O'Donovan <dan@emutex.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; version 2 | ||
12 | * of the License. | ||
13 | */ | ||
14 | |||
15 | #include <linux/gpio.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/i2c.h> | ||
18 | #include <linux/platform_data/pca953x.h> | ||
19 | #include <linux/sfi.h> | ||
20 | |||
21 | #include <asm/intel-mid.h> | ||
22 | |||
23 | #define PCAL9555A_NUM 4 | ||
24 | |||
25 | static struct pca953x_platform_data pcal9555a_pdata[PCAL9555A_NUM]; | ||
26 | static int nr; | ||
27 | |||
28 | static void __init *pcal9555a_platform_data(void *info) | ||
29 | { | ||
30 | struct i2c_board_info *i2c_info = info; | ||
31 | char *type = i2c_info->type; | ||
32 | struct pca953x_platform_data *pcal9555a; | ||
33 | char base_pin_name[SFI_NAME_LEN + 1]; | ||
34 | char intr_pin_name[SFI_NAME_LEN + 1]; | ||
35 | int gpio_base, intr; | ||
36 | |||
37 | snprintf(base_pin_name, sizeof(base_pin_name), "%s_base", type); | ||
38 | snprintf(intr_pin_name, sizeof(intr_pin_name), "%s_int", type); | ||
39 | |||
40 | gpio_base = get_gpio_by_name(base_pin_name); | ||
41 | intr = get_gpio_by_name(intr_pin_name); | ||
42 | |||
43 | /* Check if the SFI record valid */ | ||
44 | if (gpio_base == -1) | ||
45 | return NULL; | ||
46 | |||
47 | if (nr >= PCAL9555A_NUM) { | ||
48 | pr_err("%s: Too many instances, only %d supported\n", __func__, | ||
49 | PCAL9555A_NUM); | ||
50 | return NULL; | ||
51 | } | ||
52 | |||
53 | pcal9555a = &pcal9555a_pdata[nr++]; | ||
54 | pcal9555a->gpio_base = gpio_base; | ||
55 | |||
56 | if (intr >= 0) { | ||
57 | i2c_info->irq = intr + INTEL_MID_IRQ_OFFSET; | ||
58 | pcal9555a->irq_base = gpio_base + INTEL_MID_IRQ_OFFSET; | ||
59 | } else { | ||
60 | i2c_info->irq = -1; | ||
61 | pcal9555a->irq_base = -1; | ||
62 | } | ||
63 | |||
64 | strcpy(type, "pcal9555a"); | ||
65 | return pcal9555a; | ||
66 | } | ||
67 | |||
68 | static const struct devs_id pcal9555a_1_dev_id __initconst = { | ||
69 | .name = "pcal9555a-1", | ||
70 | .type = SFI_DEV_TYPE_I2C, | ||
71 | .delay = 1, | ||
72 | .get_platform_data = &pcal9555a_platform_data, | ||
73 | }; | ||
74 | |||
75 | static const struct devs_id pcal9555a_2_dev_id __initconst = { | ||
76 | .name = "pcal9555a-2", | ||
77 | .type = SFI_DEV_TYPE_I2C, | ||
78 | .delay = 1, | ||
79 | .get_platform_data = &pcal9555a_platform_data, | ||
80 | }; | ||
81 | |||
82 | static const struct devs_id pcal9555a_3_dev_id __initconst = { | ||
83 | .name = "pcal9555a-3", | ||
84 | .type = SFI_DEV_TYPE_I2C, | ||
85 | .delay = 1, | ||
86 | .get_platform_data = &pcal9555a_platform_data, | ||
87 | }; | ||
88 | |||
89 | static const struct devs_id pcal9555a_4_dev_id __initconst = { | ||
90 | .name = "pcal9555a-4", | ||
91 | .type = SFI_DEV_TYPE_I2C, | ||
92 | .delay = 1, | ||
93 | .get_platform_data = &pcal9555a_platform_data, | ||
94 | }; | ||
95 | |||
96 | sfi_device(pcal9555a_1_dev_id); | ||
97 | sfi_device(pcal9555a_2_dev_id); | ||
98 | sfi_device(pcal9555a_3_dev_id); | ||
99 | sfi_device(pcal9555a_4_dev_id); | ||
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_spidev.c b/arch/x86/platform/intel-mid/device_libs/platform_spidev.c new file mode 100644 index 000000000000..30c601b399ee --- /dev/null +++ b/arch/x86/platform/intel-mid/device_libs/platform_spidev.c | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * spidev platform data initilization file | ||
3 | * | ||
4 | * (C) Copyright 2014, 2016 Intel Corporation | ||
5 | * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
6 | * Dan O'Donovan <dan@emutex.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; version 2 | ||
11 | * of the License. | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/sfi.h> | ||
16 | #include <linux/spi/pxa2xx_spi.h> | ||
17 | #include <linux/spi/spi.h> | ||
18 | |||
19 | #include <asm/intel-mid.h> | ||
20 | |||
21 | #define MRFLD_SPI_DEFAULT_DMA_BURST 8 | ||
22 | #define MRFLD_SPI_DEFAULT_TIMEOUT 500 | ||
23 | |||
24 | /* GPIO pin for spidev chipselect */ | ||
25 | #define MRFLD_SPIDEV_GPIO_CS 111 | ||
26 | |||
27 | static struct pxa2xx_spi_chip spidev_spi_chip = { | ||
28 | .dma_burst_size = MRFLD_SPI_DEFAULT_DMA_BURST, | ||
29 | .timeout = MRFLD_SPI_DEFAULT_TIMEOUT, | ||
30 | .gpio_cs = MRFLD_SPIDEV_GPIO_CS, | ||
31 | }; | ||
32 | |||
33 | static void __init *spidev_platform_data(void *info) | ||
34 | { | ||
35 | struct spi_board_info *spi_info = info; | ||
36 | |||
37 | spi_info->mode = SPI_MODE_0; | ||
38 | spi_info->controller_data = &spidev_spi_chip; | ||
39 | |||
40 | return NULL; | ||
41 | } | ||
42 | |||
43 | static const struct devs_id spidev_dev_id __initconst = { | ||
44 | .name = "spidev", | ||
45 | .type = SFI_DEV_TYPE_SPI, | ||
46 | .delay = 0, | ||
47 | .get_platform_data = &spidev_platform_data, | ||
48 | }; | ||
49 | |||
50 | sfi_device(spidev_dev_id); | ||
diff --git a/arch/x86/platform/intel-mid/intel-mid.c b/arch/x86/platform/intel-mid/intel-mid.c index 90bb997ed0a2..abbf49c6e9d3 100644 --- a/arch/x86/platform/intel-mid/intel-mid.c +++ b/arch/x86/platform/intel-mid/intel-mid.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/regulator/machine.h> | ||
19 | #include <linux/scatterlist.h> | 20 | #include <linux/scatterlist.h> |
20 | #include <linux/sfi.h> | 21 | #include <linux/sfi.h> |
21 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
@@ -144,6 +145,15 @@ static void intel_mid_arch_setup(void) | |||
144 | out: | 145 | out: |
145 | if (intel_mid_ops->arch_setup) | 146 | if (intel_mid_ops->arch_setup) |
146 | intel_mid_ops->arch_setup(); | 147 | intel_mid_ops->arch_setup(); |
148 | |||
149 | /* | ||
150 | * Intel MID platforms are using explicitly defined regulators. | ||
151 | * | ||
152 | * Let the regulator core know that we do not have any additional | ||
153 | * regulators left. This lets it substitute unprovided regulators with | ||
154 | * dummy ones: | ||
155 | */ | ||
156 | regulator_has_full_constraints(); | ||
147 | } | 157 | } |
148 | 158 | ||
149 | /* MID systems don't have i8042 controller */ | 159 | /* MID systems don't have i8042 controller */ |
diff --git a/arch/x86/platform/intel-mid/mrfl.c b/arch/x86/platform/intel-mid/mrfld.c index bd1adc621781..59253db41bbc 100644 --- a/arch/x86/platform/intel-mid/mrfl.c +++ b/arch/x86/platform/intel-mid/mrfld.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * mrfl.c: Intel Merrifield platform specific setup code | 2 | * Intel Merrifield platform specific setup code |
3 | * | 3 | * |
4 | * (C) Copyright 2013 Intel Corporation | 4 | * (C) Copyright 2013 Intel Corporation |
5 | * | 5 | * |
diff --git a/arch/x86/platform/intel-mid/pwr.c b/arch/x86/platform/intel-mid/pwr.c new file mode 100644 index 000000000000..5bc90dd102d4 --- /dev/null +++ b/arch/x86/platform/intel-mid/pwr.c | |||
@@ -0,0 +1,418 @@ | |||
1 | /* | ||
2 | * Intel MID Power Management Unit (PWRMU) device driver | ||
3 | * | ||
4 | * Copyright (C) 2016, Intel Corporation | ||
5 | * | ||
6 | * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | * | ||
12 | * Intel MID Power Management Unit device driver handles the South Complex PCI | ||
13 | * devices such as GPDMA, SPI, I2C, PWM, and so on. By default PCI core | ||
14 | * modifies bits in PMCSR register in the PCI configuration space. This is not | ||
15 | * enough on some SoCs like Intel Tangier. In such case PCI core sets a new | ||
16 | * power state of the device in question through a PM hook registered in struct | ||
17 | * pci_platform_pm_ops (see drivers/pci/pci-mid.c). | ||
18 | */ | ||
19 | |||
20 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
21 | |||
22 | #include <linux/delay.h> | ||
23 | #include <linux/errno.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/interrupt.h> | ||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/mutex.h> | ||
29 | #include <linux/pci.h> | ||
30 | |||
31 | #include <asm/intel-mid.h> | ||
32 | |||
33 | /* Registers */ | ||
34 | #define PM_STS 0x00 | ||
35 | #define PM_CMD 0x04 | ||
36 | #define PM_ICS 0x08 | ||
37 | #define PM_WKC(x) (0x10 + (x) * 4) | ||
38 | #define PM_WKS(x) (0x18 + (x) * 4) | ||
39 | #define PM_SSC(x) (0x20 + (x) * 4) | ||
40 | #define PM_SSS(x) (0x30 + (x) * 4) | ||
41 | |||
42 | /* Bits in PM_STS */ | ||
43 | #define PM_STS_BUSY (1 << 8) | ||
44 | |||
45 | /* Bits in PM_CMD */ | ||
46 | #define PM_CMD_CMD(x) ((x) << 0) | ||
47 | #define PM_CMD_IOC (1 << 8) | ||
48 | #define PM_CMD_D3cold (1 << 21) | ||
49 | |||
50 | /* List of commands */ | ||
51 | #define CMD_SET_CFG 0x01 | ||
52 | |||
53 | /* Bits in PM_ICS */ | ||
54 | #define PM_ICS_INT_STATUS(x) ((x) & 0xff) | ||
55 | #define PM_ICS_IE (1 << 8) | ||
56 | #define PM_ICS_IP (1 << 9) | ||
57 | #define PM_ICS_SW_INT_STS (1 << 10) | ||
58 | |||
59 | /* List of interrupts */ | ||
60 | #define INT_INVALID 0 | ||
61 | #define INT_CMD_COMPLETE 1 | ||
62 | #define INT_CMD_ERR 2 | ||
63 | #define INT_WAKE_EVENT 3 | ||
64 | #define INT_LSS_POWER_ERR 4 | ||
65 | #define INT_S0iX_MSG_ERR 5 | ||
66 | #define INT_NO_C6 6 | ||
67 | #define INT_TRIGGER_ERR 7 | ||
68 | #define INT_INACTIVITY 8 | ||
69 | |||
70 | /* South Complex devices */ | ||
71 | #define LSS_MAX_SHARED_DEVS 4 | ||
72 | #define LSS_MAX_DEVS 64 | ||
73 | |||
74 | #define LSS_WS_BITS 1 /* wake state width */ | ||
75 | #define LSS_PWS_BITS 2 /* power state width */ | ||
76 | |||
77 | /* Supported device IDs */ | ||
78 | #define PCI_DEVICE_ID_PENWELL 0x0828 | ||
79 | #define PCI_DEVICE_ID_TANGIER 0x11a1 | ||
80 | |||
81 | struct mid_pwr_dev { | ||
82 | struct pci_dev *pdev; | ||
83 | pci_power_t state; | ||
84 | }; | ||
85 | |||
86 | struct mid_pwr { | ||
87 | struct device *dev; | ||
88 | void __iomem *regs; | ||
89 | int irq; | ||
90 | bool available; | ||
91 | |||
92 | struct mutex lock; | ||
93 | struct mid_pwr_dev lss[LSS_MAX_DEVS][LSS_MAX_SHARED_DEVS]; | ||
94 | }; | ||
95 | |||
96 | static struct mid_pwr *midpwr; | ||
97 | |||
98 | static u32 mid_pwr_get_state(struct mid_pwr *pwr, int reg) | ||
99 | { | ||
100 | return readl(pwr->regs + PM_SSS(reg)); | ||
101 | } | ||
102 | |||
103 | static void mid_pwr_set_state(struct mid_pwr *pwr, int reg, u32 value) | ||
104 | { | ||
105 | writel(value, pwr->regs + PM_SSC(reg)); | ||
106 | } | ||
107 | |||
108 | static void mid_pwr_set_wake(struct mid_pwr *pwr, int reg, u32 value) | ||
109 | { | ||
110 | writel(value, pwr->regs + PM_WKC(reg)); | ||
111 | } | ||
112 | |||
113 | static void mid_pwr_interrupt_disable(struct mid_pwr *pwr) | ||
114 | { | ||
115 | writel(~PM_ICS_IE, pwr->regs + PM_ICS); | ||
116 | } | ||
117 | |||
118 | static bool mid_pwr_is_busy(struct mid_pwr *pwr) | ||
119 | { | ||
120 | return !!(readl(pwr->regs + PM_STS) & PM_STS_BUSY); | ||
121 | } | ||
122 | |||
123 | /* Wait 500ms that the latest PWRMU command finished */ | ||
124 | static int mid_pwr_wait(struct mid_pwr *pwr) | ||
125 | { | ||
126 | unsigned int count = 500000; | ||
127 | bool busy; | ||
128 | |||
129 | do { | ||
130 | busy = mid_pwr_is_busy(pwr); | ||
131 | if (!busy) | ||
132 | return 0; | ||
133 | udelay(1); | ||
134 | } while (--count); | ||
135 | |||
136 | return -EBUSY; | ||
137 | } | ||
138 | |||
139 | static int mid_pwr_wait_for_cmd(struct mid_pwr *pwr, u8 cmd) | ||
140 | { | ||
141 | writel(PM_CMD_CMD(cmd), pwr->regs + PM_CMD); | ||
142 | return mid_pwr_wait(pwr); | ||
143 | } | ||
144 | |||
145 | static int __update_power_state(struct mid_pwr *pwr, int reg, int bit, int new) | ||
146 | { | ||
147 | int curstate; | ||
148 | u32 power; | ||
149 | int ret; | ||
150 | |||
151 | /* Check if the device is already in desired state */ | ||
152 | power = mid_pwr_get_state(pwr, reg); | ||
153 | curstate = (power >> bit) & 3; | ||
154 | if (curstate == new) | ||
155 | return 0; | ||
156 | |||
157 | /* Update the power state */ | ||
158 | mid_pwr_set_state(pwr, reg, (power & ~(3 << bit)) | (new << bit)); | ||
159 | |||
160 | /* Send command to SCU */ | ||
161 | ret = mid_pwr_wait_for_cmd(pwr, CMD_SET_CFG); | ||
162 | if (ret) | ||
163 | return ret; | ||
164 | |||
165 | /* Check if the device is already in desired state */ | ||
166 | power = mid_pwr_get_state(pwr, reg); | ||
167 | curstate = (power >> bit) & 3; | ||
168 | if (curstate != new) | ||
169 | return -EAGAIN; | ||
170 | |||
171 | return 0; | ||
172 | } | ||
173 | |||
174 | static pci_power_t __find_weakest_power_state(struct mid_pwr_dev *lss, | ||
175 | struct pci_dev *pdev, | ||
176 | pci_power_t state) | ||
177 | { | ||
178 | pci_power_t weakest = PCI_D3hot; | ||
179 | unsigned int j; | ||
180 | |||
181 | /* Find device in cache or first free cell */ | ||
182 | for (j = 0; j < LSS_MAX_SHARED_DEVS; j++) { | ||
183 | if (lss[j].pdev == pdev || !lss[j].pdev) | ||
184 | break; | ||
185 | } | ||
186 | |||
187 | /* Store the desired state in cache */ | ||
188 | if (j < LSS_MAX_SHARED_DEVS) { | ||
189 | lss[j].pdev = pdev; | ||
190 | lss[j].state = state; | ||
191 | } else { | ||
192 | dev_WARN(&pdev->dev, "No room for device in PWRMU LSS cache\n"); | ||
193 | weakest = state; | ||
194 | } | ||
195 | |||
196 | /* Find the power state we may use */ | ||
197 | for (j = 0; j < LSS_MAX_SHARED_DEVS; j++) { | ||
198 | if (lss[j].state < weakest) | ||
199 | weakest = lss[j].state; | ||
200 | } | ||
201 | |||
202 | return weakest; | ||
203 | } | ||
204 | |||
205 | static int __set_power_state(struct mid_pwr *pwr, struct pci_dev *pdev, | ||
206 | pci_power_t state, int id, int reg, int bit) | ||
207 | { | ||
208 | const char *name; | ||
209 | int ret; | ||
210 | |||
211 | state = __find_weakest_power_state(pwr->lss[id], pdev, state); | ||
212 | name = pci_power_name(state); | ||
213 | |||
214 | ret = __update_power_state(pwr, reg, bit, (__force int)state); | ||
215 | if (ret) { | ||
216 | dev_warn(&pdev->dev, "Can't set power state %s: %d\n", name, ret); | ||
217 | return ret; | ||
218 | } | ||
219 | |||
220 | dev_vdbg(&pdev->dev, "Set power state %s\n", name); | ||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | static int mid_pwr_set_power_state(struct mid_pwr *pwr, struct pci_dev *pdev, | ||
225 | pci_power_t state) | ||
226 | { | ||
227 | int id, reg, bit; | ||
228 | int ret; | ||
229 | |||
230 | id = intel_mid_pwr_get_lss_id(pdev); | ||
231 | if (id < 0) | ||
232 | return id; | ||
233 | |||
234 | reg = (id * LSS_PWS_BITS) / 32; | ||
235 | bit = (id * LSS_PWS_BITS) % 32; | ||
236 | |||
237 | /* We support states between PCI_D0 and PCI_D3hot */ | ||
238 | if (state < PCI_D0) | ||
239 | state = PCI_D0; | ||
240 | if (state > PCI_D3hot) | ||
241 | state = PCI_D3hot; | ||
242 | |||
243 | mutex_lock(&pwr->lock); | ||
244 | ret = __set_power_state(pwr, pdev, state, id, reg, bit); | ||
245 | mutex_unlock(&pwr->lock); | ||
246 | return ret; | ||
247 | } | ||
248 | |||
249 | int intel_mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state) | ||
250 | { | ||
251 | struct mid_pwr *pwr = midpwr; | ||
252 | int ret = 0; | ||
253 | |||
254 | might_sleep(); | ||
255 | |||
256 | if (pwr && pwr->available) | ||
257 | ret = mid_pwr_set_power_state(pwr, pdev, state); | ||
258 | dev_vdbg(&pdev->dev, "set_power_state() returns %d\n", ret); | ||
259 | |||
260 | return 0; | ||
261 | } | ||
262 | EXPORT_SYMBOL_GPL(intel_mid_pci_set_power_state); | ||
263 | |||
264 | int intel_mid_pwr_get_lss_id(struct pci_dev *pdev) | ||
265 | { | ||
266 | int vndr; | ||
267 | u8 id; | ||
268 | |||
269 | /* | ||
270 | * Mapping to PWRMU index is kept in the Logical SubSystem ID byte of | ||
271 | * Vendor capability. | ||
272 | */ | ||
273 | vndr = pci_find_capability(pdev, PCI_CAP_ID_VNDR); | ||
274 | if (!vndr) | ||
275 | return -EINVAL; | ||
276 | |||
277 | /* Read the Logical SubSystem ID byte */ | ||
278 | pci_read_config_byte(pdev, vndr + INTEL_MID_PWR_LSS_OFFSET, &id); | ||
279 | if (!(id & INTEL_MID_PWR_LSS_TYPE)) | ||
280 | return -ENODEV; | ||
281 | |||
282 | id &= ~INTEL_MID_PWR_LSS_TYPE; | ||
283 | if (id >= LSS_MAX_DEVS) | ||
284 | return -ERANGE; | ||
285 | |||
286 | return id; | ||
287 | } | ||
288 | |||
289 | static irqreturn_t mid_pwr_irq_handler(int irq, void *dev_id) | ||
290 | { | ||
291 | struct mid_pwr *pwr = dev_id; | ||
292 | u32 ics; | ||
293 | |||
294 | ics = readl(pwr->regs + PM_ICS); | ||
295 | if (!(ics & PM_ICS_IP)) | ||
296 | return IRQ_NONE; | ||
297 | |||
298 | writel(ics | PM_ICS_IP, pwr->regs + PM_ICS); | ||
299 | |||
300 | dev_warn(pwr->dev, "Unexpected IRQ: %#x\n", PM_ICS_INT_STATUS(ics)); | ||
301 | return IRQ_HANDLED; | ||
302 | } | ||
303 | |||
304 | struct mid_pwr_device_info { | ||
305 | int (*set_initial_state)(struct mid_pwr *pwr); | ||
306 | }; | ||
307 | |||
308 | static int mid_pwr_probe(struct pci_dev *pdev, const struct pci_device_id *id) | ||
309 | { | ||
310 | struct mid_pwr_device_info *info = (void *)id->driver_data; | ||
311 | struct device *dev = &pdev->dev; | ||
312 | struct mid_pwr *pwr; | ||
313 | int ret; | ||
314 | |||
315 | ret = pcim_enable_device(pdev); | ||
316 | if (ret < 0) { | ||
317 | dev_err(&pdev->dev, "error: could not enable device\n"); | ||
318 | return ret; | ||
319 | } | ||
320 | |||
321 | ret = pcim_iomap_regions(pdev, 1 << 0, pci_name(pdev)); | ||
322 | if (ret) { | ||
323 | dev_err(&pdev->dev, "I/O memory remapping failed\n"); | ||
324 | return ret; | ||
325 | } | ||
326 | |||
327 | pwr = devm_kzalloc(dev, sizeof(*pwr), GFP_KERNEL); | ||
328 | if (!pwr) | ||
329 | return -ENOMEM; | ||
330 | |||
331 | pwr->dev = dev; | ||
332 | pwr->regs = pcim_iomap_table(pdev)[0]; | ||
333 | pwr->irq = pdev->irq; | ||
334 | |||
335 | mutex_init(&pwr->lock); | ||
336 | |||
337 | /* Disable interrupts */ | ||
338 | mid_pwr_interrupt_disable(pwr); | ||
339 | |||
340 | if (info && info->set_initial_state) { | ||
341 | ret = info->set_initial_state(pwr); | ||
342 | if (ret) | ||
343 | dev_warn(dev, "Can't set initial state: %d\n", ret); | ||
344 | } | ||
345 | |||
346 | ret = devm_request_irq(dev, pdev->irq, mid_pwr_irq_handler, | ||
347 | IRQF_NO_SUSPEND, pci_name(pdev), pwr); | ||
348 | if (ret) | ||
349 | return ret; | ||
350 | |||
351 | pwr->available = true; | ||
352 | midpwr = pwr; | ||
353 | |||
354 | pci_set_drvdata(pdev, pwr); | ||
355 | return 0; | ||
356 | } | ||
357 | |||
358 | static int mid_set_initial_state(struct mid_pwr *pwr) | ||
359 | { | ||
360 | unsigned int i, j; | ||
361 | int ret; | ||
362 | |||
363 | /* | ||
364 | * Enable wake events. | ||
365 | * | ||
366 | * PWRMU supports up to 32 sources for wake up the system. Ungate them | ||
367 | * all here. | ||
368 | */ | ||
369 | mid_pwr_set_wake(pwr, 0, 0xffffffff); | ||
370 | mid_pwr_set_wake(pwr, 1, 0xffffffff); | ||
371 | |||
372 | /* | ||
373 | * Power off South Complex devices. | ||
374 | * | ||
375 | * There is a map (see a note below) of 64 devices with 2 bits per each | ||
376 | * on 32-bit HW registers. The following calls set all devices to one | ||
377 | * known initial state, i.e. PCI_D3hot. This is done in conjunction | ||
378 | * with PMCSR setting in arch/x86/pci/intel_mid_pci.c. | ||
379 | * | ||
380 | * NOTE: The actual device mapping is provided by a platform at run | ||
381 | * time using vendor capability of PCI configuration space. | ||
382 | */ | ||
383 | mid_pwr_set_state(pwr, 0, 0xffffffff); | ||
384 | mid_pwr_set_state(pwr, 1, 0xffffffff); | ||
385 | mid_pwr_set_state(pwr, 2, 0xffffffff); | ||
386 | mid_pwr_set_state(pwr, 3, 0xffffffff); | ||
387 | |||
388 | /* Send command to SCU */ | ||
389 | ret = mid_pwr_wait_for_cmd(pwr, CMD_SET_CFG); | ||
390 | if (ret) | ||
391 | return ret; | ||
392 | |||
393 | for (i = 0; i < LSS_MAX_DEVS; i++) { | ||
394 | for (j = 0; j < LSS_MAX_SHARED_DEVS; j++) | ||
395 | pwr->lss[i][j].state = PCI_D3hot; | ||
396 | } | ||
397 | |||
398 | return 0; | ||
399 | } | ||
400 | |||
401 | static const struct mid_pwr_device_info mid_info = { | ||
402 | .set_initial_state = mid_set_initial_state, | ||
403 | }; | ||
404 | |||
405 | static const struct pci_device_id mid_pwr_pci_ids[] = { | ||
406 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PENWELL), (kernel_ulong_t)&mid_info }, | ||
407 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_TANGIER), (kernel_ulong_t)&mid_info }, | ||
408 | {} | ||
409 | }; | ||
410 | MODULE_DEVICE_TABLE(pci, mid_pwr_pci_ids); | ||
411 | |||
412 | static struct pci_driver mid_pwr_pci_driver = { | ||
413 | .name = "intel_mid_pwr", | ||
414 | .probe = mid_pwr_probe, | ||
415 | .id_table = mid_pwr_pci_ids, | ||
416 | }; | ||
417 | |||
418 | builtin_pci_driver(mid_pwr_pci_driver); | ||
diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c index 5ee360a951ce..1555672d436f 100644 --- a/arch/x86/platform/intel-mid/sfi.c +++ b/arch/x86/platform/intel-mid/sfi.c | |||
@@ -407,6 +407,32 @@ static void __init sfi_handle_i2c_dev(struct sfi_device_table_entry *pentry, | |||
407 | i2c_register_board_info(pentry->host_num, &i2c_info, 1); | 407 | i2c_register_board_info(pentry->host_num, &i2c_info, 1); |
408 | } | 408 | } |
409 | 409 | ||
410 | static void __init sfi_handle_sd_dev(struct sfi_device_table_entry *pentry, | ||
411 | struct devs_id *dev) | ||
412 | { | ||
413 | struct mid_sd_board_info sd_info; | ||
414 | void *pdata; | ||
415 | |||
416 | memset(&sd_info, 0, sizeof(sd_info)); | ||
417 | strncpy(sd_info.name, pentry->name, SFI_NAME_LEN); | ||
418 | sd_info.bus_num = pentry->host_num; | ||
419 | sd_info.max_clk = pentry->max_freq; | ||
420 | sd_info.addr = pentry->addr; | ||
421 | pr_debug("SD bus = %d, name = %16.16s, max_clk = %d, addr = 0x%x\n", | ||
422 | sd_info.bus_num, | ||
423 | sd_info.name, | ||
424 | sd_info.max_clk, | ||
425 | sd_info.addr); | ||
426 | pdata = intel_mid_sfi_get_pdata(dev, &sd_info); | ||
427 | if (IS_ERR(pdata)) | ||
428 | return; | ||
429 | |||
430 | /* Nothing we can do with this for now */ | ||
431 | sd_info.platform_data = pdata; | ||
432 | |||
433 | pr_debug("Successfully registered %16.16s", sd_info.name); | ||
434 | } | ||
435 | |||
410 | extern struct devs_id *const __x86_intel_mid_dev_start[], | 436 | extern struct devs_id *const __x86_intel_mid_dev_start[], |
411 | *const __x86_intel_mid_dev_end[]; | 437 | *const __x86_intel_mid_dev_end[]; |
412 | 438 | ||
@@ -490,6 +516,9 @@ static int __init sfi_parse_devs(struct sfi_table_header *table) | |||
490 | case SFI_DEV_TYPE_I2C: | 516 | case SFI_DEV_TYPE_I2C: |
491 | sfi_handle_i2c_dev(pentry, dev); | 517 | sfi_handle_i2c_dev(pentry, dev); |
492 | break; | 518 | break; |
519 | case SFI_DEV_TYPE_SD: | ||
520 | sfi_handle_sd_dev(pentry, dev); | ||
521 | break; | ||
493 | case SFI_DEV_TYPE_UART: | 522 | case SFI_DEV_TYPE_UART: |
494 | case SFI_DEV_TYPE_HSI: | 523 | case SFI_DEV_TYPE_HSI: |
495 | default: | 524 | default: |
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 0872d5fecb82..357a0b8f860b 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c | |||
@@ -29,6 +29,7 @@ ACPI_MODULE_NAME("acpi_lpss"); | |||
29 | #ifdef CONFIG_X86_INTEL_LPSS | 29 | #ifdef CONFIG_X86_INTEL_LPSS |
30 | 30 | ||
31 | #include <asm/cpu_device_id.h> | 31 | #include <asm/cpu_device_id.h> |
32 | #include <asm/intel-family.h> | ||
32 | #include <asm/iosf_mbi.h> | 33 | #include <asm/iosf_mbi.h> |
33 | #include <asm/pmc_atom.h> | 34 | #include <asm/pmc_atom.h> |
34 | 35 | ||
@@ -229,8 +230,8 @@ static const struct lpss_device_desc bsw_spi_dev_desc = { | |||
229 | #define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, } | 230 | #define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, } |
230 | 231 | ||
231 | static const struct x86_cpu_id lpss_cpu_ids[] = { | 232 | static const struct x86_cpu_id lpss_cpu_ids[] = { |
232 | ICPU(0x37), /* Valleyview, Bay Trail */ | 233 | ICPU(INTEL_FAM6_ATOM_SILVERMONT1), /* Valleyview, Bay Trail */ |
233 | ICPU(0x4c), /* Braswell, Cherry Trail */ | 234 | ICPU(INTEL_FAM6_ATOM_AIRMONT), /* Braswell, Cherry Trail */ |
234 | {} | 235 | {} |
235 | }; | 236 | }; |
236 | 237 | ||
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 1fa1a32928d7..28690b284846 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/msr.h> | 35 | #include <asm/msr.h> |
36 | #include <asm/cpu_device_id.h> | 36 | #include <asm/cpu_device_id.h> |
37 | #include <asm/cpufeature.h> | 37 | #include <asm/cpufeature.h> |
38 | #include <asm/intel-family.h> | ||
38 | 39 | ||
39 | #define ATOM_RATIOS 0x66a | 40 | #define ATOM_RATIOS 0x66a |
40 | #define ATOM_VIDS 0x66b | 41 | #define ATOM_VIDS 0x66b |
@@ -1334,29 +1335,29 @@ static void intel_pstate_update_util(struct update_util_data *data, u64 time, | |||
1334 | (unsigned long)&policy } | 1335 | (unsigned long)&policy } |
1335 | 1336 | ||
1336 | static const struct x86_cpu_id intel_pstate_cpu_ids[] = { | 1337 | static const struct x86_cpu_id intel_pstate_cpu_ids[] = { |
1337 | ICPU(0x2a, core_params), | 1338 | ICPU(INTEL_FAM6_SANDYBRIDGE, core_params), |
1338 | ICPU(0x2d, core_params), | 1339 | ICPU(INTEL_FAM6_SANDYBRIDGE_X, core_params), |
1339 | ICPU(0x37, silvermont_params), | 1340 | ICPU(INTEL_FAM6_ATOM_SILVERMONT1, silvermont_params), |
1340 | ICPU(0x3a, core_params), | 1341 | ICPU(INTEL_FAM6_IVYBRIDGE, core_params), |
1341 | ICPU(0x3c, core_params), | 1342 | ICPU(INTEL_FAM6_HASWELL_CORE, core_params), |
1342 | ICPU(0x3d, core_params), | 1343 | ICPU(INTEL_FAM6_BROADWELL_CORE, core_params), |
1343 | ICPU(0x3e, core_params), | 1344 | ICPU(INTEL_FAM6_IVYBRIDGE_X, core_params), |
1344 | ICPU(0x3f, core_params), | 1345 | ICPU(INTEL_FAM6_HASWELL_X, core_params), |
1345 | ICPU(0x45, core_params), | 1346 | ICPU(INTEL_FAM6_HASWELL_ULT, core_params), |
1346 | ICPU(0x46, core_params), | 1347 | ICPU(INTEL_FAM6_HASWELL_GT3E, core_params), |
1347 | ICPU(0x47, core_params), | 1348 | ICPU(INTEL_FAM6_BROADWELL_GT3E, core_params), |
1348 | ICPU(0x4c, airmont_params), | 1349 | ICPU(INTEL_FAM6_ATOM_AIRMONT, airmont_params), |
1349 | ICPU(0x4e, core_params), | 1350 | ICPU(INTEL_FAM6_SKYLAKE_MOBILE, core_params), |
1350 | ICPU(0x4f, core_params), | 1351 | ICPU(INTEL_FAM6_BROADWELL_X, core_params), |
1351 | ICPU(0x5e, core_params), | 1352 | ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, core_params), |
1352 | ICPU(0x56, core_params), | 1353 | ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params), |
1353 | ICPU(0x57, knl_params), | 1354 | ICPU(INTEL_FAM6_XEON_PHI_KNL, knl_params), |
1354 | {} | 1355 | {} |
1355 | }; | 1356 | }; |
1356 | MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); | 1357 | MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); |
1357 | 1358 | ||
1358 | static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] = { | 1359 | static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] = { |
1359 | ICPU(0x56, core_params), | 1360 | ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params), |
1360 | {} | 1361 | {} |
1361 | }; | 1362 | }; |
1362 | 1363 | ||
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index c96649292b55..b5dd41d13d3d 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <linux/cpu.h> | 62 | #include <linux/cpu.h> |
63 | #include <linux/module.h> | 63 | #include <linux/module.h> |
64 | #include <asm/cpu_device_id.h> | 64 | #include <asm/cpu_device_id.h> |
65 | #include <asm/intel-family.h> | ||
65 | #include <asm/mwait.h> | 66 | #include <asm/mwait.h> |
66 | #include <asm/msr.h> | 67 | #include <asm/msr.h> |
67 | 68 | ||
@@ -1020,38 +1021,38 @@ static const struct idle_cpu idle_cpu_bxt = { | |||
1020 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu } | 1021 | { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu } |
1021 | 1022 | ||
1022 | static const struct x86_cpu_id intel_idle_ids[] __initconst = { | 1023 | static const struct x86_cpu_id intel_idle_ids[] __initconst = { |
1023 | ICPU(0x1a, idle_cpu_nehalem), | 1024 | ICPU(INTEL_FAM6_NEHALEM_EP, idle_cpu_nehalem), |
1024 | ICPU(0x1e, idle_cpu_nehalem), | 1025 | ICPU(INTEL_FAM6_NEHALEM, idle_cpu_nehalem), |
1025 | ICPU(0x1f, idle_cpu_nehalem), | 1026 | ICPU(INTEL_FAM6_WESTMERE2, idle_cpu_nehalem), |
1026 | ICPU(0x25, idle_cpu_nehalem), | 1027 | ICPU(INTEL_FAM6_WESTMERE, idle_cpu_nehalem), |
1027 | ICPU(0x2c, idle_cpu_nehalem), | 1028 | ICPU(INTEL_FAM6_WESTMERE_EP, idle_cpu_nehalem), |
1028 | ICPU(0x2e, idle_cpu_nehalem), | 1029 | ICPU(INTEL_FAM6_NEHALEM_EX, idle_cpu_nehalem), |
1029 | ICPU(0x1c, idle_cpu_atom), | 1030 | ICPU(INTEL_FAM6_ATOM_PINEVIEW, idle_cpu_atom), |
1030 | ICPU(0x26, idle_cpu_lincroft), | 1031 | ICPU(INTEL_FAM6_ATOM_LINCROFT, idle_cpu_lincroft), |
1031 | ICPU(0x2f, idle_cpu_nehalem), | 1032 | ICPU(INTEL_FAM6_WESTMERE_EX, idle_cpu_nehalem), |
1032 | ICPU(0x2a, idle_cpu_snb), | 1033 | ICPU(INTEL_FAM6_SANDYBRIDGE, idle_cpu_snb), |
1033 | ICPU(0x2d, idle_cpu_snb), | 1034 | ICPU(INTEL_FAM6_SANDYBRIDGE_X, idle_cpu_snb), |
1034 | ICPU(0x36, idle_cpu_atom), | 1035 | ICPU(INTEL_FAM6_ATOM_CEDARVIEW, idle_cpu_atom), |
1035 | ICPU(0x37, idle_cpu_byt), | 1036 | ICPU(INTEL_FAM6_ATOM_SILVERMONT1, idle_cpu_byt), |
1036 | ICPU(0x4c, idle_cpu_cht), | 1037 | ICPU(INTEL_FAM6_ATOM_AIRMONT, idle_cpu_cht), |
1037 | ICPU(0x3a, idle_cpu_ivb), | 1038 | ICPU(INTEL_FAM6_IVYBRIDGE, idle_cpu_ivb), |
1038 | ICPU(0x3e, idle_cpu_ivt), | 1039 | ICPU(INTEL_FAM6_IVYBRIDGE_X, idle_cpu_ivt), |
1039 | ICPU(0x3c, idle_cpu_hsw), | 1040 | ICPU(INTEL_FAM6_HASWELL_CORE, idle_cpu_hsw), |
1040 | ICPU(0x3f, idle_cpu_hsw), | 1041 | ICPU(INTEL_FAM6_HASWELL_X, idle_cpu_hsw), |
1041 | ICPU(0x45, idle_cpu_hsw), | 1042 | ICPU(INTEL_FAM6_HASWELL_ULT, idle_cpu_hsw), |
1042 | ICPU(0x46, idle_cpu_hsw), | 1043 | ICPU(INTEL_FAM6_HASWELL_GT3E, idle_cpu_hsw), |
1043 | ICPU(0x4d, idle_cpu_avn), | 1044 | ICPU(INTEL_FAM6_ATOM_SILVERMONT2, idle_cpu_avn), |
1044 | ICPU(0x3d, idle_cpu_bdw), | 1045 | ICPU(INTEL_FAM6_BROADWELL_CORE, idle_cpu_bdw), |
1045 | ICPU(0x47, idle_cpu_bdw), | 1046 | ICPU(INTEL_FAM6_BROADWELL_GT3E, idle_cpu_bdw), |
1046 | ICPU(0x4f, idle_cpu_bdw), | 1047 | ICPU(INTEL_FAM6_BROADWELL_X, idle_cpu_bdw), |
1047 | ICPU(0x56, idle_cpu_bdw), | 1048 | ICPU(INTEL_FAM6_BROADWELL_XEON_D, idle_cpu_bdw), |
1048 | ICPU(0x4e, idle_cpu_skl), | 1049 | ICPU(INTEL_FAM6_SKYLAKE_MOBILE, idle_cpu_skl), |
1049 | ICPU(0x5e, idle_cpu_skl), | 1050 | ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, idle_cpu_skl), |
1050 | ICPU(0x8e, idle_cpu_skl), | 1051 | ICPU(INTEL_FAM6_KABYLAKE_MOBILE, idle_cpu_skl), |
1051 | ICPU(0x9e, idle_cpu_skl), | 1052 | ICPU(INTEL_FAM6_KABYLAKE_DESKTOP, idle_cpu_skl), |
1052 | ICPU(0x55, idle_cpu_skx), | 1053 | ICPU(INTEL_FAM6_SKYLAKE_X, idle_cpu_skx), |
1053 | ICPU(0x57, idle_cpu_knl), | 1054 | ICPU(INTEL_FAM6_XEON_PHI_KNL, idle_cpu_knl), |
1054 | ICPU(0x5c, idle_cpu_bxt), | 1055 | ICPU(INTEL_FAM6_ATOM_GOLDMONT, idle_cpu_bxt), |
1055 | {} | 1056 | {} |
1056 | }; | 1057 | }; |
1057 | MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); | 1058 | MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids); |
@@ -1261,13 +1262,13 @@ static void intel_idle_state_table_update(void) | |||
1261 | { | 1262 | { |
1262 | switch (boot_cpu_data.x86_model) { | 1263 | switch (boot_cpu_data.x86_model) { |
1263 | 1264 | ||
1264 | case 0x3e: /* IVT */ | 1265 | case INTEL_FAM6_IVYBRIDGE_X: |
1265 | ivt_idle_state_table_update(); | 1266 | ivt_idle_state_table_update(); |
1266 | break; | 1267 | break; |
1267 | case 0x5c: /* BXT */ | 1268 | case INTEL_FAM6_ATOM_GOLDMONT: |
1268 | bxt_idle_state_table_update(); | 1269 | bxt_idle_state_table_update(); |
1269 | break; | 1270 | break; |
1270 | case 0x5e: /* SKL-H */ | 1271 | case INTEL_FAM6_SKYLAKE_DESKTOP: |
1271 | sklh_idle_state_table_update(); | 1272 | sklh_idle_state_table_update(); |
1272 | break; | 1273 | break; |
1273 | } | 1274 | } |
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 458ffb7637e5..008709c5cb09 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | #ifdef CONFIG_X86 | 44 | #ifdef CONFIG_X86 |
45 | #include <asm/cpu_device_id.h> | 45 | #include <asm/cpu_device_id.h> |
46 | #include <asm/intel-family.h> | ||
46 | #include <asm/iosf_mbi.h> | 47 | #include <asm/iosf_mbi.h> |
47 | #endif | 48 | #endif |
48 | 49 | ||
@@ -126,7 +127,7 @@ static const struct sdhci_acpi_chip sdhci_acpi_chip_int = { | |||
126 | static bool sdhci_acpi_byt(void) | 127 | static bool sdhci_acpi_byt(void) |
127 | { | 128 | { |
128 | static const struct x86_cpu_id byt[] = { | 129 | static const struct x86_cpu_id byt[] = { |
129 | { X86_VENDOR_INTEL, 6, 0x37 }, | 130 | { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT1 }, |
130 | {} | 131 | {} |
131 | }; | 132 | }; |
132 | 133 | ||
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 1fa6925733d3..8db5079f09a7 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile | |||
@@ -51,6 +51,9 @@ obj-$(CONFIG_ACPI) += pci-acpi.o | |||
51 | # SMBIOS provided firmware instance and labels | 51 | # SMBIOS provided firmware instance and labels |
52 | obj-$(CONFIG_PCI_LABEL) += pci-label.o | 52 | obj-$(CONFIG_PCI_LABEL) += pci-label.o |
53 | 53 | ||
54 | # Intel MID platform PM support | ||
55 | obj-$(CONFIG_X86_INTEL_MID) += pci-mid.o | ||
56 | |||
54 | obj-$(CONFIG_PCI_SYSCALL) += syscall.o | 57 | obj-$(CONFIG_PCI_SYSCALL) += syscall.o |
55 | 58 | ||
56 | obj-$(CONFIG_PCI_STUB) += pci-stub.o | 59 | obj-$(CONFIG_PCI_STUB) += pci-stub.o |
diff --git a/drivers/pci/pci-mid.c b/drivers/pci/pci-mid.c new file mode 100644 index 000000000000..c878aa71173b --- /dev/null +++ b/drivers/pci/pci-mid.c | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Intel MID platform PM support | ||
3 | * | ||
4 | * Copyright (C) 2016, Intel Corporation | ||
5 | * | ||
6 | * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/pci.h> | ||
15 | |||
16 | #include <asm/cpu_device_id.h> | ||
17 | #include <asm/intel-family.h> | ||
18 | #include <asm/intel-mid.h> | ||
19 | |||
20 | #include "pci.h" | ||
21 | |||
22 | static bool mid_pci_power_manageable(struct pci_dev *dev) | ||
23 | { | ||
24 | return true; | ||
25 | } | ||
26 | |||
27 | static int mid_pci_set_power_state(struct pci_dev *pdev, pci_power_t state) | ||
28 | { | ||
29 | return intel_mid_pci_set_power_state(pdev, state); | ||
30 | } | ||
31 | |||
32 | static pci_power_t mid_pci_choose_state(struct pci_dev *pdev) | ||
33 | { | ||
34 | return PCI_D3hot; | ||
35 | } | ||
36 | |||
37 | static int mid_pci_sleep_wake(struct pci_dev *dev, bool enable) | ||
38 | { | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | static int mid_pci_run_wake(struct pci_dev *dev, bool enable) | ||
43 | { | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static bool mid_pci_need_resume(struct pci_dev *dev) | ||
48 | { | ||
49 | return false; | ||
50 | } | ||
51 | |||
52 | static struct pci_platform_pm_ops mid_pci_platform_pm = { | ||
53 | .is_manageable = mid_pci_power_manageable, | ||
54 | .set_state = mid_pci_set_power_state, | ||
55 | .choose_state = mid_pci_choose_state, | ||
56 | .sleep_wake = mid_pci_sleep_wake, | ||
57 | .run_wake = mid_pci_run_wake, | ||
58 | .need_resume = mid_pci_need_resume, | ||
59 | }; | ||
60 | |||
61 | #define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, } | ||
62 | |||
63 | static const struct x86_cpu_id lpss_cpu_ids[] = { | ||
64 | ICPU(INTEL_FAM6_ATOM_MERRIFIELD1), | ||
65 | {} | ||
66 | }; | ||
67 | |||
68 | static int __init mid_pci_init(void) | ||
69 | { | ||
70 | const struct x86_cpu_id *id; | ||
71 | |||
72 | id = x86_match_cpu(lpss_cpu_ids); | ||
73 | if (id) | ||
74 | pci_set_platform_pm(&mid_pci_platform_pm); | ||
75 | return 0; | ||
76 | } | ||
77 | arch_initcall(mid_pci_init); | ||
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c index f5134acd6ff0..815a7c5e9566 100644 --- a/drivers/platform/x86/intel_telemetry_debugfs.c +++ b/drivers/platform/x86/intel_telemetry_debugfs.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/suspend.h> | 32 | #include <linux/suspend.h> |
33 | 33 | ||
34 | #include <asm/cpu_device_id.h> | 34 | #include <asm/cpu_device_id.h> |
35 | #include <asm/intel-family.h> | ||
35 | #include <asm/intel_pmc_ipc.h> | 36 | #include <asm/intel_pmc_ipc.h> |
36 | #include <asm/intel_punit_ipc.h> | 37 | #include <asm/intel_punit_ipc.h> |
37 | #include <asm/intel_telemetry.h> | 38 | #include <asm/intel_telemetry.h> |
@@ -331,7 +332,7 @@ static struct telemetry_debugfs_conf telem_apl_debugfs_conf = { | |||
331 | }; | 332 | }; |
332 | 333 | ||
333 | static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = { | 334 | static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = { |
334 | TELEM_DEBUGFS_CPU(0x5c, telem_apl_debugfs_conf), | 335 | TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_debugfs_conf), |
335 | {} | 336 | {} |
336 | }; | 337 | }; |
337 | 338 | ||
diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c b/drivers/platform/x86/intel_telemetry_pltdrv.c index 09c84a2b1c2c..6d884f7d1b9f 100644 --- a/drivers/platform/x86/intel_telemetry_pltdrv.c +++ b/drivers/platform/x86/intel_telemetry_pltdrv.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | 29 | ||
30 | #include <asm/cpu_device_id.h> | 30 | #include <asm/cpu_device_id.h> |
31 | #include <asm/intel-family.h> | ||
31 | #include <asm/intel_pmc_ipc.h> | 32 | #include <asm/intel_pmc_ipc.h> |
32 | #include <asm/intel_punit_ipc.h> | 33 | #include <asm/intel_punit_ipc.h> |
33 | #include <asm/intel_telemetry.h> | 34 | #include <asm/intel_telemetry.h> |
@@ -163,7 +164,7 @@ static struct telemetry_plt_config telem_apl_config = { | |||
163 | }; | 164 | }; |
164 | 165 | ||
165 | static const struct x86_cpu_id telemetry_cpu_ids[] = { | 166 | static const struct x86_cpu_id telemetry_cpu_ids[] = { |
166 | TELEM_CPU(0x5c, telem_apl_config), | 167 | TELEM_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_config), |
167 | {} | 168 | {} |
168 | }; | 169 | }; |
169 | 170 | ||
diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c index b2766b867b0e..2e8f2be5b6f9 100644 --- a/drivers/powercap/intel_rapl.c +++ b/drivers/powercap/intel_rapl.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <asm/processor.h> | 34 | #include <asm/processor.h> |
35 | #include <asm/cpu_device_id.h> | 35 | #include <asm/cpu_device_id.h> |
36 | #include <asm/intel-family.h> | ||
36 | 37 | ||
37 | /* Local defines */ | 38 | /* Local defines */ |
38 | #define MSR_PLATFORM_POWER_LIMIT 0x0000065C | 39 | #define MSR_PLATFORM_POWER_LIMIT 0x0000065C |
@@ -1096,27 +1097,34 @@ static const struct rapl_defaults rapl_defaults_cht = { | |||
1096 | } | 1097 | } |
1097 | 1098 | ||
1098 | static const struct x86_cpu_id rapl_ids[] __initconst = { | 1099 | static const struct x86_cpu_id rapl_ids[] __initconst = { |
1099 | RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */ | 1100 | RAPL_CPU(INTEL_FAM6_SANDYBRIDGE, rapl_defaults_core), |
1100 | RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */ | 1101 | RAPL_CPU(INTEL_FAM6_SANDYBRIDGE_X, rapl_defaults_core), |
1101 | RAPL_CPU(0x37, rapl_defaults_byt),/* Valleyview */ | 1102 | |
1102 | RAPL_CPU(0x3a, rapl_defaults_core),/* Ivy Bridge */ | 1103 | RAPL_CPU(INTEL_FAM6_IVYBRIDGE, rapl_defaults_core), |
1103 | RAPL_CPU(0x3c, rapl_defaults_core),/* Haswell */ | 1104 | |
1104 | RAPL_CPU(0x3d, rapl_defaults_core),/* Broadwell */ | 1105 | RAPL_CPU(INTEL_FAM6_HASWELL_CORE, rapl_defaults_core), |
1105 | RAPL_CPU(0x3f, rapl_defaults_hsw_server),/* Haswell servers */ | 1106 | RAPL_CPU(INTEL_FAM6_HASWELL_ULT, rapl_defaults_core), |
1106 | RAPL_CPU(0x4f, rapl_defaults_hsw_server),/* Broadwell servers */ | 1107 | RAPL_CPU(INTEL_FAM6_HASWELL_GT3E, rapl_defaults_core), |
1107 | RAPL_CPU(0x45, rapl_defaults_core),/* Haswell ULT */ | 1108 | RAPL_CPU(INTEL_FAM6_HASWELL_X, rapl_defaults_hsw_server), |
1108 | RAPL_CPU(0x46, rapl_defaults_core),/* Haswell */ | 1109 | |
1109 | RAPL_CPU(0x47, rapl_defaults_core),/* Broadwell-H */ | 1110 | RAPL_CPU(INTEL_FAM6_BROADWELL_CORE, rapl_defaults_core), |
1110 | RAPL_CPU(0x4E, rapl_defaults_core),/* Skylake */ | 1111 | RAPL_CPU(INTEL_FAM6_BROADWELL_GT3E, rapl_defaults_core), |
1111 | RAPL_CPU(0x4C, rapl_defaults_cht),/* Braswell/Cherryview */ | 1112 | RAPL_CPU(INTEL_FAM6_BROADWELL_XEON_D, rapl_defaults_core), |
1112 | RAPL_CPU(0x4A, rapl_defaults_tng),/* Tangier */ | 1113 | RAPL_CPU(INTEL_FAM6_BROADWELL_X, rapl_defaults_hsw_server), |
1113 | RAPL_CPU(0x56, rapl_defaults_core),/* Future Xeon */ | 1114 | |
1114 | RAPL_CPU(0x5A, rapl_defaults_ann),/* Annidale */ | 1115 | RAPL_CPU(INTEL_FAM6_SKYLAKE_DESKTOP, rapl_defaults_core), |
1115 | RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */ | 1116 | RAPL_CPU(INTEL_FAM6_SKYLAKE_MOBILE, rapl_defaults_core), |
1116 | RAPL_CPU(0x5E, rapl_defaults_core),/* Skylake-H/S */ | 1117 | RAPL_CPU(INTEL_FAM6_SKYLAKE_X, rapl_defaults_hsw_server), |
1117 | RAPL_CPU(0x57, rapl_defaults_hsw_server),/* Knights Landing */ | 1118 | RAPL_CPU(INTEL_FAM6_KABYLAKE_MOBILE, rapl_defaults_core), |
1118 | RAPL_CPU(0x8E, rapl_defaults_core),/* Kabylake */ | 1119 | RAPL_CPU(INTEL_FAM6_KABYLAKE_DESKTOP, rapl_defaults_core), |
1119 | RAPL_CPU(0x9E, rapl_defaults_core),/* Kabylake */ | 1120 | |
1121 | RAPL_CPU(INTEL_FAM6_ATOM_SILVERMONT1, rapl_defaults_byt), | ||
1122 | RAPL_CPU(INTEL_FAM6_ATOM_AIRMONT, rapl_defaults_cht), | ||
1123 | RAPL_CPU(INTEL_FAM6_ATOM_MERRIFIELD1, rapl_defaults_tng), | ||
1124 | RAPL_CPU(INTEL_FAM6_ATOM_MERRIFIELD2, rapl_defaults_ann), | ||
1125 | RAPL_CPU(INTEL_FAM6_ATOM_GOLDMONT, rapl_defaults_core), | ||
1126 | |||
1127 | RAPL_CPU(INTEL_FAM6_XEON_PHI_KNL, rapl_defaults_hsw_server), | ||
1120 | {} | 1128 | {} |
1121 | }; | 1129 | }; |
1122 | MODULE_DEVICE_TABLE(x86cpu, rapl_ids); | 1130 | MODULE_DEVICE_TABLE(x86cpu, rapl_ids); |
diff --git a/drivers/thermal/intel_soc_dts_thermal.c b/drivers/thermal/intel_soc_dts_thermal.c index 4ebb31a35a64..b2bbaa1c60b0 100644 --- a/drivers/thermal/intel_soc_dts_thermal.c +++ b/drivers/thermal/intel_soc_dts_thermal.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <asm/cpu_device_id.h> | 20 | #include <asm/cpu_device_id.h> |
21 | #include <asm/intel-family.h> | ||
21 | #include "intel_soc_dts_iosf.h" | 22 | #include "intel_soc_dts_iosf.h" |
22 | 23 | ||
23 | #define CRITICAL_OFFSET_FROM_TJ_MAX 5000 | 24 | #define CRITICAL_OFFSET_FROM_TJ_MAX 5000 |
@@ -42,7 +43,8 @@ static irqreturn_t soc_irq_thread_fn(int irq, void *dev_data) | |||
42 | } | 43 | } |
43 | 44 | ||
44 | static const struct x86_cpu_id soc_thermal_ids[] = { | 45 | static const struct x86_cpu_id soc_thermal_ids[] = { |
45 | { X86_VENDOR_INTEL, X86_FAMILY_ANY, 0x37, 0, BYT_SOC_DTS_APIC_IRQ}, | 46 | { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT1, 0, |
47 | BYT_SOC_DTS_APIC_IRQ}, | ||
46 | {} | 48 | {} |
47 | }; | 49 | }; |
48 | MODULE_DEVICE_TABLE(x86cpu, soc_thermal_ids); | 50 | MODULE_DEVICE_TABLE(x86cpu, soc_thermal_ids); |
diff --git a/include/linux/sfi.h b/include/linux/sfi.h index d9b436f09925..e0e1597ef9e6 100644 --- a/include/linux/sfi.h +++ b/include/linux/sfi.h | |||
@@ -156,6 +156,7 @@ struct sfi_device_table_entry { | |||
156 | #define SFI_DEV_TYPE_UART 2 | 156 | #define SFI_DEV_TYPE_UART 2 |
157 | #define SFI_DEV_TYPE_HSI 3 | 157 | #define SFI_DEV_TYPE_HSI 3 |
158 | #define SFI_DEV_TYPE_IPC 4 | 158 | #define SFI_DEV_TYPE_IPC 4 |
159 | #define SFI_DEV_TYPE_SD 5 | ||
159 | 160 | ||
160 | u8 host_num; /* attached to host 0, 1...*/ | 161 | u8 host_num; /* attached to host 0, 1...*/ |
161 | u16 addr; | 162 | u16 addr; |