summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/ata.c15
-rw-r--r--firmware/kernel.c4
2 files changed, 8 insertions, 11 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index dac94b0ea9..9cc49c1731 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -308,7 +308,7 @@ static int perform_soft_reset(void);
308static int set_multiple_mode(int sectors); 308static int set_multiple_mode(int sectors);
309static int set_features(void); 309static int set_features(void);
310 310
311static int wait_for_bsy(void) __attribute__ ((section (".icode"))); 311static int wait_for_bsy(void) ICODE_ATTR;
312static int wait_for_bsy(void) 312static int wait_for_bsy(void)
313{ 313{
314 long timeout = current_tick + HZ*30; 314 long timeout = current_tick + HZ*30;
@@ -323,7 +323,7 @@ static int wait_for_bsy(void)
323 return 0; /* timeout */ 323 return 0; /* timeout */
324} 324}
325 325
326static int wait_for_rdy(void) __attribute__ ((section (".icode"))); 326static int wait_for_rdy(void) ICODE_ATTR;
327static int wait_for_rdy(void) 327static int wait_for_rdy(void)
328{ 328{
329 long timeout; 329 long timeout;
@@ -345,7 +345,7 @@ static int wait_for_rdy(void)
345 return 0; /* timeout */ 345 return 0; /* timeout */
346} 346}
347 347
348static int wait_for_start_of_transfer(void) __attribute__ ((section (".icode"))); 348static int wait_for_start_of_transfer(void) ICODE_ATTR;
349static int wait_for_start_of_transfer(void) 349static int wait_for_start_of_transfer(void)
350{ 350{
351 if (!wait_for_bsy()) 351 if (!wait_for_bsy())
@@ -353,7 +353,7 @@ static int wait_for_start_of_transfer(void)
353 return (ATA_ALT_STATUS & (STATUS_BSY|STATUS_DRQ)) == STATUS_DRQ; 353 return (ATA_ALT_STATUS & (STATUS_BSY|STATUS_DRQ)) == STATUS_DRQ;
354} 354}
355 355
356static int wait_for_end_of_transfer(void) __attribute__ ((section (".icode"))); 356static int wait_for_end_of_transfer(void) ICODE_ATTR;
357static int wait_for_end_of_transfer(void) 357static int wait_for_end_of_transfer(void)
358{ 358{
359 if (!wait_for_bsy()) 359 if (!wait_for_bsy())
@@ -367,9 +367,7 @@ static int wait_for_end_of_transfer(void)
367 * controller & cpu internal memory. 367 * controller & cpu internal memory.
368 */ 368 */
369/* the tight loop of ata_read_sectors(), to avoid the whole in IRAM */ 369/* the tight loop of ata_read_sectors(), to avoid the whole in IRAM */
370static void copy_read_sectors(unsigned char* buf, 370static void copy_read_sectors(unsigned char* buf, int wordcount) ICODE_ATTR;
371 int wordcount)
372 __attribute__ ((section (".icode")));
373static void copy_read_sectors(unsigned char* buf, int wordcount) 371static void copy_read_sectors(unsigned char* buf, int wordcount)
374{ 372{
375#ifdef PREFER_C_READING 373#ifdef PREFER_C_READING
@@ -679,8 +677,7 @@ int ata_read_sectors(IF_MV2(int drive,)
679 677
680/* the tight loop of ata_write_sectors(), to avoid the whole in IRAM */ 678/* the tight loop of ata_write_sectors(), to avoid the whole in IRAM */
681static void copy_write_sectors(const unsigned char* buf, 679static void copy_write_sectors(const unsigned char* buf,
682 int wordcount) 680 int wordcount) ICODE_ATTR;
683 __attribute__ ((section (".icode")));
684 681
685static void copy_write_sectors(const unsigned char* buf, int wordcount) 682static void copy_write_sectors(const unsigned char* buf, int wordcount)
686{ 683{
diff --git a/firmware/kernel.c b/firmware/kernel.c
index 239394a244..6623ca98b3 100644
--- a/firmware/kernel.c
+++ b/firmware/kernel.c
@@ -35,8 +35,8 @@ static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
35static struct event_queue *all_queues[32]; 35static struct event_queue *all_queues[32];
36static int num_queues; 36static int num_queues;
37 37
38void sleep(int ticks) __attribute__ ((section(".icode"))); 38void sleep(int ticks) ICODE_ATTR;
39void queue_wait(struct event_queue *q, struct event *ev) __attribute__ ((section(".icode"))); 39void queue_wait(struct event_queue *q, struct event *ev) ICODE_ATTR;
40 40
41/**************************************************************************** 41/****************************************************************************
42 * Standard kernel stuff 42 * Standard kernel stuff