forked from len0rd/rockbox
Gmini
* advances in the handling of the smsc chip * moved stuff to where it belongs git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6023 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8ec05779e3
commit
a3ed6e9c7a
4 changed files with 27 additions and 8 deletions
|
@ -1070,6 +1070,15 @@ int ata_hard_reset(void)
|
|||
|
||||
GPIO_OUT |= 0x00080000;
|
||||
sleep(1); /* > 25us */
|
||||
#elif CONFIG_CPU == TCC730
|
||||
P1 |= 0x04;
|
||||
P10CON &= ~0x56;
|
||||
sleep(1); /* > ???ms */
|
||||
|
||||
P10CON |= 0x56;
|
||||
P10 &= ~0x56;
|
||||
P1 &= ~0x04;
|
||||
sleep(1); /* > ???ms */
|
||||
#endif
|
||||
|
||||
/* state HRR2 */
|
||||
|
@ -1196,6 +1205,11 @@ void ata_enable(bool on)
|
|||
|
||||
GPIO_ENABLE |= 0x00040000;
|
||||
GPIO_FUNCTION |= 0x00040000;
|
||||
#elif CONFIG_CPU == TCC730
|
||||
if(on)
|
||||
P1 |= 0x08;
|
||||
else
|
||||
P1 &= ~0x08;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -258,13 +258,6 @@ void TIMER0(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
/* Mess with smsc chip. No idea what for.
|
||||
*/
|
||||
if (smsc_version() < 4) {
|
||||
P6 |= 0x08;
|
||||
P10 |= 0x20;
|
||||
}
|
||||
|
||||
/* Keep alive (?)
|
||||
* If this is not done, power goes down when DC is unplugged.
|
||||
*/
|
||||
|
|
|
@ -142,7 +142,7 @@ static void extra_init(void) {
|
|||
P10 &= 0x20;
|
||||
smsc_delay();
|
||||
if (smsc_version() < 4) {
|
||||
P6 |= 0x80;
|
||||
P6 |= 0x08;
|
||||
P10 |= 0x20;
|
||||
}
|
||||
|
||||
|
|
|
@ -349,6 +349,18 @@ static void usb_tick(void)
|
|||
{
|
||||
bool current_status;
|
||||
|
||||
#ifdef USB_GMINISTYLE
|
||||
/* Keep usb chip in usb state (?) */
|
||||
if (P5 & 0x10) {
|
||||
if ((P10 & 0x20) == 0 || (P6 & 0x08) == 0) {
|
||||
if (smsc_version() < 4) {
|
||||
P6 |= 0x08;
|
||||
P10 |= 0x20;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(usb_monitor_enabled)
|
||||
{
|
||||
current_status = usb_detect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue