mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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:
parent
35e8b1429a
commit
b59d6642e2
2 changed files with 5 additions and 2 deletions
|
|
@ -19,7 +19,6 @@
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "ata_idle_notify.h"
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include <mmu-arm.h>
|
#include <mmu-arm.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
#include "ata_idle_notify.h"
|
||||||
|
|
||||||
|
|
||||||
#define NAND_CMD_READ 0x00
|
#define NAND_CMD_READ 0x00
|
||||||
|
|
@ -92,7 +93,7 @@ int nand_powered = 0;
|
||||||
int nand_interleaved = 0;
|
int nand_interleaved = 0;
|
||||||
int nand_cached = 0;
|
int nand_cached = 0;
|
||||||
long nand_last_activity_value = -1;
|
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 mutex nand_mtx;
|
||||||
static struct wakeup nand_wakeup;
|
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)
|
if (TIME_AFTER(current_tick, nand_last_activity_value + HZ / 5)
|
||||||
&& nand_powered)
|
&& nand_powered)
|
||||||
|
{
|
||||||
|
call_storage_idle_notifys(false);
|
||||||
nand_power_down();
|
nand_power_down();
|
||||||
|
}
|
||||||
sleep(HZ / 10);
|
sleep(HZ / 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue