include: Add interface layer for target specific initialization
We need to perform target specific initialization for USB phy & mux
selection. Add target interface layer to be initialized as part of
target init code & used by USB driver.
CRs-Fixed: 610350
Change-Id: Iab2946014f2f74de8435c97c4724bb72fa0f3431
diff --git a/include/dev/udc.h b/include/dev/udc.h
index f550410..f58b7b4 100644
--- a/include/dev/udc.h
+++ b/include/dev/udc.h
@@ -30,6 +30,8 @@
#ifndef __DEV_UDC_H
#define __DEV_UDC_H
+#include <target.h>
+
/* USB Device Controller Transfer Request */
struct udc_request {
void *buf;
@@ -77,6 +79,7 @@
const char *manufacturer;
const char *product;
const char *serialno;
+ target_usb_iface_t *t_usb_if;
};
int udc_init(struct udc_device *devinfo);
diff --git a/include/target.h b/include/target.h
index 144b346..08f99de 100644
--- a/include/target.h
+++ b/include/target.h
@@ -25,6 +25,16 @@
#ifndef __TARGET_H
#define __TARGET_H
+
+/* Target helper functions exposed to USB driver */
+typedef struct {
+ void (*mux_config) ();
+ void (*phy_reset) ();
+ void (*phy_init) ();
+ void (*clock_init) ();
+ uint8_t vbus_override;
+} target_usb_iface_t;
+
/* super early platform initialization, before almost everything */
void target_early_init(void);
@@ -60,6 +70,7 @@
const char * target_usb_controller();
void target_usb_phy_reset(void);
void target_usb_phy_mux_configure(void);
+target_usb_iface_t * target_usb30_init();
/* Boot device */
enum boot_device