summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-08-01 08:15:58 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-08-01 08:15:58 +0000
commit364783a3d51ab7c4b2a1e806878348035b672584 (patch)
treed613d8707dc315557ad5575d6eef494713dfee9a /firmware
parent2f70f13a42404c2288a149dfd77162a30c919c14 (diff)
downloadrockbox-364783a3d51ab7c4b2a1e806878348035b672584.tar.gz
rockbox-364783a3d51ab7c4b2a1e806878348035b672584.zip
Moved ata_read_sectors() to internal RAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1501 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/ata.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 39bff50d33..845fb79e80 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -79,6 +79,7 @@ static char ata_thread_name[] = "ata";
79static struct event_queue ata_queue; 79static struct event_queue ata_queue;
80static bool initialized = false; 80static bool initialized = false;
81 81
82static int wait_for_bsy(void) __attribute__ ((section (".icode")));
82static int wait_for_bsy(void) 83static int wait_for_bsy(void)
83{ 84{
84 int timeout = current_tick + HZ*4; 85 int timeout = current_tick + HZ*4;
@@ -95,6 +96,7 @@ static int wait_for_bsy(void)
95 } 96 }
96} 97}
97 98
99static int wait_for_rdy(void) __attribute__ ((section (".icode")));
98static int wait_for_rdy(void) 100static int wait_for_rdy(void)
99{ 101{
100 if (!wait_for_bsy()) 102 if (!wait_for_bsy())
@@ -102,6 +104,7 @@ static int wait_for_rdy(void)
102 return ATA_ALT_STATUS & STATUS_RDY; 104 return ATA_ALT_STATUS & STATUS_RDY;
103} 105}
104 106
107static int wait_for_start_of_transfer(void) __attribute__ ((section (".icode")));
105static int wait_for_start_of_transfer(void) 108static int wait_for_start_of_transfer(void)
106{ 109{
107 if (!wait_for_bsy()) 110 if (!wait_for_bsy())
@@ -109,6 +112,7 @@ static int wait_for_start_of_transfer(void)
109 return (ATA_ALT_STATUS & (STATUS_BSY|STATUS_DRQ)) == STATUS_DRQ; 112 return (ATA_ALT_STATUS & (STATUS_BSY|STATUS_DRQ)) == STATUS_DRQ;
110} 113}
111 114
115static int wait_for_end_of_transfer(void) __attribute__ ((section (".icode")));
112static int wait_for_end_of_transfer(void) 116static int wait_for_end_of_transfer(void)
113{ 117{
114 if (!wait_for_bsy()) 118 if (!wait_for_bsy())
@@ -118,6 +122,9 @@ static int wait_for_end_of_transfer(void)
118 122
119int ata_read_sectors(unsigned long start, 123int ata_read_sectors(unsigned long start,
120 unsigned char count, 124 unsigned char count,
125 void* buf) __attribute__ ((section (".icode")));
126int ata_read_sectors(unsigned long start,
127 unsigned char count,
121 void* buf) 128 void* buf)
122{ 129{
123 int i; 130 int i;