/*Clear OTG bit of CLKGR0,0:device can be accessed*/
	REG_CPM_CLKGR0 &= (~(CPM_CLKGR0_OTG));
#ifdef DEBUG
	serial_puts_info("**************************MUSB REG INFO*******************************\n");
	serial_puts_info("CPCCR : ");
	serial_put_hex(REG_CPM_CPCCR);
	serial_puts_info("USBCDR : ");
	serial_put_hex(REG_CPM_USBCDR);
	serial_puts_info("CPCCR : ");
	serial_put_hex(REG_CPM_CPCCR);
	serial_puts_info("CLKGR0 : ");
	serial_put_hex(REG_CPM_CLKGR0);
#endif
        jz_musb_init();

	return;
}
#endif	/*CONFIG_JZ4760*/
void usbloader_init(void)
{
#if	defined(CONFIG_JZ4760) || defined(CONFIG_JZ4760B) || defined(CONFIG_JZ4770)
	musb_platform_init();
#endif
	usb_init();
	boot_register_poll_func(usb_poll);
}
Example #2
0
void usbloader_init(void)
{
    usb_init();

    ep1out = usb_endpoint_alloc(1, 0, 512);
    ep1in = usb_endpoint_alloc(1, 1, 512);
    rx_req = usb_request_alloc(4096);
    tx_req = usb_request_alloc(4096);
    cmdbuf = rx_req->buf;

    boot_register_poll_func(usb_poll);
}
void console_init(void)
{
	memset(console_buf, 0, sizeof(console_buf));
	console_buf_loc = 0;

#ifndef BSP_CONFIG_EDA
	cprintf("\n\n\n");
	cprintf("********************************************************* \n");
	cprintf("FASTBOOT simple console, enter 'help' for commands help.\n");
	cprintf("********************************************************* \n");
#endif
	boot_register_poll_func(console_poll);
}