diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/acpi.h | 81 | ||||
-rw-r--r-- | include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 8 | ||||
-rw-r--r-- | include/linux/msi.h | 2 | ||||
-rw-r--r-- | include/linux/pci.h | 19 |
4 files changed, 62 insertions, 48 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 74c5a8e467e8..b0972c4ce81c 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -294,59 +294,52 @@ void __init acpi_nvs_nosave_s3(void); | |||
294 | #endif /* CONFIG_PM_SLEEP */ | 294 | #endif /* CONFIG_PM_SLEEP */ |
295 | 295 | ||
296 | struct acpi_osc_context { | 296 | struct acpi_osc_context { |
297 | char *uuid_str; /* uuid string */ | 297 | char *uuid_str; /* UUID string */ |
298 | int rev; | 298 | int rev; |
299 | struct acpi_buffer cap; /* arg2/arg3 */ | 299 | struct acpi_buffer cap; /* list of DWORD capabilities */ |
300 | struct acpi_buffer ret; /* free by caller if success */ | 300 | struct acpi_buffer ret; /* free by caller if success */ |
301 | }; | 301 | }; |
302 | 302 | ||
303 | #define OSC_QUERY_TYPE 0 | ||
304 | #define OSC_SUPPORT_TYPE 1 | ||
305 | #define OSC_CONTROL_TYPE 2 | ||
306 | |||
307 | /* _OSC DW0 Definition */ | ||
308 | #define OSC_QUERY_ENABLE 1 | ||
309 | #define OSC_REQUEST_ERROR 2 | ||
310 | #define OSC_INVALID_UUID_ERROR 4 | ||
311 | #define OSC_INVALID_REVISION_ERROR 8 | ||
312 | #define OSC_CAPABILITIES_MASK_ERROR 16 | ||
313 | |||
314 | acpi_status acpi_str_to_uuid(char *str, u8 *uuid); | 303 | acpi_status acpi_str_to_uuid(char *str, u8 *uuid); |
315 | acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); | 304 | acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); |
316 | 305 | ||
317 | /* platform-wide _OSC bits */ | 306 | /* Indexes into _OSC Capabilities Buffer (DWORDs 2 & 3 are device-specific) */ |
318 | #define OSC_SB_PAD_SUPPORT 1 | 307 | #define OSC_QUERY_DWORD 0 /* DWORD 1 */ |
319 | #define OSC_SB_PPC_OST_SUPPORT 2 | 308 | #define OSC_SUPPORT_DWORD 1 /* DWORD 2 */ |
320 | #define OSC_SB_PR3_SUPPORT 4 | 309 | #define OSC_CONTROL_DWORD 2 /* DWORD 3 */ |
321 | #define OSC_SB_HOTPLUG_OST_SUPPORT 8 | 310 | |
322 | #define OSC_SB_APEI_SUPPORT 16 | 311 | /* _OSC Capabilities DWORD 1: Query/Control and Error Returns (generic) */ |
312 | #define OSC_QUERY_ENABLE 0x00000001 /* input */ | ||
313 | #define OSC_REQUEST_ERROR 0x00000002 /* return */ | ||
314 | #define OSC_INVALID_UUID_ERROR 0x00000004 /* return */ | ||
315 | #define OSC_INVALID_REVISION_ERROR 0x00000008 /* return */ | ||
316 | #define OSC_CAPABILITIES_MASK_ERROR 0x00000010 /* return */ | ||
317 | |||
318 | /* Platform-Wide Capabilities _OSC: Capabilities DWORD 2: Support Field */ | ||
319 | #define OSC_SB_PAD_SUPPORT 0x00000001 | ||
320 | #define OSC_SB_PPC_OST_SUPPORT 0x00000002 | ||
321 | #define OSC_SB_PR3_SUPPORT 0x00000004 | ||
322 | #define OSC_SB_HOTPLUG_OST_SUPPORT 0x00000008 | ||
323 | #define OSC_SB_APEI_SUPPORT 0x00000010 | ||
324 | #define OSC_SB_CPC_SUPPORT 0x00000020 | ||
323 | 325 | ||
324 | extern bool osc_sb_apei_support_acked; | 326 | extern bool osc_sb_apei_support_acked; |
325 | 327 | ||
326 | /* PCI defined _OSC bits */ | 328 | /* PCI Host Bridge _OSC: Capabilities DWORD 2: Support Field */ |
327 | /* _OSC DW1 Definition (OS Support Fields) */ | 329 | #define OSC_PCI_EXT_CONFIG_SUPPORT 0x00000001 |
328 | #define OSC_EXT_PCI_CONFIG_SUPPORT 1 | 330 | #define OSC_PCI_ASPM_SUPPORT 0x00000002 |
329 | #define OSC_ACTIVE_STATE_PWR_SUPPORT 2 | 331 | #define OSC_PCI_CLOCK_PM_SUPPORT 0x00000004 |
330 | #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 4 | 332 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 0x00000008 |
331 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 8 | 333 | #define OSC_PCI_MSI_SUPPORT 0x00000010 |
332 | #define OSC_MSI_SUPPORT 16 | 334 | #define OSC_PCI_SUPPORT_MASKS 0x0000001f |
333 | #define OSC_PCI_SUPPORT_MASKS 0x1f | 335 | |
334 | 336 | /* PCI Host Bridge _OSC: Capabilities DWORD 3: Control Field */ | |
335 | /* _OSC DW1 Definition (OS Control Fields) */ | 337 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 0x00000001 |
336 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 1 | 338 | #define OSC_PCI_SHPC_NATIVE_HP_CONTROL 0x00000002 |
337 | #define OSC_SHPC_NATIVE_HP_CONTROL 2 | 339 | #define OSC_PCI_EXPRESS_PME_CONTROL 0x00000004 |
338 | #define OSC_PCI_EXPRESS_PME_CONTROL 4 | 340 | #define OSC_PCI_EXPRESS_AER_CONTROL 0x00000008 |
339 | #define OSC_PCI_EXPRESS_AER_CONTROL 8 | 341 | #define OSC_PCI_EXPRESS_CAPABILITY_CONTROL 0x00000010 |
340 | #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16 | 342 | #define OSC_PCI_CONTROL_MASKS 0x0000001f |
341 | |||
342 | #define OSC_PCI_CONTROL_MASKS (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ | ||
343 | OSC_SHPC_NATIVE_HP_CONTROL | \ | ||
344 | OSC_PCI_EXPRESS_PME_CONTROL | \ | ||
345 | OSC_PCI_EXPRESS_AER_CONTROL | \ | ||
346 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | ||
347 | |||
348 | #define OSC_PCI_NATIVE_HOTPLUG (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ | ||
349 | OSC_SHPC_NATIVE_HP_CONTROL) | ||
350 | 343 | ||
351 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | 344 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, |
352 | u32 *mask, u32 req); | 345 | u32 *mask, u32 req); |
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h index 7086b2248c8f..b6d36b38b99c 100644 --- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h +++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | |||
@@ -241,6 +241,12 @@ | |||
241 | 241 | ||
242 | #define IMX6Q_GPR5_L2_CLK_STOP BIT(8) | 242 | #define IMX6Q_GPR5_L2_CLK_STOP BIT(8) |
243 | 243 | ||
244 | #define IMX6Q_GPR8_TX_SWING_LOW (0x7f << 25) | ||
245 | #define IMX6Q_GPR8_TX_SWING_FULL (0x7f << 18) | ||
246 | #define IMX6Q_GPR8_TX_DEEMPH_GEN2_6DB (0x3f << 12) | ||
247 | #define IMX6Q_GPR8_TX_DEEMPH_GEN2_3P5DB (0x3f << 6) | ||
248 | #define IMX6Q_GPR8_TX_DEEMPH_GEN1 (0x3f << 0) | ||
249 | |||
244 | #define IMX6Q_GPR9_TZASC2_BYP BIT(1) | 250 | #define IMX6Q_GPR9_TZASC2_BYP BIT(1) |
245 | #define IMX6Q_GPR9_TZASC1_BYP BIT(0) | 251 | #define IMX6Q_GPR9_TZASC1_BYP BIT(0) |
246 | 252 | ||
@@ -273,7 +279,9 @@ | |||
273 | #define IMX6Q_GPR12_ARMP_AHB_CLK_EN BIT(26) | 279 | #define IMX6Q_GPR12_ARMP_AHB_CLK_EN BIT(26) |
274 | #define IMX6Q_GPR12_ARMP_ATB_CLK_EN BIT(25) | 280 | #define IMX6Q_GPR12_ARMP_ATB_CLK_EN BIT(25) |
275 | #define IMX6Q_GPR12_ARMP_APB_CLK_EN BIT(24) | 281 | #define IMX6Q_GPR12_ARMP_APB_CLK_EN BIT(24) |
282 | #define IMX6Q_GPR12_DEVICE_TYPE (0xf << 12) | ||
276 | #define IMX6Q_GPR12_PCIE_CTL_2 BIT(10) | 283 | #define IMX6Q_GPR12_PCIE_CTL_2 BIT(10) |
284 | #define IMX6Q_GPR12_LOS_LEVEL (0x1f << 4) | ||
277 | 285 | ||
278 | #define IMX6Q_GPR13_SDMA_STOP_REQ BIT(30) | 286 | #define IMX6Q_GPR13_SDMA_STOP_REQ BIT(30) |
279 | #define IMX6Q_GPR13_CAN2_STOP_REQ BIT(29) | 287 | #define IMX6Q_GPR13_CAN2_STOP_REQ BIT(29) |
diff --git a/include/linux/msi.h b/include/linux/msi.h index b17ead818aec..87cce50bd121 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -64,6 +64,8 @@ void arch_restore_msi_irqs(struct pci_dev *dev, int irq); | |||
64 | 64 | ||
65 | void default_teardown_msi_irqs(struct pci_dev *dev); | 65 | void default_teardown_msi_irqs(struct pci_dev *dev); |
66 | void default_restore_msi_irqs(struct pci_dev *dev, int irq); | 66 | void default_restore_msi_irqs(struct pci_dev *dev, int irq); |
67 | u32 default_msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag); | ||
68 | u32 default_msix_mask_irq(struct msi_desc *desc, u32 flag); | ||
67 | 69 | ||
68 | struct msi_chip { | 70 | struct msi_chip { |
69 | struct module *owner; | 71 | struct module *owner; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index da172f956ad6..835ec7bf6c05 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -330,8 +330,6 @@ struct pci_dev { | |||
330 | unsigned int msix_enabled:1; | 330 | unsigned int msix_enabled:1; |
331 | unsigned int ari_enabled:1; /* ARI forwarding */ | 331 | unsigned int ari_enabled:1; /* ARI forwarding */ |
332 | unsigned int is_managed:1; | 332 | unsigned int is_managed:1; |
333 | unsigned int is_pcie:1; /* Obsolete. Will be removed. | ||
334 | Use pci_is_pcie() instead */ | ||
335 | unsigned int needs_freset:1; /* Dev requires fundamental reset */ | 333 | unsigned int needs_freset:1; /* Dev requires fundamental reset */ |
336 | unsigned int state_saved:1; | 334 | unsigned int state_saved:1; |
337 | unsigned int is_physfn:1; | 335 | unsigned int is_physfn:1; |
@@ -472,12 +470,25 @@ struct pci_bus { | |||
472 | /* | 470 | /* |
473 | * Returns true if the pci bus is root (behind host-pci bridge), | 471 | * Returns true if the pci bus is root (behind host-pci bridge), |
474 | * false otherwise | 472 | * false otherwise |
473 | * | ||
474 | * Some code assumes that "bus->self == NULL" means that bus is a root bus. | ||
475 | * This is incorrect because "virtual" buses added for SR-IOV (via | ||
476 | * virtfn_add_bus()) have "bus->self == NULL" but are not root buses. | ||
475 | */ | 477 | */ |
476 | static inline bool pci_is_root_bus(struct pci_bus *pbus) | 478 | static inline bool pci_is_root_bus(struct pci_bus *pbus) |
477 | { | 479 | { |
478 | return !(pbus->parent); | 480 | return !(pbus->parent); |
479 | } | 481 | } |
480 | 482 | ||
483 | static inline struct pci_dev *pci_upstream_bridge(struct pci_dev *dev) | ||
484 | { | ||
485 | dev = pci_physfn(dev); | ||
486 | if (pci_is_root_bus(dev->bus)) | ||
487 | return NULL; | ||
488 | |||
489 | return dev->bus->self; | ||
490 | } | ||
491 | |||
481 | #ifdef CONFIG_PCI_MSI | 492 | #ifdef CONFIG_PCI_MSI |
482 | static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) | 493 | static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) |
483 | { | 494 | { |
@@ -1749,11 +1760,11 @@ static inline int pci_pcie_cap(struct pci_dev *dev) | |||
1749 | * pci_is_pcie - check if the PCI device is PCI Express capable | 1760 | * pci_is_pcie - check if the PCI device is PCI Express capable |
1750 | * @dev: PCI device | 1761 | * @dev: PCI device |
1751 | * | 1762 | * |
1752 | * Retrun true if the PCI device is PCI Express capable, false otherwise. | 1763 | * Returns: true if the PCI device is PCI Express capable, false otherwise. |
1753 | */ | 1764 | */ |
1754 | static inline bool pci_is_pcie(struct pci_dev *dev) | 1765 | static inline bool pci_is_pcie(struct pci_dev *dev) |
1755 | { | 1766 | { |
1756 | return !!pci_pcie_cap(dev); | 1767 | return pci_pcie_cap(dev); |
1757 | } | 1768 | } |
1758 | 1769 | ||
1759 | /** | 1770 | /** |