blob: 34c17af8a168d72a49b8e26d574a16105d43894c [file] [log] [blame]
Dave Chapman28f6ae42007-10-28 11:08:10 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 Dave Chapman
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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.
Dave Chapman28f6ae42007-10-28 11:08:10 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include "ata.h"
22#include "ata-target.h"
23#include "ata_idle_notify.h"
24#include "system.h"
25#include <string.h>
26#include "thread.h"
27#include "led.h"
28#include "disk.h"
29#include "panic.h"
30#include "usb.h"
31
32/* for compatibility */
33int ata_spinup_time = 0;
34
35long last_disk_activity = -1;
36
Dave Chapmanf2042982008-05-02 19:12:09 +000037/* Used to store (fake?) identify info */
38static unsigned short identify_info[256];
39
Dave Chapman28f6ae42007-10-28 11:08:10 +000040/** static, private data **/
41static bool initialized = false;
42
43static long next_yield = 0;
44#define MIN_YIELD_PERIOD 2000
45
46/* API Functions */
47
48void ata_led(bool onoff)
49{
50 led(onoff);
51}
52
53int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int incount,
54 void* inbuf)
55{
56
57}
58
59int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count,
60 const void* outbuf)
61{
62}
63
64void ata_spindown(int seconds)
65{
66 (void)seconds;
67}
68
69bool ata_disk_is_active(void)
70{
71 return 0;
72}
73
74void ata_sleep(void)
75{
76}
77
78void ata_spin(void)
79{
80}
81
82/* Hardware reset protocol as specified in chapter 9.1, ATA spec draft v5 */
83int ata_hard_reset(void)
84{
85 return 0;
86}
87
88int ata_soft_reset(void)
89{
90 return 0;
91}
92
93void ata_enable(bool on)
94{
95}
96
97int ata_init(void)
98{
Dave Chapmanf2042982008-05-02 19:12:09 +000099 return 0;
100}
101
102/* TEMP: This will return junk, it's here for compilation only */
103unsigned short* ata_get_identify(void)
104{
105 return identify_info;
Dave Chapman28f6ae42007-10-28 11:08:10 +0000106}