* [PATCH] mfd: Fix usbhs_enable error handling
@ 2011-04-21 14:22 Keshava Munegowda
[not found] ` <1303395763-8702-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 21+ messages in thread
From: Keshava Munegowda @ 2011-04-21 14:22 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA
Cc: Keshava Munegowda, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0,
p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w,
johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw
From: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
In the case of missing platform_data we do not hold a spin_lock,
thus we should not call spin_unlock_irqrestore in the error path.
Also simplify the error handling by separating the successful path
from error path. I think this change improves readability.
Signed-off-by: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/mfd/omap-usb-host.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 53450f4..b3bb3ac 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -700,8 +700,7 @@ static int usbhs_enable(struct device *dev)
dev_dbg(dev, "starting TI HSUSB Controller\n");
if (!pdata) {
dev_dbg(dev, "missing platform_data\n");
- ret = -ENODEV;
- goto end_enable;
+ return -ENODEV;
}
spin_lock_irqsave(&omap->lock, flags);
@@ -915,7 +914,8 @@ static int usbhs_enable(struct device *dev)
end_count:
omap->count++;
- goto end_enable;
+ spin_unlock_irqrestore(&omap->lock, flags);
+ return 0;
err_tll:
if (pdata->ehci_data->phy_reset) {
@@ -931,8 +931,6 @@ err_tll:
clk_disable(omap->usbhost_fs_fck);
clk_disable(omap->usbhost_hs_fck);
clk_disable(omap->usbhost_ick);
^ permalink raw reply related [flat|nested] 21+ messages in thread[parent not found: <1303395763-8702-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>]
* [PATCH] omap:usb: fixing ehci phy gpio values for omap3 [not found] ` <1303395763-8702-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> @ 2011-04-21 14:22 ` Keshava Munegowda [not found] ` <1303395763-8702-2-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> 2011-05-02 9:38 ` Felipe Balbi 2011-04-26 8:58 ` [PATCH] mfd: Fix usbhs_enable error handling Felipe Balbi 2011-05-02 9:37 ` Felipe Balbi 2 siblings, 2 replies; 21+ messages in thread From: Keshava Munegowda @ 2011-04-21 14:22 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA Cc: Keshava Munegowda, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw, Keshava Munegowda From: Keshava Munegowda <Keshava_mgowda-l0cyMroinI0@public.gmane.org> The gpio of EHCI phy should be 0 instead of 1; This fixes the hub enumeration issue in beagle xm board. Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> --- drivers/mfd/omap-usb-host.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index b3bb3ac..a12202e 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -718,14 +718,14 @@ static int usbhs_enable(struct device *dev) gpio_request(pdata->ehci_data->reset_gpio_port[0], "USB1 PHY reset"); gpio_direction_output - (pdata->ehci_data->reset_gpio_port[0], 1); + (pdata->ehci_data->reset_gpio_port[0], 0); } if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) { gpio_request(pdata->ehci_data->reset_gpio_port[1], "USB2 PHY reset"); gpio_direction_output - (pdata->ehci_data->reset_gpio_port[1], 1); + (pdata->ehci_data->reset_gpio_port[1], 0); } /* Hold the PHY in RESET for enough time till DIR is high */ @@ -905,11 +905,11 @@ static int usbhs_enable(struct device *dev) if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) gpio_set_value - (pdata->ehci_data->reset_gpio_port[0], 0); + (pdata->ehci_data->reset_gpio_port[0], 1); if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) gpio_set_value - (pdata->ehci_data->reset_gpio_port[1], 0); + (pdata->ehci_data->reset_gpio_port[1], 1); } end_count: -- 1.6.0.4 -- 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 ^ permalink raw reply related [flat|nested] 21+ messages in thread
[parent not found: <1303395763-8702-2-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>]
* [PATCH] omap:usb: add regulator support for EHCI [not found] ` <1303395763-8702-2-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> @ 2011-04-21 14:22 ` Keshava Munegowda [not found] ` <1303395763-8702-3-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> 2011-04-26 13:40 ` [PATCH] omap:usb: fixing ehci phy gpio values for omap3 Menon, Nishanth 1 sibling, 1 reply; 21+ messages in thread From: Keshava Munegowda @ 2011-04-21 14:22 UTC (permalink / raw) To: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA Cc: Keshava Munegowda, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw, Keshava Munegowda From: Keshava Munegowda <Keshava_mgowda-l0cyMroinI0@public.gmane.org> in case of ehci phy mode; regulator of phy should be enabled before initializing the usbhs core driver. Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> --- drivers/mfd/omap-usb-host.c | 1 - drivers/usb/host/ehci-omap.c | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index a12202e..3ab9ffa 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -25,7 +25,6 @@ #include <linux/dma-mapping.h> #include <linux/spinlock.h> #include <linux/gpio.h> -#include <linux/regulator/consumer.h> #include <plat/usb.h> #define USBHS_DRIVER_NAME "usbhs-omap" diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 7e41a95..627f3a6 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -40,6 +40,7 @@ #include <linux/slab.h> #include <linux/usb/ulpi.h> #include <plat/usb.h> +#include <linux/regulator/consumer.h> /* EHCI Register Set */ #define EHCI_INSNREG04 (0xA0) @@ -118,6 +119,8 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) struct ehci_hcd *omap_ehci; int ret = -ENODEV; int irq; + int i; + char supply[7]; if (usb_disabled()) return -ENODEV; @@ -158,6 +161,23 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) hcd->rsrc_len = resource_size(res); hcd->regs = regs; + /* get ehci regulator and enable */ + for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { + if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) { + pdata->regulator[i] = NULL; + continue; + } + snprintf(supply, sizeof(supply), "hsusb%d", i); + pdata->regulator[i] = regulator_get(dev, supply); + if (IS_ERR(pdata->regulator[i])) { + pdata->regulator[i] = NULL; + dev_dbg(dev, + "failed to get ehci port%d regulator\n", i); + } else { + regulator_enable(pdata->regulator[i]); + } + } + ret = omap_usbhs_enable(dev); if (ret) { dev_err(dev, "failed to start usbhs with err %d\n", ret); -- 1.6.0.4 -- 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 ^ permalink raw reply related [flat|nested] 21+ messages in thread
[parent not found: <1303395763-8702-3-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH] omap:usb: add regulator support for EHCI [not found] ` <1303395763-8702-3-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> @ 2011-05-02 9:38 ` Felipe Balbi 0 siblings, 0 replies; 21+ messages in thread From: Felipe Balbi @ 2011-05-02 9:38 UTC (permalink / raw) To: Keshava Munegowda Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Thu, Apr 21, 2011 at 07:52:43PM +0530, Keshava Munegowda wrote: > From: Keshava Munegowda <Keshava_mgowda-l0cyMroinI0@public.gmane.org> > > in case of ehci phy mode; regulator of phy > should be enabled before initializing the > usbhs core driver. > > Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> applied, thanks -- balbi -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] omap:usb: fixing ehci phy gpio values for omap3 [not found] ` <1303395763-8702-2-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> 2011-04-21 14:22 ` [PATCH] omap:usb: add regulator support for EHCI Keshava Munegowda @ 2011-04-26 13:40 ` Menon, Nishanth [not found] ` <BANLkTi=fQCRAST1DvJEAnznNnySCv55Yag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 1 reply; 21+ messages in thread From: Menon, Nishanth @ 2011-04-26 13:40 UTC (permalink / raw) To: Keshava Munegowda Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Thu, Apr 21, 2011 at 09:22, Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> wrote: > > From: Keshava Munegowda <Keshava_mgowda-l0cyMroinI0@public.gmane.org> > > The gpio of EHCI phy should be 0 instead of 1; > This fixes the hub enumeration issue in beagle xm board. > > Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> Dumb q1: Has this been tested on PandaBoard? Dumb q2: is'nt it better to introduce polarity e.g. pdata->ehci_data->reset_gpio_polarity etc? this will allow board files to describe polarity of pin information to driver which can then be Phy and any board specific mods(e.g. inverter on the line) independent completely.. Regards, Nishanth Menon > --- > drivers/mfd/omap-usb-host.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c > index b3bb3ac..a12202e 100644 > --- a/drivers/mfd/omap-usb-host.c > +++ b/drivers/mfd/omap-usb-host.c > @@ -718,14 +718,14 @@ static int usbhs_enable(struct device *dev) > gpio_request(pdata->ehci_data->reset_gpio_port[0], > "USB1 PHY reset"); > gpio_direction_output > - (pdata->ehci_data->reset_gpio_port[0], 1); > + (pdata->ehci_data->reset_gpio_port[0], 0); > } > > if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) { > gpio_request(pdata->ehci_data->reset_gpio_port[1], > "USB2 PHY reset"); > gpio_direction_output > - (pdata->ehci_data->reset_gpio_port[1], 1); > + (pdata->ehci_data->reset_gpio_port[1], 0); > } > > /* Hold the PHY in RESET for enough time till DIR is high */ > @@ -905,11 +905,11 @@ static int usbhs_enable(struct device *dev) > > if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) > gpio_set_value > - (pdata->ehci_data->reset_gpio_port[0], 0); > + (pdata->ehci_data->reset_gpio_port[0], 1); > > if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) > gpio_set_value > - (pdata->ehci_data->reset_gpio_port[1], 0); > + (pdata->ehci_data->reset_gpio_port[1], 1); > } > > end_count: > -- > 1.6.0.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <BANLkTi=fQCRAST1DvJEAnznNnySCv55Yag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] omap:usb: fixing ehci phy gpio values for omap3 [not found] ` <BANLkTi=fQCRAST1DvJEAnznNnySCv55Yag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2011-04-27 5:52 ` Munegowda, Keshava [not found] ` <BANLkTi=apB0cZpgzFjHKuArrxkQX5W7deQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 21+ messages in thread From: Munegowda, Keshava @ 2011-04-27 5:52 UTC (permalink / raw) To: Menon, Nishanth Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Tue, Apr 26, 2011 at 7:10 PM, Menon, Nishanth <nm-l0cyMroinI0@public.gmane.org> wrote: > On Thu, Apr 21, 2011 at 09:22, Keshava Munegowda <keshava_mgowda@ti.com> wrote: >> >> From: Keshava Munegowda <Keshava_mgowda-l0cyMroinI0@public.gmane.org> >> >> The gpio of EHCI phy should be 0 instead of 1; >> This fixes the hub enumeration issue in beagle xm board. >> >> Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> > > Dumb q1: Has this been tested on PandaBoard? No, I have tested this on 4430 sdp . I think sdp validation is sufficient > Dumb q2: is'nt it better to introduce polarity e.g. > pdata->ehci_data->reset_gpio_polarity etc? this will allow board files > to describe polarity of pin information to driver which can then be > Phy and any board specific mods(e.g. inverter on the line) independent > completely.. yes, I am thinking of doing it; since it requires modification of all board files; I will send this an another separate patch. keshava munegowda > > Regards, > Nishanth Menon > >> --- >> drivers/mfd/omap-usb-host.c | 8 ++++---- >> 1 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c >> index b3bb3ac..a12202e 100644 >> --- a/drivers/mfd/omap-usb-host.c >> +++ b/drivers/mfd/omap-usb-host.c >> @@ -718,14 +718,14 @@ static int usbhs_enable(struct device *dev) >> gpio_request(pdata->ehci_data->reset_gpio_port[0], >> "USB1 PHY reset"); >> gpio_direction_output >> - (pdata->ehci_data->reset_gpio_port[0], 1); >> + (pdata->ehci_data->reset_gpio_port[0], 0); >> } >> >> if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) { >> gpio_request(pdata->ehci_data->reset_gpio_port[1], >> "USB2 PHY reset"); >> gpio_direction_output >> - (pdata->ehci_data->reset_gpio_port[1], 1); >> + (pdata->ehci_data->reset_gpio_port[1], 0); >> } >> >> /* Hold the PHY in RESET for enough time till DIR is high */ >> @@ -905,11 +905,11 @@ static int usbhs_enable(struct device *dev) >> >> if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) >> gpio_set_value >> - (pdata->ehci_data->reset_gpio_port[0], 0); >> + (pdata->ehci_data->reset_gpio_port[0], 1); >> >> if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) >> gpio_set_value >> - (pdata->ehci_data->reset_gpio_port[1], 0); >> + (pdata->ehci_data->reset_gpio_port[1], 1); >> } >> >> end_count: >> -- >> 1.6.0.4 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in >> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <BANLkTi=apB0cZpgzFjHKuArrxkQX5W7deQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] omap:usb: fixing ehci phy gpio values for omap3 [not found] ` <BANLkTi=apB0cZpgzFjHKuArrxkQX5W7deQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2011-04-27 7:58 ` Felipe Balbi [not found] ` <20110427075843.GS13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> 0 siblings, 1 reply; 21+ messages in thread From: Felipe Balbi @ 2011-04-27 7:58 UTC (permalink / raw) To: Munegowda, Keshava Cc: Menon, Nishanth, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw Hi, On Wed, Apr 27, 2011 at 11:22:03AM +0530, Munegowda, Keshava wrote: > > Dumb q2: is'nt it better to introduce polarity e.g. > > pdata->ehci_data->reset_gpio_polarity etc? this will allow board files > > to describe polarity of pin information to driver which can then be > > Phy and any board specific mods(e.g. inverter on the line) independent > > completely.. > > yes, I am thinking of doing it; since it requires modification of all > board files; > I will send this an another separate patch. Sure, for next merge window. -- balbi -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <20110427075843.GS13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>]
* Re: [PATCH] omap:usb: fixing ehci phy gpio values for omap3 [not found] ` <20110427075843.GS13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> @ 2011-04-27 8:26 ` Munegowda, Keshava 0 siblings, 0 replies; 21+ messages in thread From: Munegowda, Keshava @ 2011-04-27 8:26 UTC (permalink / raw) To: balbi-l0cyMroinI0 Cc: Menon, Nishanth, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Wed, Apr 27, 2011 at 1:28 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote: > Hi, > > On Wed, Apr 27, 2011 at 11:22:03AM +0530, Munegowda, Keshava wrote: >> > Dumb q2: is'nt it better to introduce polarity e.g. >> > pdata->ehci_data->reset_gpio_polarity etc? this will allow board files >> > to describe polarity of pin information to driver which can then be >> > Phy and any board specific mods(e.g. inverter on the line) independent >> > completely.. >> >> yes, I am thinking of doing it; since it requires modification of all >> board files; >> I will send this an another separate patch. > > Sure, for next merge window. > > -- > balbi yes balbi, I will do this patch after the rebaseing and validating the runtime pm patches to latest mainline kernel keshava -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] omap:usb: fixing ehci phy gpio values for omap3 2011-04-21 14:22 ` [PATCH] omap:usb: fixing ehci phy gpio values for omap3 Keshava Munegowda [not found] ` <1303395763-8702-2-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> @ 2011-05-02 9:38 ` Felipe Balbi [not found] ` <20110502093815.GQ2529-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> 1 sibling, 1 reply; 21+ messages in thread From: Felipe Balbi @ 2011-05-02 9:38 UTC (permalink / raw) To: Keshava Munegowda Cc: linux-usb, linux-omap, balbi, gadiyar, p-basak2, axel.lin, johnstul, mpfj-list On Thu, Apr 21, 2011 at 07:52:42PM +0530, Keshava Munegowda wrote: > From: Keshava Munegowda <Keshava_mgowda@ti.com> > > The gpio of EHCI phy should be 0 instead of 1; > This fixes the hub enumeration issue in beagle xm board. > > Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> applied, thanks -- balbi ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <20110502093815.GQ2529-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>]
* Re: [PATCH] omap:usb: fixing ehci phy gpio values for omap3 [not found] ` <20110502093815.GQ2529-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> @ 2011-05-02 11:31 ` Munegowda, Keshava [not found] ` <BANLkTi=kH02P9GFo6wmPpRGr=L582DEp0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 21+ messages in thread From: Munegowda, Keshava @ 2011-05-02 11:31 UTC (permalink / raw) To: balbi-l0cyMroinI0 Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Mon, May 2, 2011 at 3:08 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote: > On Thu, Apr 21, 2011 at 07:52:42PM +0530, Keshava Munegowda wrote: >> From: Keshava Munegowda <Keshava_mgowda-l0cyMroinI0@public.gmane.org> >> >> The gpio of EHCI phy should be 0 instead of 1; >> This fixes the hub enumeration issue in beagle xm board. >> >> Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> > > applied, thanks > > -- > balbi Thanks balbi but ,.his patch is was made by Juergen Kilb ( patch description and link is given below); But I was not aware of it and reinvented wheel with beagle-xm board :( So, Juergen Kilb is the first author of this patch. Here is the link : http://www.mail-archive.com/linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg48215.html omap:usbhs:Fixed gpio polarity of gpio USB-phy reset With commit 19403165 a main part of ehci-omap.c moved to drivers/mfd/omap-usb-host.c created by commit 17cdd29d. Due to this reorganisation the polarity used to reset the external USB phy changed and USB host doesn't recognize any devices. Signed-off-by: Juergen Kilb <J.Kilb-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org> -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <BANLkTi=kH02P9GFo6wmPpRGr=L582DEp0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] omap:usb: fixing ehci phy gpio values for omap3 [not found] ` <BANLkTi=kH02P9GFo6wmPpRGr=L582DEp0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2011-05-02 11:54 ` Felipe Balbi 2011-05-02 12:23 ` Munegowda, Keshava 0 siblings, 1 reply; 21+ messages in thread From: Felipe Balbi @ 2011-05-02 11:54 UTC (permalink / raw) To: Munegowda, Keshava Cc: balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Mon, May 02, 2011 at 05:01:05PM +0530, Munegowda, Keshava wrote: > On Mon, May 2, 2011 at 3:08 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote: > > On Thu, Apr 21, 2011 at 07:52:42PM +0530, Keshava Munegowda wrote: > >> From: Keshava Munegowda <Keshava_mgowda-l0cyMroinI0@public.gmane.org> > >> > >> The gpio of EHCI phy should be 0 instead of 1; > >> This fixes the hub enumeration issue in beagle xm board. > >> > >> Signed-off-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> > > > > applied, thanks > > > > -- > > balbi > > Thanks balbi > > but ,.his patch is was made by Juergen Kilb ( patch description and link is > given below); But I was not aware of it and reinvented wheel with > beagle-xm board :( > > So, Juergen Kilb is the first author of this patch. > > Here is the link : > http://www.mail-archive.com/linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg48215.html > > omap:usbhs:Fixed gpio polarity of gpio USB-phy reset > > With commit 19403165 a main part of ehci-omap.c moved to > drivers/mfd/omap-usb-host.c created by commit 17cdd29d. > Due to this reorganisation the polarity used to reset the > external USB phy changed and USB host doesn't recognize > any devices. > > Signed-off-by: Juergen Kilb <J.Kilb-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org> I sent a pull request to Greg with that patch in, so it looks like Samuel also didn't send this patch before. Can you reply to the pull request I sent saying that this patch should be dropped just so Greg knows and I recreate the branch and send another pull request ? -- balbi -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] omap:usb: fixing ehci phy gpio values for omap3 2011-05-02 11:54 ` Felipe Balbi @ 2011-05-02 12:23 ` Munegowda, Keshava 0 siblings, 0 replies; 21+ messages in thread From: Munegowda, Keshava @ 2011-05-02 12:23 UTC (permalink / raw) To: balbi Cc: linux-usb, linux-omap, gadiyar, p-basak2, axel.lin, johnstul, mpfj-list On Mon, May 2, 2011 at 5:24 PM, Felipe Balbi <balbi@ti.com> wrote: > On Mon, May 02, 2011 at 05:01:05PM +0530, Munegowda, Keshava wrote: >> On Mon, May 2, 2011 at 3:08 PM, Felipe Balbi <balbi@ti.com> wrote: >> > On Thu, Apr 21, 2011 at 07:52:42PM +0530, Keshava Munegowda wrote: >> >> From: Keshava Munegowda <Keshava_mgowda@ti.com> >> >> >> >> The gpio of EHCI phy should be 0 instead of 1; >> >> This fixes the hub enumeration issue in beagle xm board. >> >> >> >> Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> >> > >> > applied, thanks >> > >> > -- >> > balbi >> >> Thanks balbi >> >> but ,.his patch is was made by Juergen Kilb ( patch description and link is >> given below); But I was not aware of it and reinvented wheel with >> beagle-xm board :( >> >> So, Juergen Kilb is the first author of this patch. >> >> Here is the link : >> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg48215.html >> >> omap:usbhs:Fixed gpio polarity of gpio USB-phy reset >> >> With commit 19403165 a main part of ehci-omap.c moved to >> drivers/mfd/omap-usb-host.c created by commit 17cdd29d. >> Due to this reorganisation the polarity used to reset the >> external USB phy changed and USB host doesn't recognize >> any devices. >> >> Signed-off-by: Juergen Kilb <J.Kilb@phytec.de> > > I sent a pull request to Greg with that patch in, so it looks like > Samuel also didn't send this patch before. Can you reply to the pull > request I sent saying that this patch should be dropped just so Greg > knows and I recreate the branch and send another pull request ? > > -- > balbi yes Balbi, I have send a mail to Greg. once again, I am sorry , this patch came in 14th april and i was returning from ELC-2011. I missed it. regards keshava -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] mfd: Fix usbhs_enable error handling [not found] ` <1303395763-8702-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> 2011-04-21 14:22 ` [PATCH] omap:usb: fixing ehci phy gpio values for omap3 Keshava Munegowda @ 2011-04-26 8:58 ` Felipe Balbi [not found] ` <20110426085846.GI13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> 2011-05-02 9:37 ` Felipe Balbi 2 siblings, 1 reply; 21+ messages in thread From: Felipe Balbi @ 2011-04-26 8:58 UTC (permalink / raw) To: Keshava Munegowda Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw Hi, On Thu, Apr 21, 2011 at 07:52:41PM +0530, Keshava Munegowda wrote: > From: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > In the case of missing platform_data we do not hold a spin_lock, > thus we should not call spin_unlock_irqrestore in the error path. > > Also simplify the error handling by separating the successful path > from error path. I think this change improves readability. > > Signed-off-by: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Can someone give me a Tested-by so I can take these patches. -- balbi -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <20110426085846.GI13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>]
* RE: [PATCH] mfd: Fix usbhs_enable error handling [not found] ` <20110426085846.GI13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> @ 2011-04-26 9:02 ` Keshava Munegowda 2011-04-26 9:04 ` Felipe Balbi 0 siblings, 1 reply; 21+ messages in thread From: Keshava Munegowda @ 2011-04-26 9:02 UTC (permalink / raw) To: balbi-l0cyMroinI0 Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Anand Gadiyar, Partha Basak, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw > -----Original Message----- > From: Felipe Balbi [mailto:balbi-l0cyMroinI0@public.gmane.org] > Sent: Tuesday, April 26, 2011 2:29 PM > To: Keshava Munegowda > Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; balbi-l0cyMroinI0@public.gmane.org; gadiyar-l0cyMroinI0@public.gmane.org; p- > basak2-l0cyMroinI0@public.gmane.org; axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; johnstul-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org; mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw@public.gmane.org > Subject: Re: [PATCH] mfd: Fix usbhs_enable error handling > > Hi, > > On Thu, Apr 21, 2011 at 07:52:41PM +0530, Keshava Munegowda wrote: > > From: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > > In the case of missing platform_data we do not hold a spin_lock, > > thus we should not call spin_unlock_irqrestore in the error path. > > > > Also simplify the error handling by separating the successful path > > from error path. I think this change improves readability. > > > > Signed-off-by: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > Can someone give me a Tested-by so I can take these patches. > > -- > Balbi Hi Balbi I have validated this patch and it works :) Tested-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] mfd: Fix usbhs_enable error handling 2011-04-26 9:02 ` Keshava Munegowda @ 2011-04-26 9:04 ` Felipe Balbi [not found] ` <20110426090418.GJ13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> 0 siblings, 1 reply; 21+ messages in thread From: Felipe Balbi @ 2011-04-26 9:04 UTC (permalink / raw) To: Keshava Munegowda Cc: balbi, linux-usb, linux-omap, Anand Gadiyar, Partha Basak, axel.lin, johnstul, mpfj-list On Tue, Apr 26, 2011 at 02:32:04PM +0530, Keshava Munegowda wrote: > > -----Original Message----- > > From: Felipe Balbi [mailto:balbi@ti.com] > > Sent: Tuesday, April 26, 2011 2:29 PM > > To: Keshava Munegowda > > Cc: linux-usb@vger.kernel.org; linux-omap@vger.kernel.org; balbi@ti.com; > gadiyar@ti.com; p- > > basak2@ti.com; axel.lin@gmail.com; johnstul@us.ibm.com; > mpfj-list@mimc.co.uk > > Subject: Re: [PATCH] mfd: Fix usbhs_enable error handling > > > > Hi, > > > > On Thu, Apr 21, 2011 at 07:52:41PM +0530, Keshava Munegowda wrote: > > > From: Axel Lin <axel.lin@gmail.com> > > > > > > In the case of missing platform_data we do not hold a spin_lock, > > > thus we should not call spin_unlock_irqrestore in the error path. > > > > > > Also simplify the error handling by separating the successful path > > > from error path. I think this change improves readability. > > > > > > Signed-off-by: Axel Lin <axel.lin@gmail.com> > > > > Can someone give me a Tested-by so I can take these patches. > > > > -- > > Balbi > > Hi Balbi > > I have validated this patch and it works :) > > Tested-by: Keshava Munegowda <keshava_mgowda@ti.com> what about the others ? -- balbi ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <20110426090418.GJ13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>]
* Re: [PATCH] mfd: Fix usbhs_enable error handling [not found] ` <20110426090418.GJ13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> @ 2011-04-26 15:09 ` Steve Calfee [not found] ` <BANLkTi=NB5as-Kz8bSCvh3=KPQR1wwXUOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 21+ messages in thread From: Steve Calfee @ 2011-04-26 15:09 UTC (permalink / raw) To: balbi-l0cyMroinI0 Cc: Keshava Munegowda, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Anand Gadiyar, Partha Basak, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Tue, Apr 26, 2011 at 2:04 AM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote: > On Tue, Apr 26, 2011 at 02:32:04PM +0530, Keshava Munegowda wrote: >> > -----Original Message----- >> > From: Felipe Balbi [mailto:balbi-l0cyMroinI0@public.gmane.org] >> > Sent: Tuesday, April 26, 2011 2:29 PM >> > To: Keshava Munegowda >> > Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; balbi-l0cyMroinI0@public.gmane.org; >> gadiyar-l0cyMroinI0@public.gmane.org; p- >> > basak2-l0cyMroinI0@public.gmane.org; axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; johnstul-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org; >> mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw@public.gmane.org >> > Subject: Re: [PATCH] mfd: Fix usbhs_enable error handling >> > >> > Hi, >> > >> > On Thu, Apr 21, 2011 at 07:52:41PM +0530, Keshava Munegowda wrote: >> > > From: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > > >> > > In the case of missing platform_data we do not hold a spin_lock, >> > > thus we should not call spin_unlock_irqrestore in the error path. >> > > >> > > Also simplify the error handling by separating the successful path >> > > from error path. I think this change improves readability. >> > > >> > > Signed-off-by: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > >> > Can someone give me a Tested-by so I can take these patches. >> > >> > -- >> > Balbi >> >> Hi Balbi >> >> I have validated this patch and it works :) >> >> Tested-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> > > what about the others ? > > -- > balbi Hi Felipe, I responded on another thread. I tested this on a beagleboardxm on version 2.6.39-rc4 > Hi Keshava, > > I rebuilt my system to boot from flash and now I see what happened. I > even remember it being discussed on this list. Someone renamed my usb > ethernet device from usb0 to eth0 !!! The boot log shows it on this line: > > > [ 4.596130] smsc95xx 1-2.1:1.0: eth0: register 'smsc95xx' at > > usb-ehci-omap.0d > > > So this broke my init scripts and uboot script... OK, so I can live with > this (I hope the name doesn't change too often though). > > So I can manually configure my system to use eth0 and use the network. I > am sure I will get nfs working shortly. > > I am using the 2.6.39-rc4 with your 3 patches. So from the Beagleboard > XM perspective it works and you can include my > > Tested-by: Steve Calfee <stevecalfee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <BANLkTi=NB5as-Kz8bSCvh3=KPQR1wwXUOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] mfd: Fix usbhs_enable error handling [not found] ` <BANLkTi=NB5as-Kz8bSCvh3=KPQR1wwXUOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2011-04-26 19:34 ` Felipe Balbi [not found] ` <20110426193407.GR13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> 0 siblings, 1 reply; 21+ messages in thread From: Felipe Balbi @ 2011-04-26 19:34 UTC (permalink / raw) To: Steve Calfee Cc: balbi-l0cyMroinI0, Keshava Munegowda, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Anand Gadiyar, Partha Basak, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Tue, Apr 26, 2011 at 08:09:17AM -0700, Steve Calfee wrote: > On Tue, Apr 26, 2011 at 2:04 AM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> wrote: > > On Tue, Apr 26, 2011 at 02:32:04PM +0530, Keshava Munegowda wrote: > >> > -----Original Message----- > >> > From: Felipe Balbi [mailto:balbi-l0cyMroinI0@public.gmane.org] > >> > Sent: Tuesday, April 26, 2011 2:29 PM > >> > To: Keshava Munegowda > >> > Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; balbi-l0cyMroinI0@public.gmane.org; > >> gadiyar-l0cyMroinI0@public.gmane.org; p- > >> > basak2-l0cyMroinI0@public.gmane.org; axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; johnstul-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org; > >> mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw@public.gmane.org > >> > Subject: Re: [PATCH] mfd: Fix usbhs_enable error handling > >> > > >> > Hi, > >> > > >> > On Thu, Apr 21, 2011 at 07:52:41PM +0530, Keshava Munegowda wrote: > >> > > From: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> > > > >> > > In the case of missing platform_data we do not hold a spin_lock, > >> > > thus we should not call spin_unlock_irqrestore in the error path. > >> > > > >> > > Also simplify the error handling by separating the successful path > >> > > from error path. I think this change improves readability. > >> > > > >> > > Signed-off-by: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> > > >> > Can someone give me a Tested-by so I can take these patches. > >> > > >> > -- > >> > Balbi > >> > >> Hi Balbi > >> > >> I have validated this patch and it works :) > >> > >> Tested-by: Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org> > > > > what about the others ? > > > > -- > > balbi > > Hi Felipe, > > I responded on another thread. I tested this on a beagleboardxm on > version 2.6.39-rc4 care to reply to this one with your Tested-by so I add to all patches and queue them to Greg ? -- balbi -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <20110426193407.GR13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>]
* Re: [PATCH] mfd: Fix usbhs_enable error handling [not found] ` <20110426193407.GR13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org> @ 2011-04-26 20:57 ` Steve Calfee 0 siblings, 0 replies; 21+ messages in thread From: Steve Calfee @ 2011-04-26 20:57 UTC (permalink / raw) To: balbi-l0cyMroinI0 Cc: Keshava Munegowda, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Anand Gadiyar, Partha Basak, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On 04/26/11 12:34, Felipe Balbi wrote: > > care to reply to this one with your Tested-by so I add to all patches > and queue them to Greg ? > I just checked and these changes were part of the 3 patch set from Keshava, and from the Beagleboard XM perspective it works and you can include my Tested-by: Steve Calfee <stevecalfee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] mfd: Fix usbhs_enable error handling [not found] ` <1303395763-8702-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org> 2011-04-21 14:22 ` [PATCH] omap:usb: fixing ehci phy gpio values for omap3 Keshava Munegowda 2011-04-26 8:58 ` [PATCH] mfd: Fix usbhs_enable error handling Felipe Balbi @ 2011-05-02 9:37 ` Felipe Balbi 2 siblings, 0 replies; 21+ messages in thread From: Felipe Balbi @ 2011-05-02 9:37 UTC (permalink / raw) To: Keshava Munegowda Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0, gadiyar-l0cyMroinI0, p-basak2-l0cyMroinI0, axel.lin-Re5JQEeQqe8AvxtiuMwx3w, johnstul-r/Jw6+rmf7HQT0dZR+AlfA, mpfj-list-kZtEnBLzDKq1Qrn1Bg8BZw On Thu, Apr 21, 2011 at 07:52:41PM +0530, Keshava Munegowda wrote: > From: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > In the case of missing platform_data we do not hold a spin_lock, > thus we should not call spin_unlock_irqrestore in the error path. > > Also simplify the error handling by separating the successful path > from error path. I think this change improves readability. > > Signed-off-by: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> applied, thanks -- balbi -- 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
[parent not found: <1301393275.2253.7.camel@phoenix>]
* RE: [PATCH] mfd: Fix usbhs_enable error handling [not found] <1301393275.2253.7.camel@phoenix> @ 2011-03-29 10:35 ` Keshava Munegowda 2011-03-29 11:06 ` Felipe Balbi 0 siblings, 1 reply; 21+ messages in thread From: Keshava Munegowda @ 2011-03-29 10:35 UTC (permalink / raw) To: Axel Lin, linux-kernel, linux-usb, linux-omap; +Cc: Samuel Ortiz > -----Original Message----- > From: Axel Lin [mailto:axel.lin@gmail.com] > Sent: Tuesday, March 29, 2011 3:38 PM > To: linux-kernel@vger.kernel.org > Cc: Keshava Munegowda; Samuel Ortiz > Subject: [PATCH] mfd: Fix usbhs_enable error handling > > In the case of missing platform_data we do not hold a spin_lock, > thus we should not call spin_unlock_irqrestore in the error path. > > Also simplify the error handling by separating the successful path > from error path. I think this change improves readability. > > Signed-off-by: Axel Lin <axel.lin@gmail.com> > --- > drivers/mfd/omap-usb-host.c | 8 +++----- > 1 files changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c > index cb01209..4157d76 100644 > --- a/drivers/mfd/omap-usb-host.c > +++ b/drivers/mfd/omap-usb-host.c > @@ -700,8 +700,7 @@ static int usbhs_enable(struct device *dev) > dev_dbg(dev, "starting TI HSUSB Controller\n"); > if (!pdata) { > dev_dbg(dev, "missing platform_data\n"); > - ret = -ENODEV; > - goto end_enable; > + return -ENODEV; > } > > spin_lock_irqsave(&omap->lock, flags); > @@ -915,7 +914,8 @@ static int usbhs_enable(struct device *dev) > > end_count: > omap->count++; > - goto end_enable; > + spin_unlock_irqrestore(&omap->lock, flags); > + return 0; > > err_tll: > if (pdata->ehci_data->phy_reset) { > @@ -931,8 +931,6 @@ err_tll: > clk_disable(omap->usbhost_fs_fck); > clk_disable(omap->usbhost_hs_fck); > clk_disable(omap->usbhost_ick); > - > -end_enable: > spin_unlock_irqrestore(&omap->lock, flags); > return ret; > } > -- > 1.7.1 Thanks Axel! Acked-by: Keshava Munegowda < keshava_mgowda@ti.com> > ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] mfd: Fix usbhs_enable error handling 2011-03-29 10:35 ` Keshava Munegowda @ 2011-03-29 11:06 ` Felipe Balbi 0 siblings, 0 replies; 21+ messages in thread From: Felipe Balbi @ 2011-03-29 11:06 UTC (permalink / raw) To: Keshava Munegowda Cc: Axel Lin, linux-kernel, linux-usb, linux-omap, Samuel Ortiz On Tue, Mar 29, 2011 at 04:05:40PM +0530, Keshava Munegowda wrote: > > -----Original Message----- > > From: Axel Lin [mailto:axel.lin@gmail.com] > > Sent: Tuesday, March 29, 2011 3:38 PM > > To: linux-kernel@vger.kernel.org > > Cc: Keshava Munegowda; Samuel Ortiz > > Subject: [PATCH] mfd: Fix usbhs_enable error handling > > > > In the case of missing platform_data we do not hold a spin_lock, > > thus we should not call spin_unlock_irqrestore in the error path. > > > > Also simplify the error handling by separating the successful path > > from error path. I think this change improves readability. > > > > Signed-off-by: Axel Lin <axel.lin@gmail.com> > > --- > > drivers/mfd/omap-usb-host.c | 8 +++----- > > 1 files changed, 3 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c > > index cb01209..4157d76 100644 > > --- a/drivers/mfd/omap-usb-host.c > > +++ b/drivers/mfd/omap-usb-host.c > > @@ -700,8 +700,7 @@ static int usbhs_enable(struct device *dev) > > dev_dbg(dev, "starting TI HSUSB Controller\n"); > > if (!pdata) { > > dev_dbg(dev, "missing platform_data\n"); > > - ret = -ENODEV; > > - goto end_enable; > > + return -ENODEV; > > } > > > > spin_lock_irqsave(&omap->lock, flags); > > @@ -915,7 +914,8 @@ static int usbhs_enable(struct device *dev) > > > > end_count: > > omap->count++; > > - goto end_enable; > > + spin_unlock_irqrestore(&omap->lock, flags); > > + return 0; > > > > err_tll: > > if (pdata->ehci_data->phy_reset) { > > @@ -931,8 +931,6 @@ err_tll: > > clk_disable(omap->usbhost_fs_fck); > > clk_disable(omap->usbhost_hs_fck); > > clk_disable(omap->usbhost_ick); > > - > > -end_enable: > > spin_unlock_irqrestore(&omap->lock, flags); > > return ret; > > } > > -- > > 1.7.1 > > Thanks Axel! > Acked-by: Keshava Munegowda < keshava_mgowda@ti.com> Samuel, Greg is out for the week, could you take this one through your tree instead of waiting for a week until we get this fix merged. If you need my Ack, here it goes: Acked-by: Felipe Balbi <balbi@ti.com> -- balbi ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2011-05-02 12:29 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 14:22 [PATCH] mfd: Fix usbhs_enable error handling Keshava Munegowda
[not found] ` <1303395763-8702-1-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2011-04-21 14:22 ` [PATCH] omap:usb: fixing ehci phy gpio values for omap3 Keshava Munegowda
[not found] ` <1303395763-8702-2-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2011-04-21 14:22 ` [PATCH] omap:usb: add regulator support for EHCI Keshava Munegowda
[not found] ` <1303395763-8702-3-git-send-email-keshava_mgowda-l0cyMroinI0@public.gmane.org>
2011-05-02 9:38 ` Felipe Balbi
2011-04-26 13:40 ` [PATCH] omap:usb: fixing ehci phy gpio values for omap3 Menon, Nishanth
[not found] ` <BANLkTi=fQCRAST1DvJEAnznNnySCv55Yag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-27 5:52 ` Munegowda, Keshava
[not found] ` <BANLkTi=apB0cZpgzFjHKuArrxkQX5W7deQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-27 7:58 ` Felipe Balbi
[not found] ` <20110427075843.GS13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-04-27 8:26 ` Munegowda, Keshava
2011-05-02 9:38 ` Felipe Balbi
[not found] ` <20110502093815.GQ2529-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-05-02 11:31 ` Munegowda, Keshava
[not found] ` <BANLkTi=kH02P9GFo6wmPpRGr=L582DEp0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-02 11:54 ` Felipe Balbi
2011-05-02 12:23 ` Munegowda, Keshava
2011-04-26 8:58 ` [PATCH] mfd: Fix usbhs_enable error handling Felipe Balbi
[not found] ` <20110426085846.GI13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-04-26 9:02 ` Keshava Munegowda
2011-04-26 9:04 ` Felipe Balbi
[not found] ` <20110426090418.GJ13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-04-26 15:09 ` Steve Calfee
[not found] ` <BANLkTi=NB5as-Kz8bSCvh3=KPQR1wwXUOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-26 19:34 ` Felipe Balbi
[not found] ` <20110426193407.GR13227-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-04-26 20:57 ` Steve Calfee
2011-05-02 9:37 ` Felipe Balbi
[not found] <1301393275.2253.7.camel@phoenix>
2011-03-29 10:35 ` Keshava Munegowda
2011-03-29 11:06 ` Felipe Balbi
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).