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

Commit c5db2722 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: Fix setting of hird_thres property"

parents 341b367a eb619026
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -572,6 +572,7 @@ static int dwc3_probe(struct platform_device *pdev)
	void __iomem		*regs;
	void			*mem;

	u32			hird_thresh;
	u8			mode;
	bool			host_only_mode;

@@ -636,8 +637,10 @@ static int dwc3_probe(struct platform_device *pdev)
	dwc->usb3_u1u2_disable = of_property_read_bool(node,
						"snps,usb3-u1u2-disable");
	dwc->maximum_speed = of_usb_get_maximum_speed(node);
	ret = of_property_read_u8(node, "snps,hird_thresh", &dwc->hird_thresh);
	if (res)
	ret = of_property_read_u32(node, "snps,hird_thresh", &hird_thresh);
	if (!ret)
		dwc->hird_thresh = (u8) hird_thresh;
	else
		dwc->hird_thresh = DWC3_DCTL_HIRD_THRES_DEFAULT;

	dwc->enable_bus_suspend = of_property_read_bool(node,
+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@
#define DWC3_DCTL_LSFTRST	(1 << 29)

#define DWC3_DCTL_HIRD_THRES_MASK	(0x1f << 24)
#define DWC3_DCTL_HIRD_THRES(n)	((n) << 24)
#define DWC3_DCTL_HIRD_THRES(n)	(((n) << 24) & DWC3_DCTL_HIRD_THRES_MASK)

#define DWC3_DCTL_APPL1RES	(1 << 23)