From 1167e3c72f5d0d581b81fd2cb8f2580a1524ca5a Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 30 Jun 2007 02:08:27 +0000 Subject: Accept FS#7134 - Sansa: external sd card support by Antonius Hellmann with some tweaks. All testers have given the green light. (Now for the RED ?? ;). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13741 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/main-pp.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'bootloader/main-pp.c') diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index 49d7f0a2f7..dd8b7984ca 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c @@ -352,7 +352,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(pinfo->start + PPMI_SECTOR_OFFSET, + ata_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*/ @@ -362,7 +362,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(pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS + ata_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 */ @@ -385,7 +385,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, printf("Binary type: %.4s", mi4header.type); /* Load firmware */ - ata_read_sectors(pinfo->start + PPMI_SECTOR_OFFSET + PPMI_SECTORS + ata_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); @@ -404,7 +404,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, unsigned int i; /* check which known version we have */ /* These are taken from the PPPS section, 0x00780240 */ - ata_read_sectors(pinfo->start + 0x3C01, 1, block); + ata_read_sectors(IF_MV2(0,) pinfo->start + 0x3C01, 1, block); for (i=0; i