summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-02-19 21:34:03 +0000
committerJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-02-19 21:34:03 +0000
commita3ed6e9c7a90cd5dcffed397c894e480672d667c (patch)
treebfe04a6aad8f8daa987b49fee195594ed0f49a45
parent8ec05779e3cb42654fd774906561d586b4f1095e (diff)
downloadrockbox-a3ed6e9c7a90cd5dcffed397c894e480672d667c.zip
rockbox-a3ed6e9c7a90cd5dcffed397c894e480672d667c.tar.gz
rockbox-a3ed6e9c7a90cd5dcffed397c894e480672d667c.tar.bz2
rockbox-a3ed6e9c7a90cd5dcffed397c894e480672d667c.tar.xz
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
-rw-r--r--firmware/drivers/ata.c14
-rw-r--r--firmware/kernel.c7
-rw-r--r--firmware/system.c2
-rw-r--r--firmware/usb.c12
4 files changed, 27 insertions, 8 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 3390739..cfdae2c 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -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
}
diff --git a/firmware/kernel.c b/firmware/kernel.c
index ca0dcf5..1306b4b 100644
--- a/firmware/kernel.c
+++ b/firmware/kernel.c
@@ -257,13 +257,6 @@ void TIMER0(void)
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.
diff --git a/firmware/system.c b/firmware/system.c
index 3ead7c6..9d3e2a0 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -142,7 +142,7 @@ static void extra_init(void) {
P10 &= 0x20;
smsc_delay();
if (smsc_version() < 4) {
- P6 |= 0x80;
+ P6 |= 0x08;
P10 |= 0x20;
}
diff --git a/firmware/usb.c b/firmware/usb.c
index 1400805..6095bcd 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -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();