mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	"srk@ti.com" <srk@ti.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] usb: dwc3: dwc3-am62: Re-initialize controller if lost power in PM suspend
Date: Thu, 12 Dec 2024 14:06:30 +0200	[thread overview]
Message-ID: <6ccbf7a8-21d3-4de7-b60d-cc51de323712@kernel.org> (raw)
In-Reply-To: <20241210225840.r22ds7g3rt4zelnq@synopsys.com>



On 11/12/2024 00:58, Thinh Nguyen wrote:
> On Mon, Dec 09, 2024, Roger Quadros wrote:
>> If controller looses power during PM suspend then re-initialize
>> it. We use the DEBUG_CFG register to track if controller lost power
>> or was reset in PM suspend.
>>
>> Move all initialization code into dwc3_ti_init() so it can be re-used.
>>
>> Signed-off-by: Roger Quadros <rogerq@kernel.org>
>> ---
>> Changes in v2:
>> - fixed macro USBSS_DEBUG_CFG_OFF to 0
>> - Link to v1: https://urldefense.com/v3/__https://lore.kernel.org/r/20241122-am62-dwc3-io-ddr-v1-1-cc4956449420@kernel.org__;!!A4F2R9G_pg!fQlfE8tlmLW59YBhswZnfOSf_zypGRcqWV312B5A0NF0rLaOFPvTkWaPzCoKpz9E-2iihXpR87fFTrfubb-v$ 
>> ---
>>  drivers/usb/dwc3/dwc3-am62.c | 82 +++++++++++++++++++++++++++++---------------
>>  1 file changed, 55 insertions(+), 27 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
>> index 5e3d1741701f..7eef945b1f89 100644
>> --- a/drivers/usb/dwc3/dwc3-am62.c
>> +++ b/drivers/usb/dwc3/dwc3-am62.c
>> @@ -108,6 +108,9 @@
>>  
>>  #define DWC3_AM62_AUTOSUSPEND_DELAY	100
>>  
>> +#define USBSS_DEBUG_CFG_OFF		0x0
>> +#define USBSS_DEBUG_CFG_DISABLED	0x7
>> +
>>  struct dwc3_am62 {
>>  	struct device *dev;
>>  	void __iomem *usbss;
>> @@ -117,6 +120,7 @@ struct dwc3_am62 {
>>  	unsigned int offset;
>>  	unsigned int vbus_divider;
>>  	u32 wakeup_stat;
>> +	void __iomem *phy;
> 
> This is an odd way to name the iomem. I would associate "phy" to a
> device more than an iomem. How about phy_regs?
> 
> In any case, it's just minor nit. Regardless whether you want to rename
> it or not:

I agree with you that it is better to rename. I'll post a v3 soon.

> 
> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> 
> BR,
> Thinh

-- 
cheers,
-roger


      reply	other threads:[~2024-12-12 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 13:44 Roger Quadros
2024-12-10 22:58 ` Thinh Nguyen
2024-12-12 12:06   ` Roger Quadros [this message]

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=6ccbf7a8-21d3-4de7-b60d-cc51de323712@kernel.org \
    --to=rogerq@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=srk@ti.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®