diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-09-07 17:24:14 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-09-07 17:24:14 +0000 |
commit | 23fc923bde033d2abffa29651f3dff921abcaed7 (patch) | |
tree | df3aec4da921c3923d39c30f8c82b66fab419313 /firmware/target/arm/tms320dm320/creative-zvm/ata-target.h | |
parent | 97f775df059b1d505a72369e5f69559eeec175f4 (diff) | |
download | rockbox-23fc923bde033d2abffa29651f3dff921abcaed7.tar.gz rockbox-23fc923bde033d2abffa29651f3dff921abcaed7.zip |
ZVM:
* Optimize MiniFS handling
* Add basic CFS handling (doesn't work yet)
* Remove hacky stuff in disk.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18438 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320/creative-zvm/ata-target.h')
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/ata-target.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h b/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h index 6e5699e887..ba877a1496 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h +++ b/firmware/target/arm/tms320dm320/creative-zvm/ata-target.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #ifndef ATA_TARGET_H | 22 | #ifndef ATA_TARGET_H |
23 | #define ATA_TARGET_H | 23 | #define ATA_TARGET_H |
24 | 24 | ||
25 | #include "ata.h" | ||
26 | |||
25 | /* DMA optimized reading and writing */ | 27 | /* DMA optimized reading and writing */ |
26 | #define ATA_OPTIMIZED_READING | 28 | #define ATA_OPTIMIZED_READING |
27 | #define ATA_OPTIMIZED_WRITING | 29 | #define ATA_OPTIMIZED_WRITING |
@@ -33,6 +35,12 @@ | |||
33 | void copy_read_sectors(const unsigned char* buf, int wordcount); | 35 | void copy_read_sectors(const unsigned char* buf, int wordcount); |
34 | void copy_write_sectors(const unsigned char* buf, int wordcount); | 36 | void copy_write_sectors(const unsigned char* buf, int wordcount); |
35 | 37 | ||
38 | /* Nasty hack, but Creative is nasty... */ | ||
39 | #define ata_read_sectors _ata_read_sectors | ||
40 | #define ata_write_sectors _ata_write_sectors | ||
41 | extern int _ata_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf); | ||
42 | extern int _ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, const void* buf); | ||
43 | |||
36 | /* General purpose memory region #1 */ | 44 | /* General purpose memory region #1 */ |
37 | #define ATA_IOBASE 0x50FEE000 | 45 | #define ATA_IOBASE 0x50FEE000 |
38 | #define ATA_DATA (*((volatile unsigned short*)(ATA_IOBASE))) | 46 | #define ATA_DATA (*((volatile unsigned short*)(ATA_IOBASE))) |
@@ -52,15 +60,15 @@ void copy_write_sectors(const unsigned char* buf, int wordcount); | |||
52 | #define STATUS_ERR 0x01 | 60 | #define STATUS_ERR 0x01 |
53 | #define ERROR_ABRT 0x04 | 61 | #define ERROR_ABRT 0x04 |
54 | 62 | ||
55 | #define WRITE_PATTERN1 0xa5 | 63 | #define WRITE_PATTERN1 0xa5 |
56 | #define WRITE_PATTERN2 0x5a | 64 | #define WRITE_PATTERN2 0x5a |
57 | #define WRITE_PATTERN3 0xaa | 65 | #define WRITE_PATTERN3 0xaa |
58 | #define WRITE_PATTERN4 0x55 | 66 | #define WRITE_PATTERN4 0x55 |
59 | 67 | ||
60 | #define READ_PATTERN1 0xa5 | 68 | #define READ_PATTERN1 0xa5 |
61 | #define READ_PATTERN2 0x5a | 69 | #define READ_PATTERN2 0x5a |
62 | #define READ_PATTERN3 0xaa | 70 | #define READ_PATTERN3 0xaa |
63 | #define READ_PATTERN4 0x55 | 71 | #define READ_PATTERN4 0x55 |
64 | 72 | ||
65 | #define READ_PATTERN1_MASK 0xff | 73 | #define READ_PATTERN1_MASK 0xff |
66 | #define READ_PATTERN2_MASK 0xff | 74 | #define READ_PATTERN2_MASK 0xff |