diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-01-24 00:12:08 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-01-24 00:12:08 +0000 |
commit | 5d51784faa5e48c821e3fefab685cdb141a6ff81 (patch) | |
tree | bc99954e296486d98c0af35bb25303815bad3226 /firmware/target/arm/ata-target.h | |
parent | 970572bec874a9c359ab7a5acdf0c66ba088940c (diff) | |
download | rockbox-5d51784faa5e48c821e3fefab685cdb141a6ff81.tar.gz rockbox-5d51784faa5e48c821e3fefab685cdb141a6ff81.zip |
Assembler optimised ATA transfer loops for ARM targets. Only used for PP5020/5021/5022 targets atm. PP5002 seems to have problems with it not directly related to the asm code itself, and the gigabeat doesn't profit from it, probably because the CPU isn't the bottleneck even without optimisation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12099 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ata-target.h')
-rw-r--r-- | firmware/target/arm/ata-target.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/firmware/target/arm/ata-target.h b/firmware/target/arm/ata-target.h index 0f25f89d6b..d6c5f512e6 100644 --- a/firmware/target/arm/ata-target.h +++ b/firmware/target/arm/ata-target.h | |||
@@ -19,15 +19,25 @@ | |||
19 | 19 | ||
20 | #if (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) | 20 | #if (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) |
21 | 21 | ||
22 | /* Plain C read & write loops */ | ||
23 | |||
24 | #if (CONFIG_CPU == PP5002) | 22 | #if (CONFIG_CPU == PP5002) |
23 | |||
24 | /* Plain C reading and writing. See comment in ata-as-arm.S */ | ||
25 | |||
25 | #define ATA_IOBASE 0xc00031e0 | 26 | #define ATA_IOBASE 0xc00031e0 |
26 | #define ATA_CONTROL (*((volatile unsigned char*)(0xc00033f8))) | 27 | #define ATA_CONTROL (*((volatile unsigned char*)(0xc00033f8))) |
28 | |||
27 | #elif (CONFIG_CPU == PP5020) | 29 | #elif (CONFIG_CPU == PP5020) |
30 | |||
31 | /* asm optimized reading and writing */ | ||
32 | #define ATA_OPTIMIZED_READING | ||
33 | #define ATA_OPTIMIZED_WRITING | ||
34 | void copy_read_sectors(unsigned char* buf, int wordcount); | ||
35 | void copy_write_sectors(const unsigned char* buf, int wordcount); | ||
36 | |||
28 | #define ATA_IOBASE 0xc30001e0 | 37 | #define ATA_IOBASE 0xc30001e0 |
29 | #define ATA_CONTROL (*((volatile unsigned char*)(0xc30003f8))) | 38 | #define ATA_CONTROL (*((volatile unsigned char*)(0xc30003f8))) |
30 | #endif | 39 | |
40 | #endif /* CONFIG_CPU */ | ||
31 | 41 | ||
32 | #define ATA_DATA (*((volatile unsigned short*)(ATA_IOBASE))) | 42 | #define ATA_DATA (*((volatile unsigned short*)(ATA_IOBASE))) |
33 | #define ATA_ERROR (*((volatile unsigned char*)(ATA_IOBASE + 0x04))) | 43 | #define ATA_ERROR (*((volatile unsigned char*)(ATA_IOBASE + 0x04))) |