summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-06-09 00:51:30 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-06-09 00:51:30 +0000
commite2f165c088328fd17dde9026b4927851c8465640 (patch)
tree15496088f4d3794d36ade8ec92c12185c9f5c0a3 /firmware
parent3b0fca3c6cc9f6faf1c8460e41d6c48b320bbdb7 (diff)
downloadrockbox-e2f165c088328fd17dde9026b4927851c8465640.tar.gz
rockbox-e2f165c088328fd17dde9026b4927851c8465640.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/ata_sd_as3525.c2
-rw-r--r--firmware/target/arm/as3525/system-target.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c
index 91d65235ef..488988d430 100644
--- a/firmware/target/arm/as3525/ata_sd_as3525.c
+++ b/firmware/target/arm/as3525/ata_sd_as3525.c
@@ -619,7 +619,7 @@ static int sd_select_bank(signed char bank)
619 619
620#define UNALIGNED_NUM_SECTORS 10 620#define UNALIGNED_NUM_SECTORS 10
621static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS* SECTOR_SIZE] __attribute__((aligned(32))); /* align on cache line size */ 621static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS* SECTOR_SIZE] __attribute__((aligned(32))); /* align on cache line size */
622static unsigned char *uncached_buffer = UNCACHED_ADDR(aligned_buffer); 622static unsigned char *uncached_buffer = UNCACHED_ADDR(&aligned_buffer[0]);
623 623
624static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start, 624static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
625 int count, void* buf, const bool write) 625 int count, void* buf, const bool write)
diff --git a/firmware/target/arm/as3525/system-target.h b/firmware/target/arm/as3525/system-target.h
index daea180a64..eb59709cd3 100644
--- a/firmware/target/arm/as3525/system-target.h
+++ b/firmware/target/arm/as3525/system-target.h
@@ -28,7 +28,7 @@
28#ifdef BOOTLOADER 28#ifdef BOOTLOADER
29#define UNCACHED_ADDR(a) (a) 29#define UNCACHED_ADDR(a) (a)
30#else 30#else
31#define UNCACHED_ADDR(a) (a + 0x10000000) 31#define UNCACHED_ADDR(a) ((typeof(a)) ((uintptr_t)(a) + 0x10000000))
32#endif 32#endif
33 33
34#endif /* SYSTEM_TARGET_H */ 34#endif /* SYSTEM_TARGET_H */