diff options
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r-- | bootloader/main-pp.c | 16 |
1 files changed, 8 insertions, 8 deletions
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); |