lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51F68A56.8060805@ti.com>
Date:	Mon, 29 Jul 2013 20:59:26 +0530
From:	Kishon Vijay Abraham I <kishon@...com>
To:	<balbi@...com>
CC:	<tony@...mide.com>, <linux@....linux.org.uk>,
	<eballetbo@...il.com>, <javier@...hile0.org>,
	<gregkh@...uxfoundation.org>, <linux-omap@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 2/2] arm: omap: remove *.auto* from device names given
 in usb_bind_phy

Hi,

On Monday 29 July 2013 08:36 PM, Felipe Balbi wrote:
> Hi,
> 
> On Fri, Jul 26, 2013 at 02:33:38PM +0530, Kishon Vijay Abraham I wrote:
>> Previously MUSB wrapper (OMAP) device used PLATFORM_DEVID_AUTO while creating
>> MUSB core device. So in usb_bind_phy (binds the controller with the PHY), the
>> device name of the controller had *.auto* in it. Since with using
>> PLATFORM_DEVID_AUTO, there is no way to know the exact device name in advance,
>> the data given in usb_bind_phy became obsolete and usb_get_phy was failing.
>> So MUSB wrapper was modified not to use PLATFORM_DEVID_AUTO. Corresponding
>> change is done in board file here.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
>> ---
>>  arch/arm/mach-omap2/board-2430sdp.c          |    2 +-
>>  arch/arm/mach-omap2/board-3430sdp.c          |    2 +-
>>  arch/arm/mach-omap2/board-cm-t35.c           |    2 +-
>>  arch/arm/mach-omap2/board-devkit8000.c       |    2 +-
>>  arch/arm/mach-omap2/board-igep0020.c         |    2 +-
>>  arch/arm/mach-omap2/board-ldp.c              |    2 +-
>>  arch/arm/mach-omap2/board-omap3beagle.c      |    2 +-
>>  arch/arm/mach-omap2/board-omap3evm.c         |    2 +-
>>  arch/arm/mach-omap2/board-omap3logic.c       |    2 +-
>>  arch/arm/mach-omap2/board-omap3pandora.c     |    2 +-
>>  arch/arm/mach-omap2/board-omap3stalker.c     |    2 +-
>>  arch/arm/mach-omap2/board-omap3touchbook.c   |    2 +-
>>  arch/arm/mach-omap2/board-overo.c            |    2 +-
>>  arch/arm/mach-omap2/board-rm680.c            |    2 +-
>>  arch/arm/mach-omap2/board-rx51.c             |    2 +-
>>  arch/arm/mach-omap2/board-zoom-peripherals.c |    2 +-
>>  16 files changed, 16 insertions(+), 16 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
>> index 244d8a5..17bb076 100644
>> --- a/arch/arm/mach-omap2/board-2430sdp.c
>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void)
>>  	omap_hsmmc_init(mmc);
>>  
>>  	omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
>> -	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
>> +	usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb");
> 
> how about moving usb_bind_phy() calls to omap2430.c ?
> 
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index f44e8b5..b6abc1a 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev)
>  
>  		pdata->board_data	= data;
>  		pdata->config		= config;
> +	} else {
> +		/* bind the PHY */
> +		usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb");

This looks like a hack IMHO to workaround the usb phy library. otherwise it is
similar to get_phy_by_name.
>  	}
>  
>  	if (pdata->has_mailbox) {
> 
> The only problem is if some board comes with a PHY other than
> twl4030_usb, but in that case we can add a separate compatible flag and
> treat it properly. We only need to bind the phy in non-DT case anyway,

right.
> so that's temporary. It might be better than to reintroduce the IDR in
> musb_core.c.

that’s needed for generic phy framework anyway :-s

Thanks
Kishon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ