All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] usb: phy: msm: cast to unsigned long int
@ 2014-04-30 16:38 Felipe Balbi
  2014-04-30 16:38 ` [PATCH 3/3] usb: phy: msm: enable build on other architectures Felipe Balbi
       [not found] ` <1398875916-14461-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Felipe Balbi @ 2014-04-30 16:38 UTC (permalink / raw)
  To: iivanov; +Cc: tim.bird, linux-arm-msm, Linux USB Mailing List, Felipe Balbi

this solves the following build warning found when
running compile tests.

drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:
drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
	to integer of different size [-Wpointer-to-int-cast]
  pdata->phy_type = (int) id->data;
                    ^
Signed-off-by: Felipe Balbi <balbi@ti.com>
---

all patches are on top of Ivan's 20 patch series.

 drivers/usb/phy/phy-msm-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 9dc7918..c9963c8 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
 	motg->pdata = pdata;
 
 	id = of_match_device(msm_otg_dt_match, &pdev->dev);
-	pdata->phy_type = (int) id->data;
+	pdata->phy_type = (unsigned long int) id->data;
 
 	motg->link_rst = devm_reset_control_get(&pdev->dev, "link");
 	if (IS_ERR(motg->link_rst))
-- 
2.0.0.rc1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] usb: phy: msm: switch over to writel()
       [not found] ` <1398875916-14461-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
@ 2014-04-30 16:38   ` Felipe Balbi
  2014-05-03  6:58     ` Ivan T. Ivanov
  2014-05-03  6:56   ` [PATCH 1/3] usb: phy: msm: cast to unsigned long int Ivan T. Ivanov
  1 sibling, 1 reply; 8+ messages in thread
From: Felipe Balbi @ 2014-04-30 16:38 UTC (permalink / raw)
  To: iivanov-NEYub+7Iv8PQT0dZR+AlfA
  Cc: tim.bird-/MT0OVThwyLZJqsBc5GL+g,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Linux USB Mailing List,
	Felipe Balbi

Remove that single instance of writel_relaxed()
call which is only available on ARM architecture.

This will let us build test this driver on all
different architectures.

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

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index c9963c8..13b59ad 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1600,7 +1600,7 @@ static int msm_otg_probe(struct platform_device *pdev)
 		if (IS_ERR(phy_select))
 			return PTR_ERR(phy_select);
 		/* Enable second PHY with the OTG port */
-		writel_relaxed(0x1, phy_select);
+		writel(0x1, phy_select);
 	}
 
 	dev_info(&pdev->dev, "OTG regs = %p\n", motg->regs);
-- 
2.0.0.rc1

--
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] 8+ messages in thread

* [PATCH 3/3] usb: phy: msm: enable build on other architectures
  2014-04-30 16:38 [PATCH 1/3] usb: phy: msm: cast to unsigned long int Felipe Balbi
@ 2014-04-30 16:38 ` Felipe Balbi
  2014-05-03  7:00   ` Ivan T. Ivanov
       [not found] ` <1398875916-14461-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Felipe Balbi @ 2014-04-30 16:38 UTC (permalink / raw)
  To: iivanov; +Cc: tim.bird, linux-arm-msm, Linux USB Mailing List, Felipe Balbi

By adding COMPILE_TEST to the list of dependencies
we can build test this driver on all other architectures
which is very valuable for maintainers applying patches
and to find silly mistakes during development.

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

diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 0c668a3..fbbced8 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -172,7 +172,7 @@ config USB_ISP1301
 
 config USB_MSM_OTG
 	tristate "Qualcomm on-chip USB OTG controller support"
-	depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM)
+	depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM || COMPILE_TEST)
 	select USB_PHY
 	help
 	  Enable this to support the USB OTG transceiver on Qualcomm chips. It
-- 
2.0.0.rc1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] usb: phy: msm: cast to unsigned long int
       [not found] ` <1398875916-14461-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
  2014-04-30 16:38   ` [PATCH 2/3] usb: phy: msm: switch over to writel() Felipe Balbi
@ 2014-05-03  6:56   ` Ivan T. Ivanov
  2014-05-05 15:03     ` Felipe Balbi
  1 sibling, 1 reply; 8+ messages in thread
From: Ivan T. Ivanov @ 2014-05-03  6:56 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: tim.bird-/MT0OVThwyLZJqsBc5GL+g,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Linux USB Mailing List

On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote:
> this solves the following build warning found when
> running compile tests.
> 
> drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:
> drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
> 	to integer of different size [-Wpointer-to-int-cast]
>   pdata->phy_type = (int) id->data;
>                     ^
> Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
> ---
> 
> all patches are on top of Ivan's 20 patch series.
> 
>  drivers/usb/phy/phy-msm-usb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> index 9dc7918..c9963c8 100644
> --- a/drivers/usb/phy/phy-msm-usb.c
> +++ b/drivers/usb/phy/phy-msm-usb.c
> @@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
>  	motg->pdata = pdata;
>  
>  	id = of_match_device(msm_otg_dt_match, &pdev->dev);
> -	pdata->phy_type = (int) id->data;
> +	pdata->phy_type = (unsigned long int) id->data;

Probably cast to enum msm_usb_phy_type will be better.

Regards,
Ivan

>  
>  	motg->link_rst = devm_reset_control_get(&pdev->dev, "link");
>  	if (IS_ERR(motg->link_rst))


--
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

* Re: [PATCH 2/3] usb: phy: msm: switch over to writel()
  2014-04-30 16:38   ` [PATCH 2/3] usb: phy: msm: switch over to writel() Felipe Balbi
@ 2014-05-03  6:58     ` Ivan T. Ivanov
  0 siblings, 0 replies; 8+ messages in thread
From: Ivan T. Ivanov @ 2014-05-03  6:58 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: tim.bird, linux-arm-msm, Linux USB Mailing List

On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote:
> Remove that single instance of writel_relaxed()
> call which is only available on ARM architecture.
> 
> This will let us build test this driver on all
> different architectures.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

Reviewed-by: Ivan T. Ivanov <iivanov@mm-sol.com>

> ---
>  drivers/usb/phy/phy-msm-usb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> index c9963c8..13b59ad 100644
> --- a/drivers/usb/phy/phy-msm-usb.c
> +++ b/drivers/usb/phy/phy-msm-usb.c
> @@ -1600,7 +1600,7 @@ static int msm_otg_probe(struct platform_device *pdev)
>  		if (IS_ERR(phy_select))
>  			return PTR_ERR(phy_select);
>  		/* Enable second PHY with the OTG port */
> -		writel_relaxed(0x1, phy_select);
> +		writel(0x1, phy_select);
>  	}
>  
>  	dev_info(&pdev->dev, "OTG regs = %p\n", motg->regs);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] usb: phy: msm: enable build on other architectures
  2014-04-30 16:38 ` [PATCH 3/3] usb: phy: msm: enable build on other architectures Felipe Balbi
@ 2014-05-03  7:00   ` Ivan T. Ivanov
  0 siblings, 0 replies; 8+ messages in thread
From: Ivan T. Ivanov @ 2014-05-03  7:00 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: tim.bird, linux-arm-msm, Linux USB Mailing List

On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote:
> By adding COMPILE_TEST to the list of dependencies
> we can build test this driver on all other architectures
> which is very valuable for maintainers applying patches
> and to find silly mistakes during development.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

Reviewed-by: Ivan T. Ivanov <iivanov@mm-sol.com>

> ---
>  drivers/usb/phy/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
> index 0c668a3..fbbced8 100644
> --- a/drivers/usb/phy/Kconfig
> +++ b/drivers/usb/phy/Kconfig
> @@ -172,7 +172,7 @@ config USB_ISP1301
>  
>  config USB_MSM_OTG
>  	tristate "Qualcomm on-chip USB OTG controller support"
> -	depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM)
> +	depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM || COMPILE_TEST)
>  	select USB_PHY
>  	help
>  	  Enable this to support the USB OTG transceiver on Qualcomm chips. It

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] usb: phy: msm: cast to unsigned long int
  2014-05-03  6:56   ` [PATCH 1/3] usb: phy: msm: cast to unsigned long int Ivan T. Ivanov
@ 2014-05-05 15:03     ` Felipe Balbi
  2014-05-05 15:30       ` Felipe Balbi
  0 siblings, 1 reply; 8+ messages in thread
From: Felipe Balbi @ 2014-05-05 15:03 UTC (permalink / raw)
  To: Ivan T. Ivanov
  Cc: Felipe Balbi, tim.bird, linux-arm-msm, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

On Sat, May 03, 2014 at 09:56:32AM +0300, Ivan T. Ivanov wrote:
> On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote:
> > this solves the following build warning found when
> > running compile tests.
> > 
> > drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:
> > drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
> > 	to integer of different size [-Wpointer-to-int-cast]
> >   pdata->phy_type = (int) id->data;
> >                     ^
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > ---
> > 
> > all patches are on top of Ivan's 20 patch series.
> > 
> >  drivers/usb/phy/phy-msm-usb.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> > index 9dc7918..c9963c8 100644
> > --- a/drivers/usb/phy/phy-msm-usb.c
> > +++ b/drivers/usb/phy/phy-msm-usb.c
> > @@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
> >  	motg->pdata = pdata;
> >  
> >  	id = of_match_device(msm_otg_dt_match, &pdev->dev);
> > -	pdata->phy_type = (int) id->data;
> > +	pdata->phy_type = (unsigned long int) id->data;
> 
> Probably cast to enum msm_usb_phy_type will be better.

will do.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] usb: phy: msm: cast to unsigned long int
  2014-05-05 15:03     ` Felipe Balbi
@ 2014-05-05 15:30       ` Felipe Balbi
  0 siblings, 0 replies; 8+ messages in thread
From: Felipe Balbi @ 2014-05-05 15:30 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Ivan T. Ivanov, tim.bird, linux-arm-msm, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 2565 bytes --]

On Mon, May 05, 2014 at 10:03:31AM -0500, Felipe Balbi wrote:
> On Sat, May 03, 2014 at 09:56:32AM +0300, Ivan T. Ivanov wrote:
> > On Wed, 2014-04-30 at 11:38 -0500, Felipe Balbi wrote:
> > > this solves the following build warning found when
> > > running compile tests.
> > > 
> > > drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:
> > > drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
> > > 	to integer of different size [-Wpointer-to-int-cast]
> > >   pdata->phy_type = (int) id->data;
> > >                     ^
> > > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > > ---
> > > 
> > > all patches are on top of Ivan's 20 patch series.
> > > 
> > >  drivers/usb/phy/phy-msm-usb.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> > > index 9dc7918..c9963c8 100644
> > > --- a/drivers/usb/phy/phy-msm-usb.c
> > > +++ b/drivers/usb/phy/phy-msm-usb.c
> > > @@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
> > >  	motg->pdata = pdata;
> > >  
> > >  	id = of_match_device(msm_otg_dt_match, &pdev->dev);
> > > -	pdata->phy_type = (int) id->data;
> > > +	pdata->phy_type = (unsigned long int) id->data;
> > 
> > Probably cast to enum msm_usb_phy_type will be better.
> 
> will do.

commit fe8ef54c824e5b01192462ef82861e65f57d299c
Author: Felipe Balbi <balbi@ti.com>
Date:   Wed Apr 30 11:33:04 2014 -0500

    usb: phy: msm: cast to unsigned long int
    
    this solves the following build warning found when
    running compile tests.
    
    drivers/usb/phy/phy-msm-usb.c: In function ‘msm_otg_read_dt’:
    drivers/usb/phy/phy-msm-usb.c:1459:20: warning: cast from pointer \
    	to integer of different size [-Wpointer-to-int-cast]
      pdata->phy_type = (int) id->data;
                        ^
    Signed-off-by: Felipe Balbi <balbi@ti.com>

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 9dc7918..591b406 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1456,7 +1456,7 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
 	motg->pdata = pdata;
 
 	id = of_match_device(msm_otg_dt_match, &pdev->dev);
-	pdata->phy_type = (int) id->data;
+	pdata->phy_type = (enum msm_usb_phy_type) id->data;
 
 	motg->link_rst = devm_reset_control_get(&pdev->dev, "link");
 	if (IS_ERR(motg->link_rst))

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-05-05 15:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-30 16:38 [PATCH 1/3] usb: phy: msm: cast to unsigned long int Felipe Balbi
2014-04-30 16:38 ` [PATCH 3/3] usb: phy: msm: enable build on other architectures Felipe Balbi
2014-05-03  7:00   ` Ivan T. Ivanov
     [not found] ` <1398875916-14461-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2014-04-30 16:38   ` [PATCH 2/3] usb: phy: msm: switch over to writel() Felipe Balbi
2014-05-03  6:58     ` Ivan T. Ivanov
2014-05-03  6:56   ` [PATCH 1/3] usb: phy: msm: cast to unsigned long int Ivan T. Ivanov
2014-05-05 15:03     ` Felipe Balbi
2014-05-05 15:30       ` Felipe Balbi

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.