summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fastboot.h24
-rw-r--r--include/usb/imx_udc.h53
2 files changed, 77 insertions, 0 deletions
diff --git a/include/fastboot.h b/include/fastboot.h
index f0ed108..e10c9af 100644
--- a/include/fastboot.h
+++ b/include/fastboot.h
@@ -331,6 +331,19 @@ int fastboot_check_and_clean_flag(void);
int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
void check_fastboot_mode(void);
+
+void fastboot_quick(u8 debug);
+void *fastboot_get_string_table(void);
+int fastboot_write_mmc(u8 *partition_name, u32 write_len);
+void fastboot_dump_memory(u32 *ptr, u32 lEN);
+void fastboot_get_ep_num(u8 *in, u8 *out);
+extern u8 fastboot_debug_level;
+#define DBG_ALWS(x...) printf(x)
+#define DBG_ERR(x...) printf(x)
+#define DBG_DEBUG(x...) if (fastboot_debug_level >= 1) printf(x)
+#define DBG_INFO(x...) if (fastboot_debug_level >= 2) printf(x)
+
+
#else
/* Stubs for when CONFIG_FASTBOOT is not defined */
@@ -356,5 +369,16 @@ void check_fastboot_mode(void);
#define fastboot_flash_write(a, b, c, d) 0
#define do_fastboot(a, b, c, d) 0
+
+#define fastboot_quick(a) 0
+#define fastboot_get_ep_num(a, b) 0
+#define fastboot_get_string_table() 1
+#define fastboot_dump_memory(a, b) 0
+#define DBG_ALWS(x...)
+#define DBG_ERR(x...)
+#define DBG_DEBUG(x...)
+#define DBG_INFO(x...)
+
+
#endif /* CONFIG_FASTBOOT */
#endif /* FASTBOOT_H */
diff --git a/include/usb/imx_udc.h b/include/usb/imx_udc.h
index 3809640..da3bcd6 100644
--- a/include/usb/imx_udc.h
+++ b/include/usb/imx_udc.h
@@ -493,4 +493,57 @@ void enable_usb_phy1_clk(unsigned char enable);
void enable_usboh3_clk(unsigned char enable);
void udc_pins_setting(void);
+#ifdef CONFIG_FASTBOOT
+
+#define EP0_OUT_INDEX 0
+#define EP0_IN_INDEX 16
+#define EP1_OUT_INDEX 1
+#define EP1_IN_INDEX 17
+#define EP2_OUT_INDEX 2
+#define EP2_IN_INDEX 18
+#define EP3_OUT_INDEX 3
+#define EP3_IN_INDEX 19
+#define EP4_OUT_INDEX 4
+#define EP4_IN_INDEX 20
+#define EP5_OUT_INDEX 5
+#define EP5_IN_INDEX 21
+#define EP6_OUT_INDEX 6
+#define EP6_IN_INDEX 22
+#define EP7_OUT_INDEX 7
+#define EP7_IN_INDEX 23
+#define EP8_OUT_INDEX 8
+#define EP8_IN_INDEX 24
+#define EP9_OUT_INDEX 9
+#define EP9_IN_INDEX 25
+#define EP10_OUT_INDEX 10
+#define EP10_IN_INDEX 26
+#define EP11_OUT_INDEX 11
+#define EP11_IN_INDEX 27
+#define EP12_OUT_INDEX 12
+#define EP12_IN_INDEX 28
+#define EP13_OUT_INDEX 13
+#define EP13_IN_INDEX 29
+#define EP14_OUT_INDEX 14
+#define EP14_IN_INDEX 30
+#define EP15_OUT_INDEX 15
+#define EP15_IN_INDEX 31
+
+#define MAX_PAKET_LEN 512
+typedef void (*EP_HANDLER_P)(u32 index, u8 *buf);
+
+int udc_irq_handler(void);
+void udc_hal_data_init(void);
+void udc_wait_connect(void);
+void udc_run(void);
+int udc_recv_data(u32 index, u8 *recvbuf, u32 recvlen, EP_HANDLER_P cb);
+int udc_send_data(u32 index, u8 *buf, u32 sendlen, EP_HANDLER_P cb);
+void udc_qh_dtd_init(u32 index);
+void udc_dtd_setup(u32 index, u8 ep_type);
+void udc_qh_setup(u32 index, u8 ep_type, u32 max_pkt_len, u32 zlt, u8 mult);
+u8 *udc_get_descriptor(u8 type, u8 *plen);
+void udc_set_addr(u8 addr);
+void udc_set_configure(u8 config);
+
+#endif /* CONFIG_FASTBOOT */
+
#endif