summaryrefslogtreecommitdiff
path: root/firmware/target/arm/sandisk/sansa-e200/ata-e200.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/sandisk/sansa-e200/ata-e200.c')
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/ata-e200.c198
1 files changed, 198 insertions, 0 deletions
diff --git a/firmware/target/arm/sandisk/sansa-e200/ata-e200.c b/firmware/target/arm/sandisk/sansa-e200/ata-e200.c
new file mode 100644
index 0000000000..0c37753c53
--- /dev/null
+++ b/firmware/target/arm/sandisk/sansa-e200/ata-e200.c
@@ -0,0 +1,198 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Daniel Stenberg
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include "ata.h"
21#include <stdbool.h>
22#include <string.h>
23
24#define SECTOR_SIZE (512)
25
26static unsigned short identify_info[SECTOR_SIZE];
27int ata_spinup_time = 0;
28long last_disk_activity = -1;
29
30void flash_select_chip(int no, int sel)
31{
32
33}
34
35unsigned char flash_read_data(void)
36{
37
38}
39
40void flash_write_data(unsigned char data)
41{
42
43}
44
45void flash_write_cmd(unsigned char cmd)
46{
47
48}
49
50void flash_write_addr(unsigned char addr)
51{
52
53}
54
55void flash_wait_ready(void)
56{
57
58}
59
60int flash_map_sector(int sector, int* chip, int* chip_sector)
61{
62
63}
64
65int flash_read_id(int no)
66{
67
68}
69
70int flash_read_sector(int sector, unsigned char* buf,
71 unsigned char* oob)
72{
73
74}
75
76int flash_read_sector_oob(int sector, unsigned char* oob)
77{
78
79}
80
81static int flash_get_n_segments(void)
82{
83
84}
85
86static int flash_get_n_phblocks(void)
87{
88
89}
90
91static int flash_get_n_sectors_in_block(void)
92{
93
94}
95
96static int flash_phblock_to_sector(int segment, int block)
97{
98
99}
100
101static int flash_is_bad_block(unsigned char* oob)
102{
103
104}
105
106int flash_disk_scan(void)
107{
108
109}
110
111int flash_disk_find_block(int block)
112{
113
114}
115
116int flash_disk_read_sectors(unsigned long start,
117 int count,
118 void* buf)
119{
120
121}
122
123int ata_read_sectors(IF_MV2(int drive,)
124 unsigned long start,
125 int incount,
126 void* inbuf)
127{
128
129}
130
131int ata_write_sectors(IF_MV2(int drive,)
132 unsigned long start,
133 int count,
134 const void* buf)
135{
136 (void)start;
137 (void)count;
138 (void)buf;
139 return -1;
140}
141
142/* schedule a single sector write, executed with the the next spinup
143 (volume 0 only, used for config sector) */
144extern void ata_delayed_write(unsigned long sector, const void* buf)
145{
146 (void)sector;
147 (void)buf;
148}
149
150/* write the delayed sector to volume 0 */
151extern void ata_flush(void)
152{
153
154}
155
156void ata_spindown(int seconds)
157{
158 (void)seconds;
159}
160
161bool ata_disk_is_active(void)
162{
163 return 0;
164}
165
166void ata_sleep(void)
167{
168}
169
170void ata_spin(void)
171{
172}
173
174/* Hardware reset protocol as specified in chapter 9.1, ATA spec draft v5 */
175int ata_hard_reset(void)
176{
177 return 0;
178}
179
180int ata_soft_reset(void)
181{
182 return 0;
183}
184
185void ata_enable(bool on)
186{
187 (void)on;
188}
189
190unsigned short* ata_get_identify(void)
191{
192
193}
194
195int ata_init(void)
196{
197 return 0;
198}