diff options
author | Marek Vasut <marex@denx.de> | 2014-11-04 04:25:09 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-11-07 16:32:02 +0100 |
commit | 0223a95c723b5ad33c0f2ee1fc7acd2afe0f023b (patch) | |
tree | c1cf9b871c6385652f7d1fca6af176407c0a8d08 /board | |
parent | 481a11c552978132a7e291213762af82ed3e7003 (diff) | |
download | u-boot-imx-0223a95c723b5ad33c0f2ee1fc7acd2afe0f023b.zip u-boot-imx-0223a95c723b5ad33c0f2ee1fc7acd2afe0f023b.tar.gz u-boot-imx-0223a95c723b5ad33c0f2ee1fc7acd2afe0f023b.tar.bz2 |
arm: socfpga: Add example UDC config
Add example of an USB UDC configuration with DFU and UMS.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Vince Bridgers <vbridger@altera.com>
Acked-by: Pavel Machek <pavel@denx.de>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/altera/socfpga/socfpga_cyclone5.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/board/altera/socfpga/socfpga_cyclone5.c b/board/altera/socfpga/socfpga_cyclone5.c index 0f81d89..ce625e5 100644 --- a/board/altera/socfpga/socfpga_cyclone5.c +++ b/board/altera/socfpga/socfpga_cyclone5.c @@ -8,6 +8,10 @@ #include <asm/arch/reset_manager.h> #include <asm/io.h> +#include <usb.h> +#include <usb/s3c_udc.h> +#include <usb_mass_storage.h> + #include <netdev.h> DECLARE_GLOBAL_DATA_PTR; @@ -39,3 +43,20 @@ int board_init(void) return 0; } + +#ifdef CONFIG_USB_GADGET +struct s3c_plat_otg_data socfpga_otg_data = { + .regs_otg = CONFIG_USB_DWC2_REG_ADDR, + .usb_gusbcfg = 0x1417, +}; + +int board_usb_init(int index, enum usb_init_type init) +{ + return s3c_udc_probe(&socfpga_otg_data); +} + +int g_dnl_board_usb_cable_connected(void) +{ + return 1; +} +#endif |