[PATCH]_Rockchip_board_with_DWC3_controller_may_lead_to_usb_init_function_declared_twice

Kever Yang kever.yang at rock-chips.com
Tue Mar 30 09:33:21 CEST 2021


Hi Janpieter,

     Please add commit message to descript the issue you met and use the 
correct format in the subject.


Thanks,

- Kever

On 2021/3/20 下午1:19, Janpieter Sollie wrote:
> diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
> index c386b529..11866e6e 100644
> --- a/arch/arm/mach-rockchip/board.c
> +++ b/arch/arm/mach-rockchip/board.c
> @@ -67,7 +67,7 @@ static struct dwc2_plat_otg_data otg_data = {
>          .tx_fifo_sz     = 128,
>   };
>
> -int board_usb_init(int index, enum usb_init_type init)
> +static int __board_usb_init(int index, enum usb_init_type init)
>   {
>          ofnode node;
>          const char *mode;
> @@ -151,6 +151,13 @@ int board_usb_init(int index, enum usb_init_type init)
>   }
>   #endif /* CONFIG_USB_DWC3_GADGET */
>
> +#else
> +int board_usb_init(int index, enum usb_init_type init)
> +{
> +       return __board_usb_init(&dwc3_device_data);
> +}
> +
> +
>   #endif /* CONFIG_USB_GADGET */
>
>   #if CONFIG_IS_ENABLED(FASTBOOT)
>
>




More information about the U-Boot mailing list