Fix ata_idle_notify on iPod Nano 2G

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27020 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sparmann 2010-06-21 16:54:25 +00:00
parent 35e8b1429a
commit b59d6642e2
2 changed files with 5 additions and 2 deletions

View file

@ -19,7 +19,6 @@
*
****************************************************************************/
#include "config.h"
#include "ata_idle_notify.h"
#include "system.h"
#include <string.h>
#include "thread.h"

View file

@ -31,6 +31,7 @@
#include <mmu-arm.h>
#include <string.h>
#include "led.h"
#include "ata_idle_notify.h"
#define NAND_CMD_READ 0x00
@ -92,7 +93,7 @@ int nand_powered = 0;
int nand_interleaved = 0;
int nand_cached = 0;
long nand_last_activity_value = -1;
static long nand_stack[32];
static long nand_stack[DEFAULT_STACK_SIZE];
static struct mutex nand_mtx;
static struct wakeup nand_wakeup;
@ -721,7 +722,10 @@ static void nand_thread(void)
{
if (TIME_AFTER(current_tick, nand_last_activity_value + HZ / 5)
&& nand_powered)
{
call_storage_idle_notifys(false);
nand_power_down();
}
sleep(HZ / 10);
}
}