fix ata-nand-s5l8700 compilation properly this time
[kugel-rb.git] / firmware / target / arm / s5l8700 / ata-nand-s5l8700.c
blob100bb7c20b9c4f3f3c4b557bc1794074f876b84c
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
21 #include "nand.h"
22 #include "ata_idle_notify.h"
23 #include "system.h"
24 #include <string.h>
25 #include "thread.h"
26 #include "led.h"
27 #include "disk.h"
28 #include "panic.h"
29 #include "usb.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
40 /* API Functions */
42 void nand_led(bool onoff)
44 led(onoff);
47 int nand_read_sectors(IF_MD2(int drive,) unsigned long start, int incount,
48 void* inbuf)
50 (void)start;
51 (void)incount;
52 (void)inbuf;
53 return 0;
56 int nand_write_sectors(IF_MD2(int drive,) unsigned long start, int count,
57 const void* outbuf)
59 (void)start;
60 (void)count;
61 (void)outbuf;
62 return 0;
65 void nand_spindown(int seconds)
67 (void)seconds;
70 void nand_sleep(void)
74 void nand_spin(void)
78 void nand_enable(bool on)
80 (void)on;
83 void nand_get_info(IF_MD2(int drive,) struct storage_info *info)
85 (void)info;
88 long nand_last_disk_activity(void)
90 return 0;
93 int nand_init(void)
95 initialized = true;
96 return 0;
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 */
103 (void)first_drive;
105 return 1;
107 #endif