diff mbox

[U-Boot,v5,01/11] usb, davinci: add enable_vbus() weak function

Message ID 1320036790-24283-2-git-send-email-hs@denx.de
State Superseded
Delegated to: Remy Bohmer
Headers show

Commit Message

Heiko Schocher Oct. 31, 2011, 4:53 a.m. UTC
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>

---
changes for v4:
- patch is new since v4, as Igor Grinberg suggested.

 drivers/usb/musb/davinci.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

Comments

Igor Grinberg Oct. 31, 2011, 7:02 a.m. UTC | #1
Hi Heiko,

On 10/31/11 06:53, Heiko Schocher wrote:
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Cc: Remy Bohmer <linux@bohmer.net>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> 
> ---
> changes for v4:
> - patch is new since v4, as Igor Grinberg suggested.
> 
>  drivers/usb/musb/davinci.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
> index f56f2df..27dc4bc 100644
> --- a/drivers/usb/musb/davinci.c
> +++ b/drivers/usb/musb/davinci.c
> @@ -78,6 +78,18 @@ static void phy_off(void)
>  	writel(USBPHY_OSCPDWN | USBPHY_PHYPDWN, USBPHY_CTL_PADDR);
>  }
>  
> +#ifndef DAVINCI_DM365EVM
> +__attribute__((weak))
> +void enable_vbus(void)
> +{
> +	/*
> +	 *  nothing to do, vbus is handled through the cpu.
> +	 *  Define this function in board code, if it is
> +	 *  different on your board.
> +	 */
> +}
> +#endif

I'd suggest, instead of closing the weak declaration inside
ifdef/ifndef, make it available to all boards with alias.

> +
>  /*
>   * This function performs Davinci platform specific initialization for usb0.
>   */
Heiko Schocher Nov. 1, 2011, 5:03 a.m. UTC | #2
Hello Igor,

Igor Grinberg wrote:
> Hi Heiko,
> 
> On 10/31/11 06:53, Heiko Schocher wrote:
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>> Cc: Remy Bohmer <linux@bohmer.net>
>> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>>
>> ---
>> changes for v4:
>> - patch is new since v4, as Igor Grinberg suggested.
>>
>>  drivers/usb/musb/davinci.c |   12 ++++++++++++
>>  1 files changed, 12 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
>> index f56f2df..27dc4bc 100644
>> --- a/drivers/usb/musb/davinci.c
>> +++ b/drivers/usb/musb/davinci.c
>> @@ -78,6 +78,18 @@ static void phy_off(void)
>>  	writel(USBPHY_OSCPDWN | USBPHY_PHYPDWN, USBPHY_CTL_PADDR);
>>  }
>>  
>> +#ifndef DAVINCI_DM365EVM
>> +__attribute__((weak))
>> +void enable_vbus(void)
>> +{
>> +	/*
>> +	 *  nothing to do, vbus is handled through the cpu.
>> +	 *  Define this function in board code, if it is
>> +	 *  different on your board.
>> +	 */
>> +}
>> +#endif
> 
> I'd suggest, instead of closing the weak declaration inside
> ifdef/ifndef, make it available to all boards with alias.

OK, done.

Thanks for the review.

bye,
Heiko
diff mbox

Patch

diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index f56f2df..27dc4bc 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -78,6 +78,18 @@  static void phy_off(void)
 	writel(USBPHY_OSCPDWN | USBPHY_PHYPDWN, USBPHY_CTL_PADDR);
 }
 
+#ifndef DAVINCI_DM365EVM
+__attribute__((weak))
+void enable_vbus(void)
+{
+	/*
+	 *  nothing to do, vbus is handled through the cpu.
+	 *  Define this function in board code, if it is
+	 *  different on your board.
+	 */
+}
+#endif
+
 /*
  * This function performs Davinci platform specific initialization for usb0.
  */