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: <514A9F1C.6080609@ti.com>
Date:	Thu, 21 Mar 2013 11:18:12 +0530
From:	kishon <kishon@...com>
To:	Tony Lindgren <tony@...mide.com>
CC:	<balbi@...com>, <gregkh@...uxfoundation.org>, <arnd@...db.de>,
	<akpm@...ux-foundation.org>, <rob@...dley.net>,
	<davem@...emloft.net>, <cesarb@...arb.net>,
	<linux-usb@...r.kernel.org>, <linux-omap@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <grant.likely@...retlab.ca>,
	<rob.herring@...xeda.com>, <b-cousson@...com>,
	<linux@....linux.org.uk>, <eballetbo@...il.com>,
	<javier@...hile0.org>, <mchehab@...hat.com>,
	<santosh.shilimkar@...com>, <broonie@...nsource.wolfsonmicro.com>,
	<swarren@...dia.com>, <linux-doc@...r.kernel.org>,
	<devicetree-discuss@...ts.ozlabs.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3 4/6] ARM: OMAP: USB: Add phy binding information

Hi,

On Wednesday 20 March 2013 10:21 PM, Tony Lindgren wrote:
> * Kishon Vijay Abraham I <kishon@...com> [130320 02:17]:
>>
>> --- a/arch/arm/mach-omap2/board-2430sdp.c
>> +++ b/arch/arm/mach-omap2/board-2430sdp.c
>> @@ -265,6 +266,7 @@ static void __init omap_2430sdp_init(void)
>>
>>   	omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
>>   	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
>> +	phy_bind("musb-hdrc.0.auto", 0, "twl4030_usb");
>>   	usb_musb_init(NULL);
>>
>>   	board_smc91x_init();
>> --- a/arch/arm/mach-omap2/board-3430sdp.c
>> +++ b/arch/arm/mach-omap2/board-3430sdp.c
>> @@ -601,6 +602,7 @@ static void __init omap_3430sdp_init(void)
>>   	omap_serial_init();
>>   	omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
>>   	usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
>> +	phy_bind("musb-hdrc.0.auto", 0, "twl4030_usb");
>>   	usb_musb_init(NULL);
>>   	board_smc91x_init();
>>   	board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
>
> Can't you call phy_bind() from usb_musb_init() with the default
> values automatically when usb_musb_init() is passed NULL?
>
> That way you don't have to patch every board-*.c file with the
> same lines, and don't need to include <linux/phy/phy.h> in each
> board-*.c file.
>
>> --- a/arch/arm/mach-omap2/board-4430sdp.c
>> +++ b/arch/arm/mach-omap2/board-4430sdp.c
>> @@ -32,6 +32,7 @@
>>   #include <linux/platform_data/omap4-keypad.h>
>>   #include <linux/usb/musb.h>
>>   #include <linux/usb/phy.h>
>> +#include <linux/phy/phy.h>
>>
>>   #include <asm/mach-types.h>
>>   #include <asm/mach/arch.h>
>> @@ -725,6 +726,7 @@ static void __init omap_4430sdp_init(void)
>>   	omap4_twl6030_hsmmc_init(mmc);
>>
>>   	usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
>> +	phy_bind("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
>>   	usb_musb_init(&musb_board_data);
>>
>>   	status = omap_ethernet_init();
>
> Here usb_musb_init() gets called with musb_board_data, so
> keeping the phy_bind() in the board-4430sdp.c can then override
> the default in usb_musb_init().

Currently phy_bind has a limitation to do that. Will change phy_bind() 
and have your comment incorporated.

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