1
0
Fork 0
forked from len0rd/rockbox

Reset USB bridge properly when selecting bus powered mode. The bridge might have been set to self powered by the cowon loader, and switching the mode requires a reset. Makes USB work on X5s which were set to 'hub mode' in the OF for some reason.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25252 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2010-03-19 23:39:00 +00:00
parent c28f56076e
commit 2bc9b06702

View file

@ -26,9 +26,12 @@
void usb_init_device(void)
{
or_l(0x00800010, &GPIO_OUT); /* RESET deasserted, VBUS powered */
and_l(~0x00800000, &GPIO_OUT); /* RESET asserted */
or_l(0x00000010, &GPIO_OUT); /* bus powered */
or_l(0x00800010, &GPIO_ENABLE);
or_l(0x00800010, &GPIO_FUNCTION);
sleep(1);
or_l(0x00800000, &GPIO_OUT); /* RESET deasserted */
or_l(0x00800000, &GPIO1_FUNCTION); /* USB detect */
}