Subversion Repositories freemyipod

Rev

Rev 424 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 424 Rev 429
Line 34... Line 34...
34
static struct mutex ata_mutex;
34
static struct mutex ata_mutex;
35
static struct wakeup ata_wakeup;
35
static struct wakeup ata_wakeup;
36
static uint32_t ata_dma_flags;
36
static uint32_t ata_dma_flags;
37
static long ata_last_activity_value = -1;
37
static long ata_last_activity_value = -1;
38
static long ata_sleep_timeout = 20000000;
38
static long ata_sleep_timeout = 20000000;
-
 
39
static struct scheduler_thread ata_thread_handle;
39
static uint32_t ata_stack[0x80];
40
static uint32_t ata_stack[0x80] STACK_ATTR;
40
static bool ata_powered;
41
static bool ata_powered;
41
 
42
 
42
#ifdef ATA_HAVE_BBT
43
#ifdef ATA_HAVE_BBT
43
#include "panic.h"
44
#include "panic.h"
44
uint16_t ata_bbt[ATA_BBT_PAGES][0x20];
45
uint16_t ata_bbt[ATA_BBT_PAGES][0x20];
Line 550... Line 551...
550
        }
551
        }
551
    }
552
    }
552
    else ata_virtual_sectors = ata_total_sectors;
553
    else ata_virtual_sectors = ata_total_sectors;
553
    mutex_unlock(&ata_mutex);
554
    mutex_unlock(&ata_mutex);
554
#endif
555
#endif
555
    thread_create("ATA idle monitor", ata_thread, ata_stack,
556
    thread_create(&ata_thread_handle, "ATA idle monitor", ata_thread, ata_stack,
556
                  sizeof(ata_stack), USER_THREAD, 1, true);
557
                  sizeof(ata_stack), USER_THREAD, 1, true);
557
    return 0;
558
    return 0;
558
}
559
}
559
 
560
 
560
#ifdef CONFIG_STORAGE_MULTI
561
#ifdef CONFIG_STORAGE_MULTI