summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ata-target.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-01-24 00:12:08 +0000
committerJens Arnold <amiconn@rockbox.org>2007-01-24 00:12:08 +0000
commit5d51784faa5e48c821e3fefab685cdb141a6ff81 (patch)
treebc99954e296486d98c0af35bb25303815bad3226 /firmware/target/arm/ata-target.h
parent970572bec874a9c359ab7a5acdf0c66ba088940c (diff)
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.h16
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 @@
#if (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020)
-/* Plain C read & write loops */
-
#if (CONFIG_CPU == PP5002)
+
+/* Plain C reading and writing. See comment in ata-as-arm.S */
+
#define ATA_IOBASE 0xc00031e0
#define ATA_CONTROL (*((volatile unsigned char*)(0xc00033f8)))
+
#elif (CONFIG_CPU == PP5020)
+
+/* asm optimized reading and writing */
+#define ATA_OPTIMIZED_READING
+#define ATA_OPTIMIZED_WRITING
+void copy_read_sectors(unsigned char* buf, int wordcount);
+void copy_write_sectors(const unsigned char* buf, int wordcount);
+
#define ATA_IOBASE 0xc30001e0
#define ATA_CONTROL (*((volatile unsigned char*)(0xc30003f8)))
-#endif
+
+#endif /* CONFIG_CPU */
#define ATA_DATA (*((volatile unsigned short*)(ATA_IOBASE)))
#define ATA_ERROR (*((volatile unsigned char*)(ATA_IOBASE + 0x04)))