mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Sansa AMS: make the UNCACHED_ADDR macro work for any type of pointer, and only use pointers with it, not arrays
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21230 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3b0fca3c6c
commit
e2f165c088
2 changed files with 2 additions and 2 deletions
|
@ -619,7 +619,7 @@ static int sd_select_bank(signed char bank)
|
|||
|
||||
#define UNALIGNED_NUM_SECTORS 10
|
||||
static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS* SECTOR_SIZE] __attribute__((aligned(32))); /* align on cache line size */
|
||||
static unsigned char *uncached_buffer = UNCACHED_ADDR(aligned_buffer);
|
||||
static unsigned char *uncached_buffer = UNCACHED_ADDR(&aligned_buffer[0]);
|
||||
|
||||
static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
|
||||
int count, void* buf, const bool write)
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#ifdef BOOTLOADER
|
||||
#define UNCACHED_ADDR(a) (a)
|
||||
#else
|
||||
#define UNCACHED_ADDR(a) (a + 0x10000000)
|
||||
#define UNCACHED_ADDR(a) ((typeof(a)) ((uintptr_t)(a) + 0x10000000))
|
||||
#endif
|
||||
|
||||
#endif /* SYSTEM_TARGET_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue