* [PATCH 0/2] mfd: omap-usb-host: Minor omap-usb host fixes @ 2012-02-15 10:23 Govindraj.R 2012-02-15 10:23 ` [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask Govindraj.R ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Govindraj.R @ 2012-02-15 10:23 UTC (permalink / raw) To: Samuel Ortiz, linux-usb-u79uwXL29TY76Z2rM5mHXA Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Alan Stern, Govindraj.R From: "Govindraj.R" <govindraj.raja-l0cyMroinI0@public.gmane.org> Minor fixes, boot tested on panda with ehci enabled. Patches based on 3.3-rc3 Govindraj.R (2): mfd: omap-usb-host: Remove magic numbers for dev dma mask mfd: omap-usb-host: Move usbhs init before allocing child dev drivers/mfd/omap-usb-host.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) -- 1.7.5.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 [flat|nested] 8+ messages in thread
* [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask 2012-02-15 10:23 [PATCH 0/2] mfd: omap-usb-host: Minor omap-usb host fixes Govindraj.R @ 2012-02-15 10:23 ` Govindraj.R 2012-02-15 11:17 ` Felipe Balbi 2012-02-15 10:23 ` [PATCH 2/2] mfd: omap-usb-host: Move usbhs init before allocing child dev Govindraj.R [not found] ` <1329301414-31003-1-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org> 2 siblings, 1 reply; 8+ messages in thread From: Govindraj.R @ 2012-02-15 10:23 UTC (permalink / raw) To: Samuel Ortiz, linux-usb; +Cc: linux-omap, Felipe Balbi, Alan Stern, Govindraj.R From: "Govindraj.R" <govindraj.raja@ti.com> Remove the hardcoded magic values for dma mask and use the dma mask macros available. CC: Felipe Balbi <balbi@ti.com> CC: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> --- drivers/mfd/omap-usb-host.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 68ac2c5..3109b0a 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -170,7 +170,7 @@ struct usbhs_hcd_omap { /*-------------------------------------------------------------------------*/ const char usbhs_driver_name[] = USBHS_DRIVER_NAME; -static u64 usbhs_dmamask = ~(u32)0; +static u64 usbhs_dmamask = DMA_BIT_MASK(32); /*-------------------------------------------------------------------------*/ @@ -223,7 +223,7 @@ static struct platform_device *omap_usbhs_alloc_child(const char *name, } child->dev.dma_mask = &usbhs_dmamask; - child->dev.coherent_dma_mask = 0xffffffff; + child->dev.coherent_dma_mask = DMA_BIT_MASK(32); child->dev.parent = dev; ret = platform_device_add(child); -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask 2012-02-15 10:23 ` [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask Govindraj.R @ 2012-02-15 11:17 ` Felipe Balbi 2012-02-15 15:01 ` Govindraj 0 siblings, 1 reply; 8+ messages in thread From: Felipe Balbi @ 2012-02-15 11:17 UTC (permalink / raw) To: Govindraj.R; +Cc: Samuel Ortiz, linux-usb, linux-omap, Felipe Balbi, Alan Stern [-- Attachment #1: Type: text/plain, Size: 1328 bytes --] On Wed, Feb 15, 2012 at 03:53:33PM +0530, Govindraj.R wrote: > From: "Govindraj.R" <govindraj.raja@ti.com> > > Remove the hardcoded magic values for dma mask and use the dma > mask macros available. > > CC: Felipe Balbi <balbi@ti.com> > CC: Alan Stern <stern@rowland.harvard.edu> > Signed-off-by: Govindraj.R <govindraj.raja@ti.com> > --- > drivers/mfd/omap-usb-host.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c > index 68ac2c5..3109b0a 100644 > --- a/drivers/mfd/omap-usb-host.c > +++ b/drivers/mfd/omap-usb-host.c > @@ -170,7 +170,7 @@ struct usbhs_hcd_omap { > /*-------------------------------------------------------------------------*/ > > const char usbhs_driver_name[] = USBHS_DRIVER_NAME; > -static u64 usbhs_dmamask = ~(u32)0; > +static u64 usbhs_dmamask = DMA_BIT_MASK(32); > > /*-------------------------------------------------------------------------*/ > > @@ -223,7 +223,7 @@ static struct platform_device *omap_usbhs_alloc_child(const char *name, > } > > child->dev.dma_mask = &usbhs_dmamask; > - child->dev.coherent_dma_mask = 0xffffffff; > + child->dev.coherent_dma_mask = DMA_BIT_MASK(32); while at that, you could use dma_set_coherent_mask(); -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask 2012-02-15 11:17 ` Felipe Balbi @ 2012-02-15 15:01 ` Govindraj 2012-02-15 15:56 ` Felipe Balbi 0 siblings, 1 reply; 8+ messages in thread From: Govindraj @ 2012-02-15 15:01 UTC (permalink / raw) To: balbi; +Cc: Govindraj.R, Samuel Ortiz, linux-usb, linux-omap, Alan Stern On Wed, Feb 15, 2012 at 4:47 PM, Felipe Balbi <balbi@ti.com> wrote: > On Wed, Feb 15, 2012 at 03:53:33PM +0530, Govindraj.R wrote: >> From: "Govindraj.R" <govindraj.raja@ti.com> >> >> Remove the hardcoded magic values for dma mask and use the dma >> mask macros available. >> >> CC: Felipe Balbi <balbi@ti.com> >> CC: Alan Stern <stern@rowland.harvard.edu> >> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> >> --- >> drivers/mfd/omap-usb-host.c | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c >> index 68ac2c5..3109b0a 100644 >> --- a/drivers/mfd/omap-usb-host.c >> +++ b/drivers/mfd/omap-usb-host.c >> @@ -170,7 +170,7 @@ struct usbhs_hcd_omap { >> /*-------------------------------------------------------------------------*/ >> >> const char usbhs_driver_name[] = USBHS_DRIVER_NAME; >> -static u64 usbhs_dmamask = ~(u32)0; >> +static u64 usbhs_dmamask = DMA_BIT_MASK(32); >> >> /*-------------------------------------------------------------------------*/ >> >> @@ -223,7 +223,7 @@ static struct platform_device *omap_usbhs_alloc_child(const char *name, >> } >> >> child->dev.dma_mask = &usbhs_dmamask; >> - child->dev.coherent_dma_mask = 0xffffffff; >> + child->dev.coherent_dma_mask = DMA_BIT_MASK(32); > > while at that, you could use dma_set_coherent_mask(); Here [1] is the updated patch. -- Thanks, Govindraj.R [1]: From c4523f02fe96b85245ada1047aa1273c56509e5c Mon Sep 17 00:00:00 2001 From: "Govindraj.R" <govindraj.raja@ti.com> Date: Wed, 15 Feb 2012 12:27:50 +0530 Subject: [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask Remove the hardcoded magic values for dma mask and use the dma mask api/macro available. Signed-off-by: Govindraj.R <govindraj.raja@ti.com> --- drivers/mfd/omap-usb-host.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 68ac2c5..6800411 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -170,7 +170,7 @@ struct usbhs_hcd_omap { /*-------------------------------------------------------------------------*/ const char usbhs_driver_name[] = USBHS_DRIVER_NAME; -static u64 usbhs_dmamask = ~(u32)0; +static u64 usbhs_dmamask = DMA_BIT_MASK(32); /*-------------------------------------------------------------------------*/ @@ -223,7 +223,7 @@ static struct platform_device *omap_usbhs_alloc_child(const char *name, } child->dev.dma_mask = &usbhs_dmamask; - child->dev.coherent_dma_mask = 0xffffffff; + dma_set_coherent_mask(&child->dev, DMA_BIT_MASK(32)); child->dev.parent = dev; ret = platform_device_add(child); -- 1.7.5.4 -- 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 related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask 2012-02-15 15:01 ` Govindraj @ 2012-02-15 15:56 ` Felipe Balbi 0 siblings, 0 replies; 8+ messages in thread From: Felipe Balbi @ 2012-02-15 15:56 UTC (permalink / raw) To: Govindraj Cc: balbi, Govindraj.R, Samuel Ortiz, linux-usb, linux-omap, Alan Stern [-- Attachment #1: Type: text/plain, Size: 1481 bytes --] Hi, > From c4523f02fe96b85245ada1047aa1273c56509e5c Mon Sep 17 00:00:00 2001 > From: "Govindraj.R" <govindraj.raja@ti.com> > Date: Wed, 15 Feb 2012 12:27:50 +0530 > Subject: [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma > mask > > Remove the hardcoded magic values for dma mask and use the dma > mask api/macro available. > > Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> > --- > drivers/mfd/omap-usb-host.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c > index 68ac2c5..6800411 100644 > --- a/drivers/mfd/omap-usb-host.c > +++ b/drivers/mfd/omap-usb-host.c > @@ -170,7 +170,7 @@ struct usbhs_hcd_omap { > /*-------------------------------------------------------------------------*/ > > const char usbhs_driver_name[] = USBHS_DRIVER_NAME; > -static u64 usbhs_dmamask = ~(u32)0; > +static u64 usbhs_dmamask = DMA_BIT_MASK(32); > > /*-------------------------------------------------------------------------*/ > > @@ -223,7 +223,7 @@ static struct platform_device > *omap_usbhs_alloc_child(const char *name, > } > > child->dev.dma_mask = &usbhs_dmamask; > - child->dev.coherent_dma_mask = 0xffffffff; > + dma_set_coherent_mask(&child->dev, DMA_BIT_MASK(32)); > child->dev.parent = dev; > > ret = platform_device_add(child); > -- > 1.7.5.4 -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] mfd: omap-usb-host: Move usbhs init before allocing child dev 2012-02-15 10:23 [PATCH 0/2] mfd: omap-usb-host: Minor omap-usb host fixes Govindraj.R 2012-02-15 10:23 ` [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask Govindraj.R @ 2012-02-15 10:23 ` Govindraj.R [not found] ` <1329301414-31003-3-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org> [not found] ` <1329301414-31003-1-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org> 2 siblings, 1 reply; 8+ messages in thread From: Govindraj.R @ 2012-02-15 10:23 UTC (permalink / raw) To: Samuel Ortiz, linux-usb; +Cc: linux-omap, Felipe Balbi, Alan Stern, Govindraj.R From: "Govindraj.R" <govindraj.raja@ti.com> There could be possible race condition where the host dev's are alloced and added to platform dev just before usbhs_init. Just move usbhs_init before adding child dev. CC: Felipe Balbi <balbi@ti.com> CC: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> --- drivers/mfd/omap-usb-host.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 3109b0a..c5d48ce 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -799,14 +799,13 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev) platform_set_drvdata(pdev, omap); + omap_usbhs_init(dev); ret = omap_usbhs_alloc_children(pdev); if (ret) { dev_err(dev, "omap_usbhs_alloc_children failed\n"); goto err_alloc; } - omap_usbhs_init(dev); - goto end_probe; err_alloc: -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <1329301414-31003-3-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH 2/2] mfd: omap-usb-host: Move usbhs init before allocing child dev [not found] ` <1329301414-31003-3-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org> @ 2012-02-15 11:17 ` Felipe Balbi 0 siblings, 0 replies; 8+ messages in thread From: Felipe Balbi @ 2012-02-15 11:17 UTC (permalink / raw) To: Govindraj.R Cc: Samuel Ortiz, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Alan Stern [-- Attachment #1: Type: text/plain, Size: 1308 bytes --] On Wed, Feb 15, 2012 at 03:53:34PM +0530, Govindraj.R wrote: > From: "Govindraj.R" <govindraj.raja-l0cyMroinI0@public.gmane.org> > > There could be possible race condition where the host dev's > are alloced and added to platform dev just before usbhs_init. > Just move usbhs_init before adding child dev. > > CC: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> > CC: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org> > Signed-off-by: Govindraj.R <govindraj.raja-l0cyMroinI0@public.gmane.org> > --- > drivers/mfd/omap-usb-host.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c > index 3109b0a..c5d48ce 100644 > --- a/drivers/mfd/omap-usb-host.c > +++ b/drivers/mfd/omap-usb-host.c > @@ -799,14 +799,13 @@ static int __devinit usbhs_omap_probe(struct platform_device *pdev) > > platform_set_drvdata(pdev, omap); > > + omap_usbhs_init(dev); > ret = omap_usbhs_alloc_children(pdev); > if (ret) { > dev_err(dev, "omap_usbhs_alloc_children failed\n"); > goto err_alloc; > } > > - omap_usbhs_init(dev); > - > goto end_probe; > > err_alloc: > -- > 1.7.5.4 > -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1329301414-31003-1-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH 0/2] mfd: omap-usb-host: Minor omap-usb host fixes [not found] ` <1329301414-31003-1-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org> @ 2012-02-23 15:45 ` Samuel Ortiz 0 siblings, 0 replies; 8+ messages in thread From: Samuel Ortiz @ 2012-02-23 15:45 UTC (permalink / raw) To: Govindraj.R Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Alan Stern Hi Govindraj, On Wed, Feb 15, 2012 at 03:53:32PM +0530, Govindraj.R wrote: > From: "Govindraj.R" <govindraj.raja-l0cyMroinI0@public.gmane.org> > > Minor fixes, boot tested on panda with ehci enabled. > Patches based on 3.3-rc3 > > Govindraj.R (2): > mfd: omap-usb-host: Remove magic numbers for dev dma mask > mfd: omap-usb-host: Move usbhs init before allocing child dev Both patches applied (v2 for the first one). Cheers, Samuel. -- Intel Open Source Technology Centre http://oss.intel.com/ -- 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] 8+ messages in thread
end of thread, other threads:[~2012-02-23 15:45 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-15 10:23 [PATCH 0/2] mfd: omap-usb-host: Minor omap-usb host fixes Govindraj.R 2012-02-15 10:23 ` [PATCH 1/2] mfd: omap-usb-host: Remove magic numbers for dev dma mask Govindraj.R 2012-02-15 11:17 ` Felipe Balbi 2012-02-15 15:01 ` Govindraj 2012-02-15 15:56 ` Felipe Balbi 2012-02-15 10:23 ` [PATCH 2/2] mfd: omap-usb-host: Move usbhs init before allocing child dev Govindraj.R [not found] ` <1329301414-31003-3-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org> 2012-02-15 11:17 ` Felipe Balbi [not found] ` <1329301414-31003-1-git-send-email-govindraj.raja-l0cyMroinI0@public.gmane.org> 2012-02-23 15:45 ` [PATCH 0/2] mfd: omap-usb-host: Minor omap-usb host fixes Samuel Ortiz
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).