diff mbox

[U-Boot,RESEND,4/5] trats: new USB hardware init interface

Message ID 1375786257-11781-5-git-send-email-m.zalega@samsung.com
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Commit Message

Mateusz Zalega Aug. 6, 2013, 10:50 a.m. UTC
This commit changes name of an existing initialization function to
board_usb_init(), so that such functions could be reached by every
USB driver and command (ie. do_dfu()).

Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
---
 board/samsung/trats/trats.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jaehoon Chung Aug. 9, 2013, 9:30 a.m. UTC | #1
On 08/06/2013 07:50 PM, Mateusz Zalega wrote:
> This commit changes name of an existing initialization function to
> board_usb_init(), so that such functions could be reached by every
> USB driver and command (ie. do_dfu()).
> 
> Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
> ---
>  board/samsung/trats/trats.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
> index c8698f3..f8d4b0c 100644
> --- a/board/samsung/trats/trats.c
> +++ b/board/samsung/trats/trats.c
> @@ -26,6 +26,7 @@
>  #include <power/max8997_muic.h>
>  #include <power/battery.h>
>  #include <power/max17042_fg.h>
> +#include <usb.h>
>  #include <usb_mass_storage.h>
>  
>  #include "setup.h"
> @@ -488,10 +489,11 @@ struct s3c_plat_otg_data s5pc210_otg_data = {
>  	.usb_flags	= PHY0_SLEEP,
>  };
>  
> -void board_usb_init(void)
> +int board_usb_init(enum board_usb_init_type what_to_init)
>  {
>  	debug("USB_udc_probe\n");
>  	s3c_udc_probe(&s5pc210_otg_data);
> +	return 0;
Always return 0?
>  }
>  #endif
>  
>
Mateusz Zalega Aug. 9, 2013, 2:33 p.m. UTC | #2
On 08/09/13 11:30, Jaehoon Chung wrote:
>> +int board_usb_init(enum board_usb_init_type what_to_init)
>>  {
>>  	debug("USB_udc_probe\n");
>>  	s3c_udc_probe(&s5pc210_otg_data);
>> +	return 0;
> Always return 0?
>>  }

You're right, it could pass return value from s3c_udc_probe.

Thanks,
diff mbox

Patch

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index c8698f3..f8d4b0c 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -26,6 +26,7 @@ 
 #include <power/max8997_muic.h>
 #include <power/battery.h>
 #include <power/max17042_fg.h>
+#include <usb.h>
 #include <usb_mass_storage.h>
 
 #include "setup.h"
@@ -488,10 +489,11 @@  struct s3c_plat_otg_data s5pc210_otg_data = {
 	.usb_flags	= PHY0_SLEEP,
 };
 
-void board_usb_init(void)
+int board_usb_init(enum board_usb_init_type what_to_init)
 {
 	debug("USB_udc_probe\n");
 	s3c_udc_probe(&s5pc210_otg_data);
+	return 0;
 }
 #endif