Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9cdbef8 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: phy: Enable proper DP DM masks for PHY interrupts"

parents 7a53313f 57ea67b7
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -373,8 +373,20 @@ static void msm_snps_hsphy_enable_hv_interrupts(struct msm_snps_hsphy *phy)
	usleep_range(200, 220);
	writeb_relaxed(0x01, USB2_PHY_USB_PHY_IRQ_CMD);

	/* Make sure the interrupts are cleared */
	usleep_range(200, 220);

	val = readl_relaxed(USB2_PHY_USB_PHY_INTERRUPT_MASK0);
	val |= USB2_PHY_USB_PHY_DPDM_0_1_MASK;
	if (phy->phy.flags & PHY_HSFS_MODE) {
		val |= USB2_PHY_USB_PHY_DP_1_0_MASK |
			USB2_PHY_USB_PHY_DM_0_1_MASK;
	} else if (phy->phy.flags & PHY_LS_MODE) {
		val |= USB2_PHY_USB_PHY_DP_0_1_MASK |
			USB2_PHY_USB_PHY_DM_1_0_MASK;
	} else {
		val |= USB2_PHY_USB_PHY_DP_0_1_MASK |
			USB2_PHY_USB_PHY_DM_0_1_MASK;
	}
	writeb_relaxed(val, USB2_PHY_USB_PHY_INTERRUPT_MASK0);
}

@@ -395,6 +407,7 @@ static void msm_snps_hsphy_disable_hv_interrupts(struct msm_snps_hsphy *phy)
	writeb_relaxed(0x00, USB2_PHY_USB_PHY_IRQ_CMD);
	usleep_range(200, 220);
	writeb_relaxed(0x01, USB2_PHY_USB_PHY_IRQ_CMD);
	usleep_range(200, 220);
}

static int msm_snps_hsphy_set_suspend(struct usb_phy *uphy, int suspend)
+4 −1
Original line number Diff line number Diff line
@@ -95,7 +95,10 @@
#define USB2_PHY_USB_PHY_INTERRUPT_CLEAR1 (MSM_USB_PHY_CSR_BASE + 0x0E0)

#define USB2_PHY_USB_PHY_INTERRUPT_MASK0 (MSM_USB_PHY_CSR_BASE + 0x0D4)
#define USB2_PHY_USB_PHY_DPDM_0_1_MASK		0x0A
#define USB2_PHY_USB_PHY_DP_1_0_MASK		BIT(4)
#define USB2_PHY_USB_PHY_DP_0_1_MASK		BIT(3)
#define USB2_PHY_USB_PHY_DM_1_0_MASK		BIT(2)
#define USB2_PHY_USB_PHY_DM_0_1_MASK		BIT(1)

#define USB2_PHY_USB_PHY_INTERRUPT_MASK1 (MSM_USB_PHY_CSR_BASE + 0x0D8)