diff options
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))) |