1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 Dave Chapman
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #include "ata_idle_notify.h"
31 /* for compatibility */
32 long last_disk_activity
= -1;
34 /** static, private data **/
35 static bool initialized
= false;
37 static long next_yield
= 0;
38 #define MIN_YIELD_PERIOD 2000
42 void nand_led(bool onoff
)
47 int nand_read_sectors(IF_MD2(int drive
,) unsigned long start
, int incount
,
56 int nand_write_sectors(IF_MD2(int drive
,) unsigned long start
, int count
,
65 void nand_spindown(int seconds
)
78 void nand_enable(bool on
)
83 void nand_get_info(IF_MD2(int drive
,) struct storage_info
*info
)
88 long nand_last_disk_activity(void)
99 #ifdef CONFIG_STORAGE_MULTI
100 int nand_num_drives(int first_drive
)
102 /* We don't care which logical drive number(s) we have been assigned */