diff options
-rw-r--r-- | firmware/drivers/ata.c | 14 | ||||
-rw-r--r-- | firmware/kernel.c | 7 | ||||
-rw-r--r-- | firmware/system.c | 2 | ||||
-rw-r--r-- | firmware/usb.c | 12 |
4 files changed, 27 insertions, 8 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 339073969c..cfdae2c090 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -1070,6 +1070,15 @@ int ata_hard_reset(void) | |||
1070 | 1070 | ||
1071 | GPIO_OUT |= 0x00080000; | 1071 | GPIO_OUT |= 0x00080000; |
1072 | sleep(1); /* > 25us */ | 1072 | sleep(1); /* > 25us */ |
1073 | #elif CONFIG_CPU == TCC730 | ||
1074 | P1 |= 0x04; | ||
1075 | P10CON &= ~0x56; | ||
1076 | sleep(1); /* > ???ms */ | ||
1077 | |||
1078 | P10CON |= 0x56; | ||
1079 | P10 &= ~0x56; | ||
1080 | P1 &= ~0x04; | ||
1081 | sleep(1); /* > ???ms */ | ||
1073 | #endif | 1082 | #endif |
1074 | 1083 | ||
1075 | /* state HRR2 */ | 1084 | /* state HRR2 */ |
@@ -1196,6 +1205,11 @@ void ata_enable(bool on) | |||
1196 | 1205 | ||
1197 | GPIO_ENABLE |= 0x00040000; | 1206 | GPIO_ENABLE |= 0x00040000; |
1198 | GPIO_FUNCTION |= 0x00040000; | 1207 | GPIO_FUNCTION |= 0x00040000; |
1208 | #elif CONFIG_CPU == TCC730 | ||
1209 | if(on) | ||
1210 | P1 |= 0x08; | ||
1211 | else | ||
1212 | P1 &= ~0x08; | ||
1199 | #endif | 1213 | #endif |
1200 | } | 1214 | } |
1201 | 1215 | ||
diff --git a/firmware/kernel.c b/firmware/kernel.c index ca0dcf5458..1306b4b524 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -257,13 +257,6 @@ void TIMER0(void) | |||
257 | void TIMER0(void) | 257 | void TIMER0(void) |
258 | { | 258 | { |
259 | int i; | 259 | int i; |
260 | |||
261 | /* Mess with smsc chip. No idea what for. | ||
262 | */ | ||
263 | if (smsc_version() < 4) { | ||
264 | P6 |= 0x08; | ||
265 | P10 |= 0x20; | ||
266 | } | ||
267 | 260 | ||
268 | /* Keep alive (?) | 261 | /* Keep alive (?) |
269 | * If this is not done, power goes down when DC is unplugged. | 262 | * If this is not done, power goes down when DC is unplugged. |
diff --git a/firmware/system.c b/firmware/system.c index 3ead7c6be3..9d3e2a0dbd 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -142,7 +142,7 @@ static void extra_init(void) { | |||
142 | P10 &= 0x20; | 142 | P10 &= 0x20; |
143 | smsc_delay(); | 143 | smsc_delay(); |
144 | if (smsc_version() < 4) { | 144 | if (smsc_version() < 4) { |
145 | P6 |= 0x80; | 145 | P6 |= 0x08; |
146 | P10 |= 0x20; | 146 | P10 |= 0x20; |
147 | } | 147 | } |
148 | 148 | ||
diff --git a/firmware/usb.c b/firmware/usb.c index 1400805c33..6095bcd65e 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -349,6 +349,18 @@ static void usb_tick(void) | |||
349 | { | 349 | { |
350 | bool current_status; | 350 | bool current_status; |
351 | 351 | ||
352 | #ifdef USB_GMINISTYLE | ||
353 | /* Keep usb chip in usb state (?) */ | ||
354 | if (P5 & 0x10) { | ||
355 | if ((P10 & 0x20) == 0 || (P6 & 0x08) == 0) { | ||
356 | if (smsc_version() < 4) { | ||
357 | P6 |= 0x08; | ||
358 | P10 |= 0x20; | ||
359 | } | ||
360 | } | ||
361 | } | ||
362 | #endif | ||
363 | |||
352 | if(usb_monitor_enabled) | 364 | if(usb_monitor_enabled) |
353 | { | 365 | { |
354 | current_status = usb_detect(); | 366 | current_status = usb_detect(); |