summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-05-17 16:19:58 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-05-17 16:19:58 +0000
commitd587247ebdde98058bcd90911e1d10147bd1fab5 (patch)
treecd0d59da67f96eb7d9fdc40bb88e9c611bedba58 /firmware/drivers
parentc8c0f4590bd0564689cbc28155d368b84d17f369 (diff)
downloadrockbox-d587247ebdde98058bcd90911e1d10147bd1fab5.zip
rockbox-d587247ebdde98058bcd90911e1d10147bd1fab5.tar.gz
rockbox-d587247ebdde98058bcd90911e1d10147bd1fab5.tar.bz2
rockbox-d587247ebdde98058bcd90911e1d10147bd1fab5.tar.xz
Actually remove the ata lock hack code for that had been used for iPod Video 60/80. It has been disabled for awhile anyway and the problem that nescessitated it really appears resolved.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17558 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/ata.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 1e42bed..6a1db22 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -71,74 +71,6 @@
static struct thread_entry *ata_thread_p = NULL;
#endif
-#if 0 /* defined(MAX_PHYS_SECTOR_SIZE) && MEM == 64 */
-/* Hack - what's the deal with 5g? */
-struct ata_lock
-{
- struct thread_entry *thread;
- int count;
- volatile unsigned char locked;
- IF_COP( struct corelock cl; )
-};
-
-static void ata_lock_init(struct ata_lock *l)
-{
- corelock_init(&l->cl);
- l->locked = 0;
- l->count = 0;
- l->thread = NULL;
-}
-
-static void ata_lock_lock(struct ata_lock *l)
-{
- struct thread_entry * const current = thread_get_current();
-
- if (current == l->thread)
- {
- l->count++;
- return;
- }
-
- corelock_lock(&l->cl);
-
- IF_PRIO( current->skip_count = -1; )
-
- while (l->locked != 0)
- {
- corelock_unlock(&l->cl);
- switch_thread();
- corelock_lock(&l->cl);
- }
-
- l->locked = 1;
- l->thread = current;
- corelock_unlock(&l->cl);
-}
-
-static void ata_lock_unlock(struct ata_lock *l)
-{
- if (l->count > 0)
- {
- l->count--;
- return;
- }
-
- corelock_lock(&l->cl);
-
- IF_PRIO( l->thread->skip_count = 0; )
-
- l->thread = NULL;
- l->locked = 0;
-
- corelock_unlock(&l->cl);
-}
-
-#define mutex ata_lock
-#define mutex_init ata_lock_init
-#define mutex_lock ata_lock_lock
-#define mutex_unlock ata_lock_unlock
-#endif /* MAX_PHYS_SECTOR_SIZE */
-
static struct mutex ata_mtx SHAREDBSS_ATTR;
int ata_device; /* device 0 (master) or 1 (slave) */