From f89e8acbc81ee6d9e57f0156c3ee6de44528c8b7 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 3 Dec 2020 19:45:02 +0200 Subject: x86: edison: Switch to DM_USB_GADGET DM is the modern default approach for the drivers in U-Boot. It also allows to configure code via Device Tree. Move Intel Edison to use DM_USB_GADGET and drop hard coded values. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- board/intel/edison/edison.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'board/intel/edison/edison.c') diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c index 652f9755155..11e7f74e47c 100644 --- a/board/intel/edison/edison.c +++ b/board/intel/edison/edison.c @@ -3,15 +3,10 @@ * Copyright (c) 2017 Intel Corporation */ #include -#include #include #include #include #include -#include -#include - -#include #include #include @@ -27,36 +22,6 @@ int board_early_init_r(void) return 0; } -static struct dwc3_device dwc3_device_data = { - .maximum_speed = USB_SPEED_HIGH, - .base = CONFIG_SYS_USB_OTG_BASE, - .dr_mode = USB_DR_MODE_PERIPHERAL, - .index = 0, -}; - -int usb_gadget_handle_interrupts(int controller_index) -{ - dwc3_uboot_handle_interrupt(controller_index); - WATCHDOG_RESET(); - return 0; -} - -int board_usb_init(int index, enum usb_init_type init) -{ - if (index == 0 && init == USB_INIT_DEVICE) - return dwc3_uboot_init(&dwc3_device_data); - return -EINVAL; -} - -int board_usb_cleanup(int index, enum usb_init_type init) -{ - if (index == 0 && init == USB_INIT_DEVICE) { - dwc3_uboot_exit(index); - return 0; - } - return -EINVAL; -} - static void assign_serial(void) { struct mmc *mmc = find_mmc_device(0); -- cgit v1.2.3