summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-07-05 13:44:53 +0000
committerJens Arnold <amiconn@rockbox.org>2004-07-05 13:44:53 +0000
commitb40591947d6fa225e12dee839a04faf59917d4e2 (patch)
tree1451e40cf59445ab98baa9039784a375f30d77cd
parent26440c9fd64d8c147f02ec4efb376ccb6dbb2783 (diff)
downloadrockbox-b40591947d6fa225e12dee839a04faf59917d4e2.tar.gz
rockbox-b40591947d6fa225e12dee839a04faf59917d4e2.zip
Enabled assembler optimized disk reading and writing (approx. 2 times as fast)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4825 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/ata.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index ffc004572d..1394ceaf29 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -30,10 +30,10 @@
30#include "string.h" 30#include "string.h"
31#include "hwcompat.h" 31#include "hwcompat.h"
32 32
33/* use plain C code in copy_read_sectors(), instead of tweaked assembler */ 33/* Uncomment the matching #define to use plain C code instead if the tweaked
34#define PREFER_C 34 * assembler code for disk reading or writing should cause problems. */
35/* use plain C code in copy_write_sectors(), instead of tweaked assembler */ 35/* #define PREFER_C_READING */
36#define PREFER_C_WRITING 36/* #define PREFER_C_WRITING */
37 37
38#define SECTOR_SIZE 512 38#define SECTOR_SIZE 512
39#define ATA_DATA (*((volatile unsigned short*)0x06104100)) 39#define ATA_DATA (*((volatile unsigned short*)0x06104100))
@@ -176,7 +176,7 @@ static void copy_read_sectors(unsigned char* buf,
176 __attribute__ ((section (".icode"))); 176 __attribute__ ((section (".icode")));
177static void copy_read_sectors(unsigned char* buf, int wordcount) 177static void copy_read_sectors(unsigned char* buf, int wordcount)
178{ 178{
179#ifdef PREFER_C 179#ifdef PREFER_C_READING
180 unsigned short tmp = 0; 180 unsigned short tmp = 0;
181 181
182 if ( (unsigned int)buf & 1) 182 if ( (unsigned int)buf & 1)