summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/sandisk/sansa-e200/ata.c
blob: 0c37753c53557cd5cb6cbcbddac6002e193c90be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/***************************************************************************
 *             __________               __   ___.
 *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
 *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
 *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
 *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
 *                     \/            \/     \/    \/            \/
 * $Id$
 *
 * Copyright (C) 2006 Daniel Stenberg
 *
 * All files in this archive are subject to the GNU General Public License.
 * See the file COPYING in the source tree root for full license agreement.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ****************************************************************************/

#include "ata.h"
#include <stdbool.h>
#include <string.h>

#define SECTOR_SIZE     (512)

static unsigned short identify_info[SECTOR_SIZE];
int ata_spinup_time = 0;
long last_disk_activity = -1;

void flash_select_chip(int no, int sel)
{

}

unsigned char flash_read_data(void)
{

}

void flash_write_data(unsigned char data)
{

}

void flash_write_cmd(unsigned char cmd)
{

}

void flash_write_addr(unsigned char addr)
{

}

void flash_wait_ready(void)
{

}

int flash_map_sector(int sector, int* chip, int* chip_sector)
{

}

int flash_read_id(int no)
{

}

int flash_read_sector(int sector, unsigned char* buf,
                      unsigned char* oob)
{

}

int flash_read_sector_oob(int sector, unsigned char* oob)
{

}

static int flash_get_n_segments(void)
{

}

static int flash_get_n_phblocks(void)
{

}

static int flash_get_n_sectors_in_block(void)
{

}

static int flash_phblock_to_sector(int segment, int block)
{

}

static int flash_is_bad_block(unsigned char* oob)
{

}

int flash_disk_scan(void)
{

}

int flash_disk_find_block(int block)
{

}

int flash_disk_read_sectors(unsigned long start,
                            int count,
                            void* buf)
{

}

int ata_read_sectors(IF_MV2(int drive,)
                     unsigned long start,
                     int incount,
                     void* inbuf)
{

}

int ata_write_sectors(IF_MV2(int drive,)
                      unsigned long start,
                      int count,
                      const void* buf)
{
    (void)start;
    (void)count;
    (void)buf;
    return -1;
}

/* schedule a single sector write, executed with the the next spinup 
   (volume 0 only, used for config sector) */
extern void ata_delayed_write(unsigned long sector, const void* buf)
{
    (void)sector;
    (void)buf;
}

/* write the delayed sector to volume 0 */
extern void ata_flush(void)
{

}

void ata_spindown(int seconds)
{
    (void)seconds;
}

bool ata_disk_is_active(void)
{
  return 0;
}

void ata_sleep(void)
{
}

void ata_spin(void)
{
}

/* Hardware reset protocol as specified in chapter 9.1, ATA spec draft v5 */
int ata_hard_reset(void)
{
  return 0;
}

int ata_soft_reset(void)
{
  return 0;
}

void ata_enable(bool on)
{
    (void)on;
}

unsigned short* ata_get_identify(void)
{

}

int ata_init(void)
{
    return 0;
}