diff options
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/creativezvm.c | 4 | ||||
-rw-r--r-- | bootloader/gigabeat-s.c | 8 | ||||
-rw-r--r-- | bootloader/gigabeat.c | 6 | ||||
-rw-r--r-- | bootloader/iaudio_coldfire.c | 8 | ||||
-rw-r--r-- | bootloader/iriver_h1x0.c | 12 | ||||
-rw-r--r-- | bootloader/iriver_h300.c | 12 | ||||
-rw-r--r-- | bootloader/main-c240wipe.c | 14 | ||||
-rw-r--r-- | bootloader/main-c250wipe.c | 16 | ||||
-rw-r--r-- | bootloader/main-e200r-installer.c | 8 | ||||
-rw-r--r-- | bootloader/main-pp.c | 16 | ||||
-rw-r--r-- | bootloader/meizu_m3.c | 2 | ||||
-rw-r--r-- | bootloader/meizu_m6sl.c | 2 | ||||
-rw-r--r-- | bootloader/meizu_m6sp.c | 2 | ||||
-rw-r--r-- | bootloader/mrobe500.c | 8 | ||||
-rw-r--r-- | bootloader/ondavx747.c | 2 | ||||
-rw-r--r-- | bootloader/sansa_as3525.c | 4 | ||||
-rw-r--r-- | bootloader/telechips.c | 4 | ||||
-rw-r--r-- | bootloader/tpj1022.c | 4 |
18 files changed, 66 insertions, 66 deletions
diff --git a/bootloader/creativezvm.c b/bootloader/creativezvm.c index bd8050b22a..403a8bbdc4 100644 --- a/bootloader/creativezvm.c +++ b/bootloader/creativezvm.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "lcd.h" | 21 | #include "lcd.h" |
22 | #include "kernel.h" | 22 | #include "kernel.h" |
23 | #include "thread.h" | 23 | #include "thread.h" |
24 | #include "ata.h" | 24 | #include "storage.h" |
25 | #include "ata-target.h" | 25 | #include "ata-target.h" |
26 | #include "disk.h" | 26 | #include "disk.h" |
27 | #include "font.h" | 27 | #include "font.h" |
@@ -64,7 +64,7 @@ void main(void) | |||
64 | printf("Rockbox boot loader"); | 64 | printf("Rockbox boot loader"); |
65 | printf("Version %s", APPSVERSION); | 65 | printf("Version %s", APPSVERSION); |
66 | 66 | ||
67 | ret = ata_init(); | 67 | ret = storage_init(); |
68 | if(ret) | 68 | if(ret) |
69 | printf("ATA error: %d", ret); | 69 | printf("ATA error: %d", ret); |
70 | 70 | ||
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c index 089d0f7890..e1e293fb55 100644 --- a/bootloader/gigabeat-s.c +++ b/bootloader/gigabeat-s.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "string.h" | 25 | #include "string.h" |
26 | #include "adc.h" | 26 | #include "adc.h" |
27 | #include "powermgmt.h" | 27 | #include "powermgmt.h" |
28 | #include "ata.h" | 28 | #include "storage.h" |
29 | #include "dir.h" | 29 | #include "dir.h" |
30 | #include "disk.h" | 30 | #include "disk.h" |
31 | #include "common.h" | 31 | #include "common.h" |
@@ -81,7 +81,7 @@ static bool pause_if_button_pressed(bool pre_usb) | |||
81 | sleep(HZ/5); | 81 | sleep(HZ/5); |
82 | 82 | ||
83 | /* If the disk powers off, the firmware will lock at startup */ | 83 | /* If the disk powers off, the firmware will lock at startup */ |
84 | ata_spin(); | 84 | storage_spin(); |
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
@@ -310,7 +310,7 @@ static void __attribute__((noreturn)) handle_firmware_load(void) | |||
310 | 310 | ||
311 | /* Put drivers into a known state */ | 311 | /* Put drivers into a known state */ |
312 | button_close_device(); | 312 | button_close_device(); |
313 | ata_close(); | 313 | storage_close(); |
314 | system_prepare_fw_start(); | 314 | system_prepare_fw_start(); |
315 | 315 | ||
316 | if (rc == EOK) | 316 | if (rc == EOK) |
@@ -353,7 +353,7 @@ void main(void) | |||
353 | 353 | ||
354 | check_battery(); | 354 | check_battery(); |
355 | 355 | ||
356 | rc = ata_init(); | 356 | rc = storage_init(); |
357 | if(rc) | 357 | if(rc) |
358 | { | 358 | { |
359 | reset_screen(); | 359 | reset_screen(); |
diff --git a/bootloader/gigabeat.c b/bootloader/gigabeat.c index 117dacc2b2..6b3a68be6e 100644 --- a/bootloader/gigabeat.c +++ b/bootloader/gigabeat.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "lcd.h" | 29 | #include "lcd.h" |
30 | #include "kernel.h" | 30 | #include "kernel.h" |
31 | #include "thread.h" | 31 | #include "thread.h" |
32 | #include "ata.h" | 32 | #include "storage.h" |
33 | #include "fat.h" | 33 | #include "fat.h" |
34 | #include "disk.h" | 34 | #include "disk.h" |
35 | #include "font.h" | 35 | #include "font.h" |
@@ -75,7 +75,7 @@ void main(void) | |||
75 | (LCD_HEIGHT - SYSFONT_HEIGHT) / 2, msg); | 75 | (LCD_HEIGHT - SYSFONT_HEIGHT) / 2, msg); |
76 | lcd_update(); | 76 | lcd_update(); |
77 | 77 | ||
78 | ata_enable(false); | 78 | storage_enable(false); |
79 | sleep(HZ/20); | 79 | sleep(HZ/20); |
80 | usb_enable(true); | 80 | usb_enable(true); |
81 | 81 | ||
@@ -101,7 +101,7 @@ void main(void) | |||
101 | 101 | ||
102 | sleep(50); /* ATA seems to error without this pause */ | 102 | sleep(50); /* ATA seems to error without this pause */ |
103 | 103 | ||
104 | rc = ata_init(); | 104 | rc = storage_init(); |
105 | if(rc) | 105 | if(rc) |
106 | { | 106 | { |
107 | reset_screen(); | 107 | reset_screen(); |
diff --git a/bootloader/iaudio_coldfire.c b/bootloader/iaudio_coldfire.c index 8e85dc9deb..0af2f25256 100644 --- a/bootloader/iaudio_coldfire.c +++ b/bootloader/iaudio_coldfire.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "lcd-remote.h" | 30 | #include "lcd-remote.h" |
31 | #include "kernel.h" | 31 | #include "kernel.h" |
32 | #include "thread.h" | 32 | #include "thread.h" |
33 | #include "ata.h" | 33 | #include "storage.h" |
34 | #include "usb.h" | 34 | #include "usb.h" |
35 | #include "disk.h" | 35 | #include "disk.h" |
36 | #include "font.h" | 36 | #include "font.h" |
@@ -87,10 +87,10 @@ void shutdown(void) | |||
87 | if (ide_powered()) | 87 | if (ide_powered()) |
88 | { | 88 | { |
89 | /* Make sure ATA has been initialized. */ | 89 | /* Make sure ATA has been initialized. */ |
90 | ata_init(); | 90 | storage_init(); |
91 | 91 | ||
92 | /* And put the disk into sleep immediately. */ | 92 | /* And put the disk into sleep immediately. */ |
93 | ata_sleepnow(); | 93 | storage_sleepnow(); |
94 | } | 94 | } |
95 | 95 | ||
96 | sleep(HZ*2); | 96 | sleep(HZ*2); |
@@ -192,7 +192,7 @@ void main(void) | |||
192 | 192 | ||
193 | check_battery(); | 193 | check_battery(); |
194 | 194 | ||
195 | rc = ata_init(); | 195 | rc = storage_init(); |
196 | if(rc) | 196 | if(rc) |
197 | { | 197 | { |
198 | printf("ATA error: %d", rc); | 198 | printf("ATA error: %d", rc); |
diff --git a/bootloader/iriver_h1x0.c b/bootloader/iriver_h1x0.c index 7f051bccb5..83e545540b 100644 --- a/bootloader/iriver_h1x0.c +++ b/bootloader/iriver_h1x0.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "scroll_engine.h" | 31 | #include "scroll_engine.h" |
32 | #include "kernel.h" | 32 | #include "kernel.h" |
33 | #include "thread.h" | 33 | #include "thread.h" |
34 | #include "ata.h" | 34 | #include "storage.h" |
35 | #include "usb.h" | 35 | #include "usb.h" |
36 | #include "disk.h" | 36 | #include "disk.h" |
37 | #include "font.h" | 37 | #include "font.h" |
@@ -148,10 +148,10 @@ void shutdown(void) | |||
148 | if (ide_powered()) | 148 | if (ide_powered()) |
149 | { | 149 | { |
150 | /* Make sure ATA has been initialized. */ | 150 | /* Make sure ATA has been initialized. */ |
151 | ata_init(); | 151 | storage_init(); |
152 | 152 | ||
153 | /* And put the disk into sleep immediately. */ | 153 | /* And put the disk into sleep immediately. */ |
154 | ata_sleepnow(); | 154 | storage_sleepnow(); |
155 | } | 155 | } |
156 | 156 | ||
157 | sleep(HZ*2); | 157 | sleep(HZ*2); |
@@ -560,7 +560,7 @@ void main(void) | |||
560 | } | 560 | } |
561 | #endif | 561 | #endif |
562 | ide_power_enable(true); | 562 | ide_power_enable(true); |
563 | ata_enable(false); | 563 | storage_enable(false); |
564 | sleep(HZ/20); | 564 | sleep(HZ/20); |
565 | usb_enable(true); | 565 | usb_enable(true); |
566 | cpu_idle_mode(true); | 566 | cpu_idle_mode(true); |
@@ -571,7 +571,7 @@ void main(void) | |||
571 | remote_line = 0; | 571 | remote_line = 0; |
572 | check_battery(); | 572 | check_battery(); |
573 | 573 | ||
574 | ata_spin(); /* Prevent the drive from spinning down */ | 574 | storage_spin(); /* Prevent the drive from spinning down */ |
575 | sleep(HZ); | 575 | sleep(HZ); |
576 | 576 | ||
577 | /* Backlight OFF */ | 577 | /* Backlight OFF */ |
@@ -585,7 +585,7 @@ void main(void) | |||
585 | lcd_update(); | 585 | lcd_update(); |
586 | } | 586 | } |
587 | 587 | ||
588 | rc = ata_init(); | 588 | rc = storage_init(); |
589 | if(rc) | 589 | if(rc) |
590 | { | 590 | { |
591 | reset_screen(); | 591 | reset_screen(); |
diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c index 9d839aed29..d15efb9b72 100644 --- a/bootloader/iriver_h300.c +++ b/bootloader/iriver_h300.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "scroll_engine.h" | 31 | #include "scroll_engine.h" |
32 | #include "kernel.h" | 32 | #include "kernel.h" |
33 | #include "thread.h" | 33 | #include "thread.h" |
34 | #include "ata.h" | 34 | #include "storage.h" |
35 | #include "usb.h" | 35 | #include "usb.h" |
36 | #include "disk.h" | 36 | #include "disk.h" |
37 | #include "font.h" | 37 | #include "font.h" |
@@ -93,10 +93,10 @@ void shutdown(void) | |||
93 | if (ide_powered()) | 93 | if (ide_powered()) |
94 | { | 94 | { |
95 | /* Make sure ATA has been initialized. */ | 95 | /* Make sure ATA has been initialized. */ |
96 | ata_init(); | 96 | storage_init(); |
97 | 97 | ||
98 | /* And put the disk into sleep immediately. */ | 98 | /* And put the disk into sleep immediately. */ |
99 | ata_sleepnow(); | 99 | storage_sleepnow(); |
100 | } | 100 | } |
101 | 101 | ||
102 | sleep(HZ*2); | 102 | sleep(HZ*2); |
@@ -317,7 +317,7 @@ void main(void) | |||
317 | lcd_remote_update(); | 317 | lcd_remote_update(); |
318 | 318 | ||
319 | ide_power_enable(true); | 319 | ide_power_enable(true); |
320 | ata_enable(false); | 320 | storage_enable(false); |
321 | sleep(HZ/20); | 321 | sleep(HZ/20); |
322 | usb_enable(true); | 322 | usb_enable(true); |
323 | cpu_idle_mode(true); | 323 | cpu_idle_mode(true); |
@@ -328,7 +328,7 @@ void main(void) | |||
328 | remote_line = 0; | 328 | remote_line = 0; |
329 | check_battery(); | 329 | check_battery(); |
330 | 330 | ||
331 | ata_spin(); /* Prevent the drive from spinning down */ | 331 | storage_spin(); /* Prevent the drive from spinning down */ |
332 | sleep(HZ); | 332 | sleep(HZ); |
333 | } | 333 | } |
334 | 334 | ||
@@ -339,7 +339,7 @@ void main(void) | |||
339 | lcd_update(); | 339 | lcd_update(); |
340 | } | 340 | } |
341 | 341 | ||
342 | rc = ata_init(); | 342 | rc = storage_init(); |
343 | if(rc) | 343 | if(rc) |
344 | { | 344 | { |
345 | reset_screen(); | 345 | reset_screen(); |
diff --git a/bootloader/main-c240wipe.c b/bootloader/main-c240wipe.c index 1bf3ac21a3..952382eb5b 100644 --- a/bootloader/main-c240wipe.c +++ b/bootloader/main-c240wipe.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "kernel.h" | 29 | #include "kernel.h" |
30 | #include "lcd.h" | 30 | #include "lcd.h" |
31 | #include "font.h" | 31 | #include "font.h" |
32 | #include "ata.h" | 32 | #include "storage.h" |
33 | #include "button.h" | 33 | #include "button.h" |
34 | #include "disk.h" | 34 | #include "disk.h" |
35 | #include "crc32-mi4.h" | 35 | #include "crc32-mi4.h" |
@@ -185,14 +185,14 @@ void* main(void) | |||
185 | printf(""); | 185 | printf(""); |
186 | 186 | ||
187 | 187 | ||
188 | i=ata_init(); | 188 | i=storage_init(); |
189 | disk_init(IF_MV(0)); | 189 | disk_init(IF_MV(0)); |
190 | 190 | ||
191 | memset(zero,0,16*1024); | 191 | memset(zero,0,16*1024); |
192 | printf("Zeroing flash"); | 192 | printf("Zeroing flash"); |
193 | for(i=0;i<250816;i++) | 193 | for(i=0;i<250816;i++) |
194 | { | 194 | { |
195 | ata_write_sectors(IF_MV2(0,) i*32,32,zero); | 195 | storage_write_sectors(IF_MV2(0,) i*32,32,zero); |
196 | if(i%64 == 0) | 196 | if(i%64 == 0) |
197 | { | 197 | { |
198 | printf("%d kB left",(250816-i)/2); | 198 | printf("%d kB left",(250816-i)/2); |
@@ -200,13 +200,13 @@ void* main(void) | |||
200 | } | 200 | } |
201 | 201 | ||
202 | printf("Writing MBR"); | 202 | printf("Writing MBR"); |
203 | ata_write_sectors(IF_MV2(0,) 0,1,mbr); | 203 | storage_write_sectors(IF_MV2(0,) 0,1,mbr); |
204 | printf("Writing FAT bootsector"); | 204 | printf("Writing FAT bootsector"); |
205 | ata_write_sectors(IF_MV2(0,) 1023,1,fat); | 205 | storage_write_sectors(IF_MV2(0,) 1023,1,fat); |
206 | printf("Writing more FAT"); | 206 | printf("Writing more FAT"); |
207 | ata_write_sectors(IF_MV2(0,) 1024,1,backupfat); | 207 | storage_write_sectors(IF_MV2(0,) 1024,1,backupfat); |
208 | printf("Writing more FAT"); | 208 | printf("Writing more FAT"); |
209 | ata_write_sectors(IF_MV2(0,) 1264,1,backupfat); | 209 | storage_write_sectors(IF_MV2(0,) 1264,1,backupfat); |
210 | if (button_hold()) | 210 | if (button_hold()) |
211 | printf("Release Hold and"); | 211 | printf("Release Hold and"); |
212 | 212 | ||
diff --git a/bootloader/main-c250wipe.c b/bootloader/main-c250wipe.c index fedabb7275..06a0a5b2b5 100644 --- a/bootloader/main-c250wipe.c +++ b/bootloader/main-c250wipe.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "kernel.h" | 29 | #include "kernel.h" |
30 | #include "lcd.h" | 30 | #include "lcd.h" |
31 | #include "font.h" | 31 | #include "font.h" |
32 | #include "ata.h" | 32 | #include "storage.h" |
33 | #include "button.h" | 33 | #include "button.h" |
34 | #include "disk.h" | 34 | #include "disk.h" |
35 | #include "crc32-mi4.h" | 35 | #include "crc32-mi4.h" |
@@ -250,14 +250,14 @@ void* main(void) | |||
250 | printf(""); | 250 | printf(""); |
251 | 251 | ||
252 | 252 | ||
253 | i=ata_init(); | 253 | i=storage_init(); |
254 | disk_init(IF_MV(0)); | 254 | disk_init(IF_MV(0)); |
255 | 255 | ||
256 | memset(zero,0,16*1024); | 256 | memset(zero,0,16*1024); |
257 | printf("Zeroing flash"); | 257 | printf("Zeroing flash"); |
258 | for(i=0;i<250816;i++) | 258 | for(i=0;i<250816;i++) |
259 | { | 259 | { |
260 | ata_write_sectors(IF_MV2(0,) i*32,32,zero); | 260 | storage_write_sectors(IF_MV2(0,) i*32,32,zero); |
261 | if(i%64 == 0) | 261 | if(i%64 == 0) |
262 | { | 262 | { |
263 | printf("%d kB left",(250816-i)/2); | 263 | printf("%d kB left",(250816-i)/2); |
@@ -265,15 +265,15 @@ void* main(void) | |||
265 | } | 265 | } |
266 | 266 | ||
267 | printf("Writing MBR"); | 267 | printf("Writing MBR"); |
268 | ata_write_sectors(IF_MV2(0,) 0,1,mbr); | 268 | storage_write_sectors(IF_MV2(0,) 0,1,mbr); |
269 | printf("Writing FAT bootsector"); | 269 | printf("Writing FAT bootsector"); |
270 | ata_write_sectors(IF_MV2(0,) 1017,2,bootsector); | 270 | storage_write_sectors(IF_MV2(0,) 1017,2,bootsector); |
271 | printf("Writing more FAT"); | 271 | printf("Writing more FAT"); |
272 | ata_write_sectors(IF_MV2(0,) 1023,1,fat); | 272 | storage_write_sectors(IF_MV2(0,) 1023,1,fat); |
273 | printf("Writing more FAT"); | 273 | printf("Writing more FAT"); |
274 | ata_write_sectors(IF_MV2(0,) 1049,1,backupfat); | 274 | storage_write_sectors(IF_MV2(0,) 1049,1,backupfat); |
275 | printf("Writing more FAT"); | 275 | printf("Writing more FAT"); |
276 | ata_write_sectors(IF_MV2(0,) 4920,1,backupfat); | 276 | storage_write_sectors(IF_MV2(0,) 4920,1,backupfat); |
277 | if (button_hold()) | 277 | if (button_hold()) |
278 | printf("Release Hold and"); | 278 | printf("Release Hold and"); |
279 | 279 | ||
diff --git a/bootloader/main-e200r-installer.c b/bootloader/main-e200r-installer.c index b1209e1692..3ac57432a3 100644 --- a/bootloader/main-e200r-installer.c +++ b/bootloader/main-e200r-installer.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "kernel.h" | 31 | #include "kernel.h" |
32 | #include "lcd.h" | 32 | #include "lcd.h" |
33 | #include "font.h" | 33 | #include "font.h" |
34 | #include "ata.h" | 34 | #include "storage.h" |
35 | #include "button.h" | 35 | #include "button.h" |
36 | #include "disk.h" | 36 | #include "disk.h" |
37 | #include "crc32-mi4.h" | 37 | #include "crc32-mi4.h" |
@@ -120,7 +120,7 @@ void* main(void) | |||
120 | printf(MODEL_NAME); | 120 | printf(MODEL_NAME); |
121 | printf(""); | 121 | printf(""); |
122 | 122 | ||
123 | i=ata_init(); | 123 | i=storage_init(); |
124 | disk_init(IF_MV(0)); | 124 | disk_init(IF_MV(0)); |
125 | num_partitions = disk_mount_all(); | 125 | num_partitions = disk_mount_all(); |
126 | 126 | ||
@@ -139,7 +139,7 @@ void* main(void) | |||
139 | printf("reading: %x", (START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK)*512); | 139 | printf("reading: %x", (START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK)*512); |
140 | #endif | 140 | #endif |
141 | 141 | ||
142 | ata_read_sectors(IF_MV2(0,) | 142 | storage_read_sectors(IF_MV2(0,) |
143 | pinfo->start + START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK, | 143 | pinfo->start + START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK, |
144 | 1 , sector); | 144 | 1 , sector); |
145 | crc32 = chksum_crc32 (sector, 512); | 145 | crc32 = chksum_crc32 (sector, 512); |
@@ -161,7 +161,7 @@ void* main(void) | |||
161 | /* E200R bootloader detected - patch it */ | 161 | /* E200R bootloader detected - patch it */ |
162 | memcpy(§or[HACK_OFFSET], changedBytes, | 162 | memcpy(§or[HACK_OFFSET], changedBytes, |
163 | sizeof(changedBytes)/sizeof(*changedBytes)); | 163 | sizeof(changedBytes)/sizeof(*changedBytes)); |
164 | ata_write_sectors(IF_MV2(0,) | 164 | storage_write_sectors(IF_MV2(0,) |
165 | pinfo->start + START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK, | 165 | pinfo->start + START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK, |
166 | 1 , sector); | 166 | 1 , sector); |
167 | printf("Firmware unlocked"); | 167 | printf("Firmware unlocked"); |
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index c1aad5ce11..09e1c23ed8 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "kernel.h" | 30 | #include "kernel.h" |
31 | #include "lcd.h" | 31 | #include "lcd.h" |
32 | #include "font.h" | 32 | #include "font.h" |
33 | #include "ata.h" | 33 | #include "storage.h" |
34 | #include "adc.h" | 34 | #include "adc.h" |
35 | #include "button.h" | 35 | #include "button.h" |
36 | #include "disk.h" | 36 | #include "disk.h" |
@@ -371,7 +371,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
371 | unsigned long sum; | 371 | unsigned long sum; |
372 | 372 | ||
373 | /* Read header to find out how long the mi4 file is. */ | 373 | /* Read header to find out how long the mi4 file is. */ |
374 | ata_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET, | 374 | storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET, |
375 | PPMI_SECTORS, &ppmi_header); | 375 | PPMI_SECTORS, &ppmi_header); |
376 | 376 | ||
377 | /* The first four characters at 0x80000 (sector 1024) should be PPMI*/ | 377 | /* The first four characters at 0x80000 (sector 1024) should be PPMI*/ |
@@ -381,7 +381,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
381 | printf("BL mi4 size: %x", ppmi_header.length); | 381 | printf("BL mi4 size: %x", ppmi_header.length); |
382 | 382 | ||
383 | /* Read mi4 header of the OF */ | 383 | /* Read mi4 header of the OF */ |
384 | ata_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS | 384 | storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS |
385 | + (ppmi_header.length/512), MI4_HEADER_SECTORS, &mi4header); | 385 | + (ppmi_header.length/512), MI4_HEADER_SECTORS, &mi4header); |
386 | 386 | ||
387 | /* We don't support encrypted mi4 files yet */ | 387 | /* We don't support encrypted mi4 files yet */ |
@@ -404,7 +404,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
404 | printf("Binary type: %.4s", mi4header.type); | 404 | printf("Binary type: %.4s", mi4header.type); |
405 | 405 | ||
406 | /* Load firmware */ | 406 | /* Load firmware */ |
407 | ata_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS | 407 | storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS |
408 | + (ppmi_header.length/512) + MI4_HEADER_SECTORS, | 408 | + (ppmi_header.length/512) + MI4_HEADER_SECTORS, |
409 | (mi4header.mi4size-MI4_HEADER_SIZE)/512, buf); | 409 | (mi4header.mi4size-MI4_HEADER_SIZE)/512, buf); |
410 | 410 | ||
@@ -423,9 +423,9 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
423 | 423 | ||
424 | printf("Disabling database rebuild"); | 424 | printf("Disabling database rebuild"); |
425 | 425 | ||
426 | ata_read_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block); | 426 | storage_read_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block); |
427 | block[0xe1] = 0; | 427 | block[0xe1] = 0; |
428 | ata_write_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block); | 428 | storage_write_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block); |
429 | } | 429 | } |
430 | #else | 430 | #else |
431 | (void) disable_rebuild; | 431 | (void) disable_rebuild; |
@@ -505,7 +505,7 @@ void* main(void) | |||
505 | printf("Version: %s", version); | 505 | printf("Version: %s", version); |
506 | printf(MODEL_NAME); | 506 | printf(MODEL_NAME); |
507 | 507 | ||
508 | i=ata_init(); | 508 | i=storage_init(); |
509 | #if !(CONFIG_STORAGE & STORAGE_SD) | 509 | #if !(CONFIG_STORAGE & STORAGE_SD) |
510 | if (i==0) { | 510 | if (i==0) { |
511 | identify_info=ata_get_identify(); | 511 | identify_info=ata_get_identify(); |
@@ -601,7 +601,7 @@ void* main(void) | |||
601 | { | 601 | { |
602 | printf("dumping sector %d", i); | 602 | printf("dumping sector %d", i); |
603 | } | 603 | } |
604 | ata_read_sectors(IF_MV2(0,) pinfo->start + i, 1, sector); | 604 | storage_read_sectors(IF_MV2(0,) pinfo->start + i, 1, sector); |
605 | write(fd,sector,512); | 605 | write(fd,sector,512); |
606 | } | 606 | } |
607 | close(fd); | 607 | close(fd); |
diff --git a/bootloader/meizu_m3.c b/bootloader/meizu_m3.c index acd07d7c66..940e7ea876 100644 --- a/bootloader/meizu_m3.c +++ b/bootloader/meizu_m3.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "lcd.h" | 29 | #include "lcd.h" |
30 | #include "kernel.h" | 30 | #include "kernel.h" |
31 | #include "thread.h" | 31 | #include "thread.h" |
32 | #include "ata.h" | 32 | #include "storage.h" |
33 | #include "fat.h" | 33 | #include "fat.h" |
34 | #include "disk.h" | 34 | #include "disk.h" |
35 | #include "font.h" | 35 | #include "font.h" |
diff --git a/bootloader/meizu_m6sl.c b/bootloader/meizu_m6sl.c index 86c4c5731e..0b335bec8a 100644 --- a/bootloader/meizu_m6sl.c +++ b/bootloader/meizu_m6sl.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "lcd.h" | 29 | #include "lcd.h" |
30 | #include "kernel.h" | 30 | #include "kernel.h" |
31 | #include "thread.h" | 31 | #include "thread.h" |
32 | #include "ata.h" | 32 | #include "storage.h" |
33 | #include "fat.h" | 33 | #include "fat.h" |
34 | #include "disk.h" | 34 | #include "disk.h" |
35 | #include "font.h" | 35 | #include "font.h" |
diff --git a/bootloader/meizu_m6sp.c b/bootloader/meizu_m6sp.c index 7608c9bd30..63ade2dbe8 100644 --- a/bootloader/meizu_m6sp.c +++ b/bootloader/meizu_m6sp.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "lcd.h" | 29 | #include "lcd.h" |
30 | #include "kernel.h" | 30 | #include "kernel.h" |
31 | #include "thread.h" | 31 | #include "thread.h" |
32 | #include "ata.h" | 32 | #include "storage.h" |
33 | #include "fat.h" | 33 | #include "fat.h" |
34 | #include "disk.h" | 34 | #include "disk.h" |
35 | #include "font.h" | 35 | #include "font.h" |
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c index 8389d11b4b..f92ff4bf84 100644 --- a/bootloader/mrobe500.c +++ b/bootloader/mrobe500.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "lcd.h" | 26 | #include "lcd.h" |
27 | #include "kernel.h" | 27 | #include "kernel.h" |
28 | #include "thread.h" | 28 | #include "thread.h" |
29 | #include "ata.h" | 29 | #include "storage.h" |
30 | #include "fat.h" | 30 | #include "fat.h" |
31 | #include "disk.h" | 31 | #include "disk.h" |
32 | #include "font.h" | 32 | #include "font.h" |
@@ -229,13 +229,13 @@ void main(void) | |||
229 | lcd_update(); | 229 | lcd_update(); |
230 | 230 | ||
231 | ide_power_enable(true); | 231 | ide_power_enable(true); |
232 | ata_enable(false); | 232 | storage_enable(false); |
233 | sleep(HZ/20); | 233 | sleep(HZ/20); |
234 | usb_enable(true); | 234 | usb_enable(true); |
235 | 235 | ||
236 | while (usb_detect() == USB_INSERTED) | 236 | while (usb_detect() == USB_INSERTED) |
237 | { | 237 | { |
238 | ata_spin(); /* Prevent the drive from spinning down */ | 238 | storage_spin(); /* Prevent the drive from spinning down */ |
239 | sleep(HZ); | 239 | sleep(HZ); |
240 | } | 240 | } |
241 | 241 | ||
@@ -248,7 +248,7 @@ void main(void) | |||
248 | mrdebug(); | 248 | mrdebug(); |
249 | #endif | 249 | #endif |
250 | printf("ATA"); | 250 | printf("ATA"); |
251 | rc = ata_init(); | 251 | rc = storage_init(); |
252 | if(rc) | 252 | if(rc) |
253 | { | 253 | { |
254 | reset_screen(); | 254 | reset_screen(); |
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c index d8fefd4f48..13c537b9be 100644 --- a/bootloader/ondavx747.c +++ b/bootloader/ondavx747.c | |||
@@ -54,7 +54,7 @@ int main(void) | |||
54 | 54 | ||
55 | backlight_init(); | 55 | backlight_init(); |
56 | 56 | ||
57 | ata_init(); | 57 | storage_init(); |
58 | 58 | ||
59 | int touch, btn; | 59 | int touch, btn; |
60 | char datetime[30]; | 60 | char datetime[30]; |
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c index df6f789135..aa4d6a9057 100644 --- a/bootloader/sansa_as3525.c +++ b/bootloader/sansa_as3525.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "backlight-target.h" | 30 | #include "backlight-target.h" |
31 | #include "as3525-codec.h" | 31 | #include "as3525-codec.h" |
32 | #include "common.h" | 32 | #include "common.h" |
33 | #include "ata.h" | 33 | #include "storage.h" |
34 | 34 | ||
35 | int show_logo(void); | 35 | int show_logo(void); |
36 | void main(void) | 36 | void main(void) |
@@ -54,7 +54,7 @@ void main(void) | |||
54 | } | 54 | } |
55 | printf("ID: %02X%02X%02X%02X%02X%02X%02X%02X", buf[7], buf[6], buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]); | 55 | printf("ID: %02X%02X%02X%02X%02X%02X%02X%02X", buf[7], buf[6], buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]); |
56 | 56 | ||
57 | ata_init(); | 57 | storage_init(); |
58 | 58 | ||
59 | #ifdef SANSA_CLIP | 59 | #ifdef SANSA_CLIP |
60 | /* Use hardware scrolling */ | 60 | /* Use hardware scrolling */ |
diff --git a/bootloader/telechips.c b/bootloader/telechips.c index 7e00e52142..4d64532449 100644 --- a/bootloader/telechips.c +++ b/bootloader/telechips.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "lcd.h" | 30 | #include "lcd.h" |
31 | #include "kernel.h" | 31 | #include "kernel.h" |
32 | #include "thread.h" | 32 | #include "thread.h" |
33 | #include "ata.h" | 33 | #include "storage.h" |
34 | #include "fat.h" | 34 | #include "fat.h" |
35 | #include "disk.h" | 35 | #include "disk.h" |
36 | #include "font.h" | 36 | #include "font.h" |
@@ -206,7 +206,7 @@ void* main(void) | |||
206 | printf("Version %s", version); | 206 | printf("Version %s", version); |
207 | 207 | ||
208 | printf("ATA"); | 208 | printf("ATA"); |
209 | rc = ata_init(); | 209 | rc = storage_init(); |
210 | if(rc) | 210 | if(rc) |
211 | { | 211 | { |
212 | reset_screen(); | 212 | reset_screen(); |
diff --git a/bootloader/tpj1022.c b/bootloader/tpj1022.c index 62929cf1aa..aaf6e9fcfd 100644 --- a/bootloader/tpj1022.c +++ b/bootloader/tpj1022.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "lcd.h" | 30 | #include "lcd.h" |
31 | #include "kernel.h" | 31 | #include "kernel.h" |
32 | #include "thread.h" | 32 | #include "thread.h" |
33 | #include "ata.h" | 33 | #include "storage.h" |
34 | #include "fat.h" | 34 | #include "fat.h" |
35 | #include "disk.h" | 35 | #include "disk.h" |
36 | #include "font.h" | 36 | #include "font.h" |
@@ -58,7 +58,7 @@ void* main(void) | |||
58 | printf("Hello World!"); | 58 | printf("Hello World!"); |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | i=ata_init(); | 61 | i=storage_init(); |
62 | 62 | ||
63 | disk_init(); | 63 | disk_init(); |
64 | rc = disk_mount_all(); | 64 | rc = disk_mount_all(); |