| 54 |
theseven |
1 |
/***************************************************************************
|
|
|
2 |
* __________ __ ___.
|
|
|
3 |
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
4 |
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
5 |
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
6 |
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
7 |
* \/ \/ \/ \/ \/
|
|
|
8 |
* $Id$
|
|
|
9 |
*
|
|
|
10 |
* Copyright (C) 2002 by Alan Korr
|
|
|
11 |
* Copyright (C) 2008 by Frank Gevaerts
|
|
|
12 |
*
|
|
|
13 |
* This program is free software; you can redistribute it and/or
|
|
|
14 |
* modify it under the terms of the GNU General Public License
|
|
|
15 |
* as published by the Free Software Foundation; either version 2
|
|
|
16 |
* of the License, or (at your option) any later version.
|
|
|
17 |
*
|
|
|
18 |
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
19 |
* KIND, either express or implied.
|
|
|
20 |
*
|
|
|
21 |
****************************************************************************/
|
|
|
22 |
#ifndef __STORAGE_NAND_H__
|
|
|
23 |
#define __STORAGE_NAND_H__
|
|
|
24 |
|
|
|
25 |
#include "global.h"
|
|
|
26 |
#include "mv.h" /* for HAVE_MULTIDRIVE or not */
|
|
|
27 |
|
|
|
28 |
struct storage_info;
|
|
|
29 |
|
|
|
30 |
void nand_enable(bool on);
|
|
|
31 |
void nand_spindown(int seconds);
|
|
|
32 |
void nand_sleep(void);
|
|
|
33 |
void nand_sleepnow(void);
|
|
|
34 |
bool nand_disk_is_active(void);
|
|
|
35 |
int nand_soft_reset(void);
|
|
|
36 |
int nand_init(void);
|
|
|
37 |
void nand_close(void);
|
|
|
38 |
int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
|
|
|
39 |
int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
|
|
|
40 |
#ifdef HAVE_STORAGE_FLUSH
|
|
|
41 |
int nand_flush(void);
|
|
|
42 |
#endif
|
|
|
43 |
void nand_spin(void);
|
|
|
44 |
int nand_spinup_time(void); /* ticks */
|
|
|
45 |
|
|
|
46 |
#ifdef STORAGE_GET_INFO
|
|
|
47 |
void nand_get_info(IF_MD2(int drive,) struct storage_info *info);
|
|
|
48 |
#endif
|
|
|
49 |
|
|
|
50 |
long nand_last_disk_activity(void);
|
|
|
51 |
|
|
|
52 |
#ifdef CONFIG_STORAGE_MULTI
|
|
|
53 |
int nand_num_drives(int first_drive);
|
|
|
54 |
#endif
|
|
|
55 |
|
|
|
56 |
#endif
|