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:
parent
c28f56076e
commit
2bc9b06702
1 changed files with 4 additions and 1 deletions
|
@ -26,9 +26,12 @@
|
||||||
|
|
||||||
void usb_init_device(void)
|
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_ENABLE);
|
||||||
or_l(0x00800010, &GPIO_FUNCTION);
|
or_l(0x00800010, &GPIO_FUNCTION);
|
||||||
|
sleep(1);
|
||||||
|
or_l(0x00800000, &GPIO_OUT); /* RESET deasserted */
|
||||||
|
|
||||||
or_l(0x00800000, &GPIO1_FUNCTION); /* USB detect */
|
or_l(0x00800000, &GPIO1_FUNCTION); /* USB detect */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue