2012-10-04 15:46:02 +09:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 Altera Corporation <www.altera.com>
|
|
|
|
*
|
2013-07-08 16:37:19 +09:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2012-10-04 15:46:02 +09:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <asm/arch/reset_manager.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
|
2014-11-04 12:25:09 +09:00
|
|
|
#include <usb.h>
|
2015-12-04 10:51:20 +09:00
|
|
|
#include <usb/dwc2_udc.h>
|
2014-11-04 12:25:09 +09:00
|
|
|
#include <usb_mass_storage.h>
|
|
|
|
|
2012-10-04 15:46:02 +09:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2015-04-16 06:44:31 +09:00
|
|
|
void s_init(void) {}
|
|
|
|
|
2012-10-04 15:46:02 +09:00
|
|
|
/*
|
|
|
|
* Miscellaneous platform dependent initialisations
|
|
|
|
*/
|
|
|
|
int board_init(void)
|
|
|
|
{
|
2014-09-08 21:08:45 +09:00
|
|
|
/* Address of boot parameters for ATAG (if ATAG is used) */
|
|
|
|
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
|
|
|
|
2012-10-04 15:46:02 +09:00
|
|
|
return 0;
|
|
|
|
}
|
2014-11-04 12:25:09 +09:00
|
|
|
|
|
|
|
#ifdef CONFIG_USB_GADGET
|
2015-12-04 10:23:29 +09:00
|
|
|
struct dwc2_plat_otg_data socfpga_otg_data = {
|
2014-11-04 12:25:09 +09:00
|
|
|
.regs_otg = CONFIG_USB_DWC2_REG_ADDR,
|
|
|
|
.usb_gusbcfg = 0x1417,
|
|
|
|
};
|
|
|
|
|
|
|
|
int board_usb_init(int index, enum usb_init_type init)
|
|
|
|
{
|
2015-12-04 10:26:33 +09:00
|
|
|
return dwc2_udc_probe(&socfpga_otg_data);
|
2014-11-04 12:25:09 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
int g_dnl_board_usb_cable_connected(void)
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
#endif
|