linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] usb: dwc3: Add Keystone specific glue layer
Date: Thu, 12 Dec 2013 13:41:52 -0600	[thread overview]
Message-ID: <20131212194152.GQ1939@saruman.home> (raw)
In-Reply-To: <52AA1021.2010505@ti.com>

On Thu, Dec 12, 2013 at 02:36:01PM -0500, Santosh Shilimkar wrote:
> On Thursday 12 December 2013 12:48 PM, Felipe Balbi wrote:
> > Hi,
> > 
> > On Tue, Dec 10, 2013 at 10:11:36AM -0500, Santosh Shilimkar wrote:
> >>>> +static int kdwc3_remove(struct platform_device *pdev)
> >>>> +{
> >>>> +	struct dwc3_keystone *kdwc = platform_get_drvdata(pdev);
> >>>> +
> >>>> +	kdwc3_disable_irqs(kdwc);
> >>>> +	clk_disable_unprepare(kdwc->clk);
> >>>
> >>> I hope the clock isn't shared between core and wrapper, otherwise you
> >>> could run into some troubles here. Can you confirm ?
> >>>
> >> Yes. the clock isn't shared. Thanks for taking care of other parts.
> > 
> > so clock for core is always running too ?
> > 
> I take that back. The clock is actually common so we should disable
> it after removing the  kdwc3_remove_core() as you suggested.
> 
> You won't see issue since the  kdwc3_remove_core() not doing
> any register access but moving the clock disable after
> the core remove is right thing to do.

the problem is not kdwc3_remove_core() accessing registers, but
dwc3_remove() _does_ access registers during remove. If you just
mopdrobe -r dwc3-keystone without removing dwc3.ko first, then
kdwc3_remove_core() will cause dwc3.ko to be removed (because of
platform_driver_unregister()) and, since clocks have already been
disabled, then we'd die :-)

cheers

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131212/fe9d8c4c/attachment.sig>

  reply	other threads:[~2013-12-12 19:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 22:17 [PATCH v3 0/2] Kesytone II USB host and PHY drivers WingMan Kwok
2013-12-09 22:17 ` [PATCH v3 1/2] usb: dwc3: Add Keystone specific glue layer WingMan Kwok
2013-12-10  2:51   ` Felipe Balbi
2013-12-10 15:11     ` Santosh Shilimkar
2013-12-12 17:48       ` Felipe Balbi
2013-12-12 19:36         ` Santosh Shilimkar
2013-12-12 19:41           ` Felipe Balbi [this message]
2013-12-12 19:52             ` Santosh Shilimkar
2013-12-09 22:17 ` [PATCH v3 2/2] usb: phy: Add keystone usb phy driver WingMan Kwok
2013-12-10  2:54   ` Felipe Balbi
2013-12-10 15:14     ` Santosh Shilimkar
2013-12-12 17:20       ` Kwok, WingMan
2013-12-12 17:47         ` Felipe Balbi
2013-12-10  3:09   ` Roger Quadros
2013-12-12 17:24     ` Kwok, WingMan
2013-12-10  4:47   ` Felipe Balbi
2013-12-10 15:17     ` Santosh Shilimkar

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=20131212194152.GQ1939@saruman.home \
    --to=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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: 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;
as well as URLs for NNTP newsgroup(s).