From: Thinh Nguyen <Thinh.Nguyen@synopsys.com> To: Felipe Balbi <balbi@kernel.org> Cc: John Youn <John.Youn@synopsys.com>, Thinh Nguyen <Thinh.Nguyen@synopsys.com>, linux-usb@vger.kernel.org Subject: [2/2] usb: dwc3: Rename DWC3_DCTL_LPM_ERRATA Date: Thu, 25 Apr 2019 13:55:30 -0700 [thread overview] Message-ID: <3745c5e48536b2d3e4e04006860ced7dd961dc31.1556224658.git.thinhn@synopsys.com> (raw) The macro name DWC3_DCTL_LPM_ERRATA is uninformative and does not do masking. Remove DWC3_DCTL_LPM_ERRATA_MASK and rename DWC3_DCTL_LPM_ERRATA to DWC3_DCTL_NYET_THRES with proper masking. Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> --- drivers/usb/dwc3/core.h | 3 +-- drivers/usb/dwc3/gadget.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 1528d395b156..f19cbeb01087 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -406,8 +406,7 @@ #define DWC3_DCTL_TRGTULST_SS_INACT (DWC3_DCTL_TRGTULST(6)) /* These apply for core versions 1.94a and later */ -#define DWC3_DCTL_LPM_ERRATA_MASK DWC3_DCTL_LPM_ERRATA(0xf) -#define DWC3_DCTL_LPM_ERRATA(n) ((n) << 20) +#define DWC3_DCTL_NYET_THRES(n) (((n) & 0xf) << 20) #define DWC3_DCTL_KEEP_CONNECT BIT(19) #define DWC3_DCTL_L1_HIBER_EN BIT(18) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2bb0ff9608d3..1d808d15e886 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2863,7 +2863,7 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) "LPM Erratum not available on dwc3 revisions < 2.40a\n"); if (dwc->has_lpm_erratum && dwc->revision >= DWC3_REVISION_240A) - reg |= DWC3_DCTL_LPM_ERRATA(dwc->lpm_nyet_threshold); + reg |= DWC3_DCTL_NYET_THRES(dwc->lpm_nyet_threshold); dwc3_writel(dwc->regs, DWC3_DCTL, reg); } else {
WARNING: multiple messages have this Message-ID (diff)
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com> To: Felipe Balbi <balbi@kernel.org> Cc: John Youn <John.Youn@synopsys.com>, Thinh Nguyen <Thinh.Nguyen@synopsys.com>, <linux-usb@vger.kernel.org> Subject: [PATCH 2/2] usb: dwc3: Rename DWC3_DCTL_LPM_ERRATA Date: Thu, 25 Apr 2019 13:55:30 -0700 [thread overview] Message-ID: <3745c5e48536b2d3e4e04006860ced7dd961dc31.1556224658.git.thinhn@synopsys.com> (raw) Message-ID: <20190425205530.YVCsK8Az0pX_9KBzsclZE8HW6p0RnrLFInG9_S273UE@z> (raw) In-Reply-To: <63e615de8c5fde68c036f847c65547ce7bf6c45a.1556224658.git.thinhn@synopsys.com> The macro name DWC3_DCTL_LPM_ERRATA is uninformative and does not do masking. Remove DWC3_DCTL_LPM_ERRATA_MASK and rename DWC3_DCTL_LPM_ERRATA to DWC3_DCTL_NYET_THRES with proper masking. Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> --- drivers/usb/dwc3/core.h | 3 +-- drivers/usb/dwc3/gadget.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 1528d395b156..f19cbeb01087 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -406,8 +406,7 @@ #define DWC3_DCTL_TRGTULST_SS_INACT (DWC3_DCTL_TRGTULST(6)) /* These apply for core versions 1.94a and later */ -#define DWC3_DCTL_LPM_ERRATA_MASK DWC3_DCTL_LPM_ERRATA(0xf) -#define DWC3_DCTL_LPM_ERRATA(n) ((n) << 20) +#define DWC3_DCTL_NYET_THRES(n) (((n) & 0xf) << 20) #define DWC3_DCTL_KEEP_CONNECT BIT(19) #define DWC3_DCTL_L1_HIBER_EN BIT(18) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2bb0ff9608d3..1d808d15e886 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2863,7 +2863,7 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) "LPM Erratum not available on dwc3 revisions < 2.40a\n"); if (dwc->has_lpm_erratum && dwc->revision >= DWC3_REVISION_240A) - reg |= DWC3_DCTL_LPM_ERRATA(dwc->lpm_nyet_threshold); + reg |= DWC3_DCTL_NYET_THRES(dwc->lpm_nyet_threshold); dwc3_writel(dwc->regs, DWC3_DCTL, reg); } else { -- 2.11.0
next reply other threads:[~2019-04-25 20:55 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-25 20:55 Thinh Nguyen [this message] 2019-04-25 20:55 ` [PATCH 2/2] usb: dwc3: Rename DWC3_DCTL_LPM_ERRATA Thinh Nguyen -- strict thread matches above, loose matches on Subject: below -- 2019-04-25 20:55 [PATCH 1/2] usb: dwc3: Fix default lpm_nyet_threshold value Thinh Nguyen 2019-04-25 20:55 ` [1/2] " Thinh Nguyen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=3745c5e48536b2d3e4e04006860ced7dd961dc31.1556224658.git.thinhn@synopsys.com \ --to=thinh.nguyen@synopsys.com \ --cc=John.Youn@synopsys.com \ --cc=balbi@kernel.org \ --cc=linux-usb@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.