
21 Oct
2020
21 Oct
'20
9:20 a.m.
Hi Marek,
On Wednesday, October 21, 2020 3:15 PM, Marek Vasut wrote:
On 10/21/20 8:25 AM, Ran Wang wrote:
[...]
+static void dwc3_frame_length_adjustment(struct dwc3 *dwc, u32 val) {
- u32 reg;
- u32 dft;
- reg = dwc3_readl(dwc->regs, DWC3_GFLADJ);
- dft = reg & DWC3_GFLADJ_30MHZ_MASK;
- if (dft != val) {
Is there a point to this test or could this entire function be turned into clrsetbits_le32() ?
I think the purpose is avoiding unnecessary write to GFLADJ to reduce potential impact on HW logic, especially counter/timer related.
Regards, Ran
reg &= ~DWC3_GFLADJ_30MHZ_MASK;
reg |= DWC3_GFLADJ_30MHZ_SDBND_SEL | val;
dwc3_writel(dwc->regs, DWC3_GFLADJ, reg);
- }
+}
[...]