From 2a93cee8e28ad88c848b378fb10551cf5597bb81 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Mon, 9 Nov 2009 00:38:10 +0000 Subject: [PATCH] M:Robe 500 - Enable ASM optimized ATA interface improving disk access speed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23572 a1c6a512-1295-4272-9138-f99709370657 --- firmware/SOURCES | 1 + firmware/target/arm/ata-as-arm.S | 6 ++++++ firmware/target/arm/tms320dm320/mrobe-500/ata-target.h | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/firmware/SOURCES b/firmware/SOURCES index adb54c7a35..18106df2cf 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -881,6 +881,7 @@ target/arm/tms320dm320/uart-dm320.c #ifdef MROBE_500 #ifndef SIMULATOR +target/arm/ata-as-arm.S target/arm/lcd-as-memframe.S target/arm/mmu-arm.S target/arm/tms320dm320/mrobe-500/adc-mr500.c diff --git a/firmware/target/arm/ata-as-arm.S b/firmware/target/arm/ata-as-arm.S index c1475c0a5a..b1cafc2221 100644 --- a/firmware/target/arm/ata-as-arm.S +++ b/firmware/target/arm/ata-as-arm.S @@ -38,6 +38,12 @@ #elif defined(CREATIVE_ZVx) /* Zen Vision could have an other address */ .text .equ .ata_port, 0x50FEE000 +#elif defined(MROBE_500) + .text + .equ .ata_port, 0x50400000 +#else + /* This isn't vaild, but it does it's job, not sure what this should be */ + #error ata_port undefined! #endif .align 2 diff --git a/firmware/target/arm/tms320dm320/mrobe-500/ata-target.h b/firmware/target/arm/tms320dm320/mrobe-500/ata-target.h index 4d0e0433c5..2a9d3e8010 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/ata-target.h +++ b/firmware/target/arm/tms320dm320/mrobe-500/ata-target.h @@ -22,9 +22,18 @@ #ifndef ATA_TARGET_H #define ATA_TARGET_H +#if 0 /* Plain C read & write loops */ #define PREFER_C_READING #define PREFER_C_WRITING +#else +/* ASM optimized reading and writing */ +#define ATA_OPTIMIZED_READING +#define ATA_OPTIMIZED_WRITING + +void copy_read_sectors(const unsigned char* buf, int wordcount); +void copy_write_sectors(const unsigned char* buf, int wordcount); +#endif #define ATA_IOBASE 0x50000000 #define REGISTER_OFFSET (ATA_IOBASE+0x00400000) /* A21 = High */