Subversion Repositories freemyipod

Rev

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

Rev 636 Rev 835
Line 733... Line 733...
733
    if (nand_type[bank] < 0)
733
    if (nand_type[bank] < 0)
734
        return (struct nand_device_info_type*)0;
734
        return (struct nand_device_info_type*)0;
735
    return &nand_deviceinfotable[nand_type[bank]];
735
    return &nand_deviceinfotable[nand_type[bank]];
736
}
736
}
737
 
737
 
738
static void nand_thread(void)
738
static void nand_thread(void* arg0, void* arg1, void* arg2, void* arg3)
739
{
739
{
740
    while (1)
740
    while (1)
741
    {
741
    {
742
        mutex_lock(&nand_mtx, TIMEOUT_BLOCK);
742
        mutex_lock(&nand_mtx, TIMEOUT_BLOCK);
743
        if (TIME_AFTER(USEC_TIMER, nand_last_activity_value + 200000) && nand_powered)
743
        if (TIME_AFTER(USEC_TIMER, nand_last_activity_value + 200000) && nand_powered)
Line 794... Line 794...
794
    nand_interleaved = ((nand_type[0] >> 22) & 1);
794
    nand_interleaved = ((nand_type[0] >> 22) & 1);
795
    nand_cached = ((nand_type[0] >> 23) & 1);
795
    nand_cached = ((nand_type[0] >> 23) & 1);
796
 
796
 
797
    nand_last_activity_value = USEC_TIMER;
797
    nand_last_activity_value = USEC_TIMER;
798
    thread_create(&nand_thread_handle, "NAND idle monitor", nand_thread, nand_stack,
798
    thread_create(&nand_thread_handle, "NAND idle monitor", nand_thread, nand_stack,
799
                  sizeof(nand_stack), OS_THREAD, 1, true);
799
                  sizeof(nand_stack), OS_THREAD, 1, true, NULL, NULL, NULL, NULL);
800
 
800
 
801
    return 0;
801
    return 0;
802
}
802
}