All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Linux USB Mailing List
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	Linux ARM Kernel Mailing List
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux OMAP Mailing List
	<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	w-kwok2-l0cyMroinI0@public.gmane.org,
	Santosh Shilimkar
	<santosh.shilimkar-l0cyMroinI0@public.gmane.org>,
	Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Subject: [PATCH 5/7] usb: dwc3: omap: fix order of pm_runtime vs child removal
Date: Thu, 12 Dec 2013 15:38:43 -0600	[thread overview]
Message-ID: <1386884325-11440-6-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1386884325-11440-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>

pm_runtime_put_sync() will kill dwc3's clocks and,
since dwc3 core accesses registers during removal,
we must make sure to unregister core before
disabling clocks and pm_runtime.

Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
---
 drivers/usb/dwc3/dwc3-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 076bb28..a9090a1 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -580,9 +580,9 @@ static int dwc3_omap_remove(struct platform_device *pdev)
 	if (omap->extcon_id_dev.edev)
 		extcon_unregister_interest(&omap->extcon_id_dev);
 	dwc3_omap_disable_irqs(omap);
+	device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-	device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
 
 	return 0;
 }
-- 
1.8.4.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] usb: dwc3: omap: fix order of pm_runtime vs child removal
Date: Thu, 12 Dec 2013 15:38:43 -0600	[thread overview]
Message-ID: <1386884325-11440-6-git-send-email-balbi@ti.com> (raw)
In-Reply-To: <1386884325-11440-1-git-send-email-balbi@ti.com>

pm_runtime_put_sync() will kill dwc3's clocks and,
since dwc3 core accesses registers during removal,
we must make sure to unregister core before
disabling clocks and pm_runtime.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/dwc3/dwc3-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 076bb28..a9090a1 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -580,9 +580,9 @@ static int dwc3_omap_remove(struct platform_device *pdev)
 	if (omap->extcon_id_dev.edev)
 		extcon_unregister_interest(&omap->extcon_id_dev);
 	dwc3_omap_disable_irqs(omap);
+	device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
-	device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core);
 
 	return 0;
 }
-- 
1.8.4.GIT

  parent reply	other threads:[~2013-12-12 21:38 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 21:38 [PATCH 0/7] usb: dwc3: pm_runtime implementation Felipe Balbi
2013-12-12 21:38 ` Felipe Balbi
2013-12-12 21:38 ` [PATCH 1/7] usb: dwc3: keystone: add basic PM support Felipe Balbi
2013-12-12 21:38   ` Felipe Balbi
2013-12-12 21:43   ` Felipe Balbi
2013-12-12 21:43     ` Felipe Balbi
2013-12-12 21:45     ` [PATCH v2 " Felipe Balbi
2013-12-12 21:45       ` Felipe Balbi
2013-12-12 21:48       ` Felipe Balbi
2013-12-12 21:48         ` Felipe Balbi
2013-12-13  0:29       ` Santosh Shilimkar
2013-12-13  0:29         ` Santosh Shilimkar
2013-12-13  0:43         ` Felipe Balbi
2013-12-13  0:43           ` Felipe Balbi
2013-12-13 23:15           ` Santosh Shilimkar
2013-12-13 23:15             ` Santosh Shilimkar
     [not found]         ` <52AA54E4.5000606-l0cyMroinI0@public.gmane.org>
2013-12-13 16:04           ` Kwok, WingMan
2013-12-13 16:04             ` Kwok, WingMan
2013-12-13 19:54             ` Felipe Balbi
2013-12-13 19:54               ` Felipe Balbi
2013-12-13 20:18               ` Kwok, WingMan
2013-12-13 20:18                 ` Kwok, WingMan
2013-12-13 20:22                 ` Felipe Balbi
2013-12-13 20:22                   ` Felipe Balbi
2013-12-13 21:26                   ` Kwok, WingMan
2013-12-13 21:26                     ` Kwok, WingMan
2013-12-12 21:38 ` [PATCH 2/7] usb: dwc3: omap: add basic pm_runtime support Felipe Balbi
2013-12-12 21:38   ` Felipe Balbi
2013-12-12 21:38 ` [PATCH 4/7] usb: dwc3: omap: fix pm_runtime usage Felipe Balbi
2013-12-12 21:38   ` Felipe Balbi
     [not found] ` <1386884325-11440-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-12-12 21:38   ` [PATCH 3/7] usb: dwc3: pci: add pm_runtime support Felipe Balbi
2013-12-12 21:38     ` Felipe Balbi
2013-12-13  1:56     ` David Cohen
2013-12-13  1:56       ` David Cohen
2013-12-13  4:17       ` Felipe Balbi
2013-12-13  4:17         ` Felipe Balbi
2013-12-13  4:29         ` David Cohen
2013-12-13  4:29           ` David Cohen
2013-12-12 21:38   ` Felipe Balbi [this message]
2013-12-12 21:38     ` [PATCH 5/7] usb: dwc3: omap: fix order of pm_runtime vs child removal Felipe Balbi
2013-12-17 23:31   ` [PATCH 0/7] usb: dwc3: pm_runtime implementation David Cohen
2013-12-17 23:31     ` David Cohen
2013-12-17 23:35     ` David Cohen
2013-12-17 23:35       ` David Cohen
2013-12-18 15:36       ` Felipe Balbi
2013-12-18 15:36         ` Felipe Balbi
2013-12-18 15:40         ` Felipe Balbi
2013-12-18 15:40           ` Felipe Balbi
2013-12-12 21:38 ` [PATCH 6/7] usb: dwc3: exynos: remove DEV_PM_OPS hackery Felipe Balbi
2013-12-12 21:38   ` Felipe Balbi
2013-12-12 21:38 ` [PATCH 7/7] usb: dwc3: exynos: add pm_runtime support Felipe Balbi
2013-12-12 21:38   ` Felipe Balbi
2013-12-13  5:01   ` Anton Tikhomirov
2013-12-13  5:01     ` Anton Tikhomirov
2013-12-13 19:56     ` Felipe Balbi
2013-12-13 19:56       ` Felipe Balbi
2013-12-13 20:18       ` Felipe Balbi
2013-12-13 20:18         ` Felipe Balbi
2013-12-16  2:47         ` Anton Tikhomirov
2013-12-16  2:47           ` Anton Tikhomirov
     [not found]       ` <20131213195618.GG5292-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2013-12-16  2:31         ` Anton Tikhomirov
2013-12-16  2:31           ` Anton Tikhomirov

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=1386884325-11440-6-git-send-email-balbi@ti.com \
    --to=balbi-l0cymroini0@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=santosh.shilimkar-l0cyMroinI0@public.gmane.org \
    --cc=w-kwok2-l0cyMroinI0@public.gmane.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 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.