summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/creativezvm.c4
-rw-r--r--bootloader/gigabeat-s.c8
-rw-r--r--bootloader/gigabeat.c6
-rw-r--r--bootloader/iaudio_coldfire.c8
-rw-r--r--bootloader/iriver_h1x0.c12
-rw-r--r--bootloader/iriver_h300.c12
-rw-r--r--bootloader/main-c240wipe.c14
-rw-r--r--bootloader/main-c250wipe.c16
-rw-r--r--bootloader/main-e200r-installer.c8
-rw-r--r--bootloader/main-pp.c16
-rw-r--r--bootloader/meizu_m3.c2
-rw-r--r--bootloader/meizu_m6sl.c2
-rw-r--r--bootloader/meizu_m6sp.c2
-rw-r--r--bootloader/mrobe500.c8
-rw-r--r--bootloader/ondavx747.c2
-rw-r--r--bootloader/sansa_as3525.c4
-rw-r--r--bootloader/telechips.c4
-rw-r--r--bootloader/tpj1022.c4
18 files changed, 66 insertions, 66 deletions
diff --git a/bootloader/creativezvm.c b/bootloader/creativezvm.c
index bd8050b..403a8bb 100644
--- a/bootloader/creativezvm.c
+++ b/bootloader/creativezvm.c
@@ -21,7 +21,7 @@
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "ata-target.h"
#include "disk.h"
#include "font.h"
@@ -64,7 +64,7 @@ void main(void)
printf("Rockbox boot loader");
printf("Version %s", APPSVERSION);
- ret = ata_init();
+ ret = storage_init();
if(ret)
printf("ATA error: %d", ret);
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c
index 089d0f7..e1e293f 100644
--- a/bootloader/gigabeat-s.c
+++ b/bootloader/gigabeat-s.c
@@ -25,7 +25,7 @@
#include "string.h"
#include "adc.h"
#include "powermgmt.h"
-#include "ata.h"
+#include "storage.h"
#include "dir.h"
#include "disk.h"
#include "common.h"
@@ -81,7 +81,7 @@ static bool pause_if_button_pressed(bool pre_usb)
sleep(HZ/5);
/* If the disk powers off, the firmware will lock at startup */
- ata_spin();
+ storage_spin();
}
}
@@ -310,7 +310,7 @@ static void __attribute__((noreturn)) handle_firmware_load(void)
/* Put drivers into a known state */
button_close_device();
- ata_close();
+ storage_close();
system_prepare_fw_start();
if (rc == EOK)
@@ -353,7 +353,7 @@ void main(void)
check_battery();
- rc = ata_init();
+ rc = storage_init();
if(rc)
{
reset_screen();
diff --git a/bootloader/gigabeat.c b/bootloader/gigabeat.c
index 117dacc..6b3a68b 100644
--- a/bootloader/gigabeat.c
+++ b/bootloader/gigabeat.c
@@ -29,7 +29,7 @@
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
@@ -75,7 +75,7 @@ void main(void)
(LCD_HEIGHT - SYSFONT_HEIGHT) / 2, msg);
lcd_update();
- ata_enable(false);
+ storage_enable(false);
sleep(HZ/20);
usb_enable(true);
@@ -101,7 +101,7 @@ void main(void)
sleep(50); /* ATA seems to error without this pause */
- rc = ata_init();
+ rc = storage_init();
if(rc)
{
reset_screen();
diff --git a/bootloader/iaudio_coldfire.c b/bootloader/iaudio_coldfire.c
index 8e85dc9..0af2f25 100644
--- a/bootloader/iaudio_coldfire.c
+++ b/bootloader/iaudio_coldfire.c
@@ -30,7 +30,7 @@
#include "lcd-remote.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "usb.h"
#include "disk.h"
#include "font.h"
@@ -87,10 +87,10 @@ void shutdown(void)
if (ide_powered())
{
/* Make sure ATA has been initialized. */
- ata_init();
+ storage_init();
/* And put the disk into sleep immediately. */
- ata_sleepnow();
+ storage_sleepnow();
}
sleep(HZ*2);
@@ -192,7 +192,7 @@ void main(void)
check_battery();
- rc = ata_init();
+ rc = storage_init();
if(rc)
{
printf("ATA error: %d", rc);
diff --git a/bootloader/iriver_h1x0.c b/bootloader/iriver_h1x0.c
index 7f051bc..83e5455 100644
--- a/bootloader/iriver_h1x0.c
+++ b/bootloader/iriver_h1x0.c
@@ -31,7 +31,7 @@
#include "scroll_engine.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "usb.h"
#include "disk.h"
#include "font.h"
@@ -148,10 +148,10 @@ void shutdown(void)
if (ide_powered())
{
/* Make sure ATA has been initialized. */
- ata_init();
+ storage_init();
/* And put the disk into sleep immediately. */
- ata_sleepnow();
+ storage_sleepnow();
}
sleep(HZ*2);
@@ -560,7 +560,7 @@ void main(void)
}
#endif
ide_power_enable(true);
- ata_enable(false);
+ storage_enable(false);
sleep(HZ/20);
usb_enable(true);
cpu_idle_mode(true);
@@ -571,7 +571,7 @@ void main(void)
remote_line = 0;
check_battery();
- ata_spin(); /* Prevent the drive from spinning down */
+ storage_spin(); /* Prevent the drive from spinning down */
sleep(HZ);
/* Backlight OFF */
@@ -585,7 +585,7 @@ void main(void)
lcd_update();
}
- rc = ata_init();
+ rc = storage_init();
if(rc)
{
reset_screen();
diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c
index 9d839ae..d15efb9 100644
--- a/bootloader/iriver_h300.c
+++ b/bootloader/iriver_h300.c
@@ -31,7 +31,7 @@
#include "scroll_engine.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "usb.h"
#include "disk.h"
#include "font.h"
@@ -93,10 +93,10 @@ void shutdown(void)
if (ide_powered())
{
/* Make sure ATA has been initialized. */
- ata_init();
+ storage_init();
/* And put the disk into sleep immediately. */
- ata_sleepnow();
+ storage_sleepnow();
}
sleep(HZ*2);
@@ -317,7 +317,7 @@ void main(void)
lcd_remote_update();
ide_power_enable(true);
- ata_enable(false);
+ storage_enable(false);
sleep(HZ/20);
usb_enable(true);
cpu_idle_mode(true);
@@ -328,7 +328,7 @@ void main(void)
remote_line = 0;
check_battery();
- ata_spin(); /* Prevent the drive from spinning down */
+ storage_spin(); /* Prevent the drive from spinning down */
sleep(HZ);
}
@@ -339,7 +339,7 @@ void main(void)
lcd_update();
}
- rc = ata_init();
+ rc = storage_init();
if(rc)
{
reset_screen();
diff --git a/bootloader/main-c240wipe.c b/bootloader/main-c240wipe.c
index 1bf3ac2..952382e 100644
--- a/bootloader/main-c240wipe.c
+++ b/bootloader/main-c240wipe.c
@@ -29,7 +29,7 @@
#include "kernel.h"
#include "lcd.h"
#include "font.h"
-#include "ata.h"
+#include "storage.h"
#include "button.h"
#include "disk.h"
#include "crc32-mi4.h"
@@ -185,14 +185,14 @@ void* main(void)
printf("");
- i=ata_init();
+ i=storage_init();
disk_init(IF_MV(0));
memset(zero,0,16*1024);
printf("Zeroing flash");
for(i=0;i<250816;i++)
{
- ata_write_sectors(IF_MV2(0,) i*32,32,zero);
+ storage_write_sectors(IF_MV2(0,) i*32,32,zero);
if(i%64 == 0)
{
printf("%d kB left",(250816-i)/2);
@@ -200,13 +200,13 @@ void* main(void)
}
printf("Writing MBR");
- ata_write_sectors(IF_MV2(0,) 0,1,mbr);
+ storage_write_sectors(IF_MV2(0,) 0,1,mbr);
printf("Writing FAT bootsector");
- ata_write_sectors(IF_MV2(0,) 1023,1,fat);
+ storage_write_sectors(IF_MV2(0,) 1023,1,fat);
printf("Writing more FAT");
- ata_write_sectors(IF_MV2(0,) 1024,1,backupfat);
+ storage_write_sectors(IF_MV2(0,) 1024,1,backupfat);
printf("Writing more FAT");
- ata_write_sectors(IF_MV2(0,) 1264,1,backupfat);
+ storage_write_sectors(IF_MV2(0,) 1264,1,backupfat);
if (button_hold())
printf("Release Hold and");
diff --git a/bootloader/main-c250wipe.c b/bootloader/main-c250wipe.c
index fedabb7..06a0a5b 100644
--- a/bootloader/main-c250wipe.c
+++ b/bootloader/main-c250wipe.c
@@ -29,7 +29,7 @@
#include "kernel.h"
#include "lcd.h"
#include "font.h"
-#include "ata.h"
+#include "storage.h"
#include "button.h"
#include "disk.h"
#include "crc32-mi4.h"
@@ -250,14 +250,14 @@ void* main(void)
printf("");
- i=ata_init();
+ i=storage_init();
disk_init(IF_MV(0));
memset(zero,0,16*1024);
printf("Zeroing flash");
for(i=0;i<250816;i++)
{
- ata_write_sectors(IF_MV2(0,) i*32,32,zero);
+ storage_write_sectors(IF_MV2(0,) i*32,32,zero);
if(i%64 == 0)
{
printf("%d kB left",(250816-i)/2);
@@ -265,15 +265,15 @@ void* main(void)
}
printf("Writing MBR");
- ata_write_sectors(IF_MV2(0,) 0,1,mbr);
+ storage_write_sectors(IF_MV2(0,) 0,1,mbr);
printf("Writing FAT bootsector");
- ata_write_sectors(IF_MV2(0,) 1017,2,bootsector);
+ storage_write_sectors(IF_MV2(0,) 1017,2,bootsector);
printf("Writing more FAT");
- ata_write_sectors(IF_MV2(0,) 1023,1,fat);
+ storage_write_sectors(IF_MV2(0,) 1023,1,fat);
printf("Writing more FAT");
- ata_write_sectors(IF_MV2(0,) 1049,1,backupfat);
+ storage_write_sectors(IF_MV2(0,) 1049,1,backupfat);
printf("Writing more FAT");
- ata_write_sectors(IF_MV2(0,) 4920,1,backupfat);
+ storage_write_sectors(IF_MV2(0,) 4920,1,backupfat);
if (button_hold())
printf("Release Hold and");
diff --git a/bootloader/main-e200r-installer.c b/bootloader/main-e200r-installer.c
index b1209e1..3ac5743 100644
--- a/bootloader/main-e200r-installer.c
+++ b/bootloader/main-e200r-installer.c
@@ -31,7 +31,7 @@
#include "kernel.h"
#include "lcd.h"
#include "font.h"
-#include "ata.h"
+#include "storage.h"
#include "button.h"
#include "disk.h"
#include "crc32-mi4.h"
@@ -120,7 +120,7 @@ void* main(void)
printf(MODEL_NAME);
printf("");
- i=ata_init();
+ i=storage_init();
disk_init(IF_MV(0));
num_partitions = disk_mount_all();
@@ -139,7 +139,7 @@ void* main(void)
printf("reading: %x", (START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK)*512);
#endif
- ata_read_sectors(IF_MV2(0,)
+ storage_read_sectors(IF_MV2(0,)
pinfo->start + START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK,
1 , sector);
crc32 = chksum_crc32 (sector, 512);
@@ -161,7 +161,7 @@ void* main(void)
/* E200R bootloader detected - patch it */
memcpy(&sector[HACK_OFFSET], changedBytes,
sizeof(changedBytes)/sizeof(*changedBytes));
- ata_write_sectors(IF_MV2(0,)
+ storage_write_sectors(IF_MV2(0,)
pinfo->start + START_SECTOR_OF_ROM + ROMSECTOR_TO_HACK,
1 , sector);
printf("Firmware unlocked");
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index c1aad5c..09e1c23 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -30,7 +30,7 @@
#include "kernel.h"
#include "lcd.h"
#include "font.h"
-#include "ata.h"
+#include "storage.h"
#include "adc.h"
#include "button.h"
#include "disk.h"
@@ -371,7 +371,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
unsigned long sum;
/* Read header to find out how long the mi4 file is. */
- ata_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET,
+ storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET,
PPMI_SECTORS, &ppmi_header);
/* 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,
printf("BL mi4 size: %x", ppmi_header.length);
/* Read mi4 header of the OF */
- ata_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
+ storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
+ (ppmi_header.length/512), MI4_HEADER_SECTORS, &mi4header);
/* We don't support encrypted mi4 files yet */
@@ -404,7 +404,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
printf("Binary type: %.4s", mi4header.type);
/* Load firmware */
- ata_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
+ storage_read_sectors(IF_MV2(0,) pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS
+ (ppmi_header.length/512) + MI4_HEADER_SECTORS,
(mi4header.mi4size-MI4_HEADER_SIZE)/512, buf);
@@ -423,9 +423,9 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
printf("Disabling database rebuild");
- ata_read_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block);
+ storage_read_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block);
block[0xe1] = 0;
- ata_write_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block);
+ storage_write_sectors(IF_MV2(0,) pinfo->start + 0x3c08, 1, block);
}
#else
(void) disable_rebuild;
@@ -505,7 +505,7 @@ void* main(void)
printf("Version: %s", version);
printf(MODEL_NAME);
- i=ata_init();
+ i=storage_init();
#if !(CONFIG_STORAGE & STORAGE_SD)
if (i==0) {
identify_info=ata_get_identify();
@@ -601,7 +601,7 @@ void* main(void)
{
printf("dumping sector %d", i);
}
- ata_read_sectors(IF_MV2(0,) pinfo->start + i, 1, sector);
+ storage_read_sectors(IF_MV2(0,) pinfo->start + i, 1, sector);
write(fd,sector,512);
}
close(fd);
diff --git a/bootloader/meizu_m3.c b/bootloader/meizu_m3.c
index acd07d7..940e7ea 100644
--- a/bootloader/meizu_m3.c
+++ b/bootloader/meizu_m3.c
@@ -29,7 +29,7 @@
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
diff --git a/bootloader/meizu_m6sl.c b/bootloader/meizu_m6sl.c
index 86c4c57..0b335be 100644
--- a/bootloader/meizu_m6sl.c
+++ b/bootloader/meizu_m6sl.c
@@ -29,7 +29,7 @@
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
diff --git a/bootloader/meizu_m6sp.c b/bootloader/meizu_m6sp.c
index 7608c9b..63ade2d 100644
--- a/bootloader/meizu_m6sp.c
+++ b/bootloader/meizu_m6sp.c
@@ -29,7 +29,7 @@
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c
index 8389d11..f92ff4b 100644
--- a/bootloader/mrobe500.c
+++ b/bootloader/mrobe500.c
@@ -26,7 +26,7 @@
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
@@ -229,13 +229,13 @@ void main(void)
lcd_update();
ide_power_enable(true);
- ata_enable(false);
+ storage_enable(false);
sleep(HZ/20);
usb_enable(true);
while (usb_detect() == USB_INSERTED)
{
- ata_spin(); /* Prevent the drive from spinning down */
+ storage_spin(); /* Prevent the drive from spinning down */
sleep(HZ);
}
@@ -248,7 +248,7 @@ void main(void)
mrdebug();
#endif
printf("ATA");
- rc = ata_init();
+ rc = storage_init();
if(rc)
{
reset_screen();
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c
index d8fefd4..13c537b 100644
--- a/bootloader/ondavx747.c
+++ b/bootloader/ondavx747.c
@@ -54,7 +54,7 @@ int main(void)
backlight_init();
- ata_init();
+ storage_init();
int touch, btn;
char datetime[30];
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c
index df6f789..aa4d6a9 100644
--- a/bootloader/sansa_as3525.c
+++ b/bootloader/sansa_as3525.c
@@ -30,7 +30,7 @@
#include "backlight-target.h"
#include "as3525-codec.h"
#include "common.h"
-#include "ata.h"
+#include "storage.h"
int show_logo(void);
void main(void)
@@ -54,7 +54,7 @@ void main(void)
}
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]);
- ata_init();
+ storage_init();
#ifdef SANSA_CLIP
/* Use hardware scrolling */
diff --git a/bootloader/telechips.c b/bootloader/telechips.c
index 7e00e52..4d64532 100644
--- a/bootloader/telechips.c
+++ b/bootloader/telechips.c
@@ -30,7 +30,7 @@
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
@@ -206,7 +206,7 @@ void* main(void)
printf("Version %s", version);
printf("ATA");
- rc = ata_init();
+ rc = storage_init();
if(rc)
{
reset_screen();
diff --git a/bootloader/tpj1022.c b/bootloader/tpj1022.c
index 62929cf..aaf6e9f 100644
--- a/bootloader/tpj1022.c
+++ b/bootloader/tpj1022.c
@@ -30,7 +30,7 @@
#include "lcd.h"
#include "kernel.h"
#include "thread.h"
-#include "ata.h"
+#include "storage.h"
#include "fat.h"
#include "disk.h"
#include "font.h"
@@ -58,7 +58,7 @@ void* main(void)
printf("Hello World!");
#endif
- i=ata_init();
+ i=storage_init();
disk_init();
rc = disk_mount_all();