Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1216459 > unrolled thread
| Started by | Dave Hansen <dave@sr71.net> |
|---|---|
| First post | 2015-08-31 23:30 +0200 |
| Last post | 2015-09-01 10:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] xhci: fix warning when CONFIG_PM disabled. Dave Hansen <dave@sr71.net> - 2015-08-31 23:30 +0200
Re: [PATCH] xhci: fix warning when CONFIG_PM disabled. Mathias Nyman <mathias.nyman@linux.intel.com> - 2015-09-01 10:00 +0200
| From | Dave Hansen <dave@sr71.net> |
|---|---|
| Date | 2015-08-31 23:30 +0200 |
| Subject | [PATCH] xhci: fix warning when CONFIG_PM disabled. |
| Message-ID | <q3EOn-2Vg-37@gated-at.bofh.it> |
From: Dave Hansen <dave.hansen@linux.intel.com>
I have a .config with CONFIG_PM disabled. I get the following
whenever compiling the xhci driver:
drivers/usb/host/xhci-pci.c:192:13: warning: ‘xhci_pme_quirk’ defined but not used [-Wunused-function]
Looks like we just need to move xhci_pme_quirk() to be underneath
the CONFIG_PM #ifdef.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Mathias Nyman <mathias.nyman@intel.com> (supporter:USB XHCI DRIVER)
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:USB SUBSYSTEM)
Cc: linux-usb@vger.kernel.org (open list:USB XHCI DRIVER)
Cc: linux-kernel@vger.kernel.org (open list)
---
b/drivers/usb/host/xhci-pci.c | 90 +++++++++++++++++++++---------------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff -puN drivers/usb/host/xhci-pci.c~xhci-warning drivers/usb/host/xhci-pci.c
--- a/drivers/usb/host/xhci-pci.c~xhci-warning 2015-08-31 14:16:40.553236125 -0700
+++ b/drivers/usb/host/xhci-pci.c 2015-08-31 14:17:41.140001370 -0700
@@ -180,51 +180,6 @@ static void xhci_pci_quirks(struct devic
"QUIRK: Resetting on resume");
}
-/*
- * In some Intel xHCI controllers, in order to get D3 working,
- * through a vendor specific SSIC CONFIG register at offset 0x883c,
- * SSIC PORT need to be marked as "unused" before putting xHCI
- * into D3. After D3 exit, the SSIC port need to be marked as "used".
- * Without this change, xHCI might not enter D3 state.
- * Make sure PME works on some Intel xHCI controllers by writing 1 to clear
- * the Internal PME flag bit in vendor specific PMCTRL register at offset 0x80a4
- */
-static void xhci_pme_quirk(struct usb_hcd *hcd, bool suspend)
-{
- struct xhci_hcd *xhci = hcd_to_xhci(hcd);
- struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
- u32 val;
- void __iomem *reg;
-
- if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
- pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI) {
-
- reg = (void __iomem *) xhci->cap_regs + PORT2_SSIC_CONFIG_REG2;
-
- /* Notify SSIC that SSIC profile programming is not done */
- val = readl(reg) & ~PROG_DONE;
- writel(val, reg);
-
- /* Mark SSIC port as unused(suspend) or used(resume) */
- val = readl(reg);
- if (suspend)
- val |= SSIC_PORT_UNUSED;
- else
- val &= ~SSIC_PORT_UNUSED;
- writel(val, reg);
-
- /* Notify SSIC that SSIC profile programming is done */
- val = readl(reg) | PROG_DONE;
- writel(val, reg);
- readl(reg);
- }
-
- reg = (void __iomem *) xhci->cap_regs + 0x80a4;
- val = readl(reg);
- writel(val | BIT(28), reg);
- readl(reg);
-}
-
#ifdef CONFIG_ACPI
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
{
@@ -345,6 +300,51 @@ static void xhci_pci_remove(struct pci_d
}
#ifdef CONFIG_PM
+/*
+ * In some Intel xHCI controllers, in order to get D3 working,
+ * through a vendor specific SSIC CONFIG register at offset 0x883c,
+ * SSIC PORT need to be marked as "unused" before putting xHCI
+ * into D3. After D3 exit, the SSIC port need to be marked as "used".
+ * Without this change, xHCI might not enter D3 state.
+ * Make sure PME works on some Intel xHCI controllers by writing 1 to clear
+ * the Internal PME flag bit in vendor specific PMCTRL register at offset 0x80a4
+ */
+static void xhci_pme_quirk(struct usb_hcd *hcd, bool suspend)
+{
+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+ u32 val;
+ void __iomem *reg;
+
+ if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
+ pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI) {
+
+ reg = (void __iomem *) xhci->cap_regs + PORT2_SSIC_CONFIG_REG2;
+
+ /* Notify SSIC that SSIC profile programming is not done */
+ val = readl(reg) & ~PROG_DONE;
+ writel(val, reg);
+
+ /* Mark SSIC port as unused(suspend) or used(resume) */
+ val = readl(reg);
+ if (suspend)
+ val |= SSIC_PORT_UNUSED;
+ else
+ val &= ~SSIC_PORT_UNUSED;
+ writel(val, reg);
+
+ /* Notify SSIC that SSIC profile programming is done */
+ val = readl(reg) | PROG_DONE;
+ writel(val, reg);
+ readl(reg);
+ }
+
+ reg = (void __iomem *) xhci->cap_regs + 0x80a4;
+ val = readl(reg);
+ writel(val | BIT(28), reg);
+ readl(reg);
+}
+
static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
{
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mathias Nyman <mathias.nyman@linux.intel.com> |
|---|---|
| Date | 2015-09-01 10:00 +0200 |
| Message-ID | <q3OE2-iJ-5@gated-at.bofh.it> |
| In reply to | #1216459 |
On 01.09.2015 00:26, Dave Hansen wrote: > From: Dave Hansen <dave.hansen@linux.intel.com> > > I have a .config with CONFIG_PM disabled. I get the following > whenever compiling the xhci driver: > > drivers/usb/host/xhci-pci.c:192:13: warning: ‘xhci_pme_quirk’ defined but not used [-Wunused-function] > > Looks like we just need to move xhci_pme_quirk() to be underneath > the CONFIG_PM #ifdef. > There is a patch for this already, I'll send it forward right after the merge window http://marc.info/?l=linux-usb&m=143988457116356&w=2 -Mathias -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web