diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2014-08-08 03:23:29 -0400 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2014-08-08 03:23:29 -0400 |
| commit | 9a3400a4a667e32d1dd0b50364b083787ff63320 (patch) | |
| tree | 5676a100428362373b96249d2891c131f9fcf44b /firmware/drivers | |
| parent | 4ea4cdfc11a87927d696d4966c6c433bd5e6bf90 (diff) | |
| download | rockbox-9a3400a4a667e32d1dd0b50364b083787ff63320.zip rockbox-9a3400a4a667e32d1dd0b50364b083787ff63320.tar.gz rockbox-9a3400a4a667e32d1dd0b50364b083787ff63320.tar.bz2 rockbox-9a3400a4a667e32d1dd0b50364b083787ff63320.tar.xz | |
Fix some more straggling stuff
* HWCODEC bootloaders
* Remove references to thread structures outside the kernel. They are
private and should not be used elsewhere. The mrobe-100 is an offender
that gets squashed.
* The ata.c hack stuff for large sector disks on iPod Video gets squashed
for the same reason. I will no longer maintain it, period; please find
the real reason for its difficulties.
Change-Id: Iae1a675beac887754eb3cc59b560c941077523f5
Diffstat (limited to 'firmware/drivers')
| -rw-r--r-- | firmware/drivers/ata.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 4b365a5..355ff37 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -79,74 +79,6 @@ static unsigned int ata_thread_id = 0; #endif -#if defined(MAX_PHYS_SECTOR_SIZE) && MEMORYSIZE == 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_self_entry(); - - 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 */ - #if defined(HAVE_USBSTACK) && defined(USE_ROCKBOX_USB) #define ALLOW_USB_SPINDOWN #endif |