forked from len0rd/rockbox
Use STORAGE_NEEDS_BOUNCE_BUFFER instead of STORAGE_NEEDS_ALIGN
Enable its use in the jz47xx MIPS targets. (accidently committed g#3249 before making these changes) Change-Id: I1791946f632901f0c7a94b04b009671aa0d71717
This commit is contained in:
parent
c96dc1c886
commit
961ffa61dd
2 changed files with 4 additions and 3 deletions
|
|
@ -266,7 +266,7 @@ static struct bpb
|
||||||
|
|
||||||
} fat_bpbs[NUM_VOLUMES]; /* mounted partition info */
|
} fat_bpbs[NUM_VOLUMES]; /* mounted partition info */
|
||||||
|
|
||||||
#ifdef STORAGE_WANTS_ALIGN
|
#ifdef STORAGE_NEEDS_BOUNCE_BUFFER
|
||||||
#define FAT_BOUNCE_SECTORS 10
|
#define FAT_BOUNCE_SECTORS 10
|
||||||
static uint8_t fat_bounce_buffers[NUM_VOLUMES][SECTOR_SIZE*FAT_BOUNCE_SECTORS] STORAGE_ALIGN_ATTR;
|
static uint8_t fat_bounce_buffers[NUM_VOLUMES][SECTOR_SIZE*FAT_BOUNCE_SECTORS] STORAGE_ALIGN_ATTR;
|
||||||
#define FAT_BOUNCE_BUFFER(bpb) \
|
#define FAT_BOUNCE_BUFFER(bpb) \
|
||||||
|
|
@ -2393,7 +2393,7 @@ static long transfer(struct bpb *fat_bpb, unsigned long start, long count,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
void* xferbuf = buf;
|
void* xferbuf = buf;
|
||||||
#ifdef STORAGE_WANTS_ALIGN
|
#ifdef STORAGE_NEEDS_BOUNCE_BUFFER
|
||||||
int remain = count;
|
int remain = count;
|
||||||
int xferred = 0;
|
int xferred = 0;
|
||||||
int aligned = 1;
|
int aligned = 1;
|
||||||
|
|
@ -2407,7 +2407,7 @@ static long transfer(struct bpb *fat_bpb, unsigned long start, long count,
|
||||||
#endif
|
#endif
|
||||||
rc = storage_read_sectors(IF_MD(fat_bpb->drive,)
|
rc = storage_read_sectors(IF_MD(fat_bpb->drive,)
|
||||||
start + fat_bpb->startsector, count, xferbuf);
|
start + fat_bpb->startsector, count, xferbuf);
|
||||||
#ifdef STORAGE_WANTS_ALIGN
|
#ifdef STORAGE_NEEDS_BOUNCE_BUFFER
|
||||||
if(rc < 0)
|
if(rc < 0)
|
||||||
break;
|
break;
|
||||||
if(LIKELY(aligned))
|
if(LIKELY(aligned))
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
#define NEED_GENERIC_BYTESWAPS
|
#define NEED_GENERIC_BYTESWAPS
|
||||||
|
|
||||||
#define STORAGE_WANTS_ALIGN
|
#define STORAGE_WANTS_ALIGN
|
||||||
|
#define STORAGE_NEEDS_BOUNCE_BUFFER
|
||||||
|
|
||||||
/* This one returns the old status */
|
/* This one returns the old status */
|
||||||
static inline int set_interrupt_status(int status, int mask)
|
static inline int set_interrupt_status(int status, int mask)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue