PMU: PMU_SECURITY_LSS_04 and PMU_USB_OTG_LSS_06 can go to proper low power
authorFei Yang <fei.yang@intel.com>
Fri, 26 Aug 2011 17:03:08 +0000 (10:03 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:37:30 +0000 (12:37 -0800)
     state now after applying the following patches from umg 2.6.35 tree,
     put these two LSS back to the s0i3 checklist.

commit 11724c02b5525f8acb4ba9ab9a6547055b49adb9
Author: Wu, Hao <hao.wu@intel.com>
Date:   Fri Aug 5 01:28:58 2011 +0800

    usb: set pci device state to D0 before run ehci quirks

    BZ:  6580

    As mid_pmu driver will set USB LSS_06 in D0i1 at init, so if
    we didn't get USB back to D0 before run ehci quirks, it will
    cause Fabric error due to controller regsiter access in D0i1.

    Change-Id: I3ba147aecbfac30bcb57629e70919df210405be7
Signed-off-by: Wu, Hao <hao.wu@intel.com>
commit 135189c63e46a39a7ab3951495d03a5e8e9d6ab0
Author: Illyas Mansoor <illyas.mansoor@intel.com>
Date:   Wed Aug 3 15:08:32 2011 +0530

    mid_pmu: remove devices not supporting D0i3 in D0i0

    BZ:  6580

    Earlier we had put all devices that do not support D0i3 in D0i0 state
    after investigation we found that putting USB LSS_06 in D0i1 causes
    this Fabric error.

    This is now fixed, hence removing forcing of D0i0

    Change-Id: If5e3879610a3613472214aa835da35ca32c5c899
Signed-off-by: Illyas Mansoor <illyas.mansoor@intel.com>
Change-Id: I6eecd53c736f07cb1b4f1a86529a8651877dd5ee
Signed-off-by: Fei Yang <fei.yang@intel.com>
arch/x86/platform/mfld/pmu.c
arch/x86/platform/mfld/pmu.h
drivers/usb/host/pci-quirks.c

index bd72ff0..2eed140 100755 (executable)
@@ -1959,17 +1959,9 @@ static void update_all_lss_states(struct pmu_ss_states *pmu_config)
                        ss_pos = intel_mid_pci_devices[i].ss_pos;
                        state = pdev->current_state;
                        /* the case of device not probed yet: Force D0i3 */
-                       if (state == PCI_UNKNOWN) {
+                       if (state == PCI_UNKNOWN)
                                state = pmu_pci_choose_state(pdev);
-                               /* for those weird devices that does not do
-                                  D0i3, we keep them alive
-                                  (or we get F503's
-                                  @todo: need to figure out why)
-                               */
-                               if (state != PCI_D3hot)
-                                       state = PCI_D0;
-
-                       }
+
                        /* By default its set to '0' hence
                         * no need to update PCI_D0 state
                         */
index 81677cf..2a21fcd 100644 (file)
        SSMSK(D0I3_MASK, PMU_SDIO0_LSS_00) | \
        SSMSK(D0I3_MASK, PMU_EMMC0_LSS_01) | \
        SSMSK(D0I3_MASK, PMU_HSI_LSS_03) | \
+       SSMSK(D0I3_MASK, PMU_SECURITY_LSS_04) | \
        SSMSK(D0I3_MASK, PMU_EMMC1_LSS_05) | \
+       SSMSK(D0I3_MASK, PMU_USB_OTG_LSS_06) | \
        SSMSK(D0I3_MASK, PMU_AUDIO_ENGINE_LSS_08) | \
        SSMSK(D0I3_MASK, PMU_AUDIO_DMA_LSS_09) | \
        SSMSK(D0I3_MASK, PMU_SDIO2_LSS_14))
        SSMSK(D0I3_MASK, PMU_SDIO0_LSS_00) | \
        SSMSK(D0I3_MASK, PMU_EMMC0_LSS_01) | \
        SSMSK(D0I3_MASK, PMU_HSI_LSS_03) | \
+       SSMSK(D0I2_MASK, PMU_SECURITY_LSS_04) | \
        SSMSK(D0I3_MASK, PMU_EMMC1_LSS_05) | \
+       SSMSK(D0I3_MASK, PMU_USB_OTG_LSS_06) | \
        SSMSK(D0I3_MASK, PMU_AUDIO_ENGINE_LSS_08) | \
        SSMSK(D0I3_MASK, PMU_AUDIO_DMA_LSS_09) | \
        SSMSK(D0I3_MASK, PMU_SDIO2_LSS_14))
index 629a968..73d0394 100644 (file)
@@ -635,6 +635,8 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
        if (base == NULL)
                return;
 
+       pci_set_power_state(pdev, PCI_D0);
+
        cap_length = readb(base);
        op_reg_base = base + cap_length;
 
@@ -687,6 +689,9 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
        writel(0x3f, op_reg_base + EHCI_USBSTS);
 
        iounmap(base);
+
+       /* after disable ehci, put it back to correct power state */
+       pci_set_power_state(pdev, pci_choose_state(pdev, PMSG_SUSPEND));
 }
 
 /*