diff options
-rw-r--r-- | firmware/drivers/ata.c | 15 | ||||
-rw-r--r-- | firmware/kernel.c | 4 |
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); | |||
308 | static int set_multiple_mode(int sectors); | 308 | static int set_multiple_mode(int sectors); |
309 | static int set_features(void); | 309 | static int set_features(void); |
310 | 310 | ||
311 | static int wait_for_bsy(void) __attribute__ ((section (".icode"))); | 311 | static int wait_for_bsy(void) ICODE_ATTR; |
312 | static int wait_for_bsy(void) | 312 | static 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 | ||
326 | static int wait_for_rdy(void) __attribute__ ((section (".icode"))); | 326 | static int wait_for_rdy(void) ICODE_ATTR; |
327 | static int wait_for_rdy(void) | 327 | static 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 | ||
348 | static int wait_for_start_of_transfer(void) __attribute__ ((section (".icode"))); | 348 | static int wait_for_start_of_transfer(void) ICODE_ATTR; |
349 | static int wait_for_start_of_transfer(void) | 349 | static 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 | ||
356 | static int wait_for_end_of_transfer(void) __attribute__ ((section (".icode"))); | 356 | static int wait_for_end_of_transfer(void) ICODE_ATTR; |
357 | static int wait_for_end_of_transfer(void) | 357 | static 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 */ |
370 | static void copy_read_sectors(unsigned char* buf, | 370 | static void copy_read_sectors(unsigned char* buf, int wordcount) ICODE_ATTR; |
371 | int wordcount) | ||
372 | __attribute__ ((section (".icode"))); | ||
373 | static void copy_read_sectors(unsigned char* buf, int wordcount) | 371 | static 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 */ |
681 | static void copy_write_sectors(const unsigned char* buf, | 679 | static void copy_write_sectors(const unsigned char* buf, |
682 | int wordcount) | 680 | int wordcount) ICODE_ATTR; |
683 | __attribute__ ((section (".icode"))); | ||
684 | 681 | ||
685 | static void copy_write_sectors(const unsigned char* buf, int wordcount) | 682 | static 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); | |||
35 | static struct event_queue *all_queues[32]; | 35 | static struct event_queue *all_queues[32]; |
36 | static int num_queues; | 36 | static int num_queues; |
37 | 37 | ||
38 | void sleep(int ticks) __attribute__ ((section(".icode"))); | 38 | void sleep(int ticks) ICODE_ATTR; |
39 | void queue_wait(struct event_queue *q, struct event *ev) __attribute__ ((section(".icode"))); | 39 | void queue_wait(struct event_queue *q, struct event *ev) ICODE_ATTR; |
40 | 40 | ||
41 | /**************************************************************************** | 41 | /**************************************************************************** |
42 | * Standard kernel stuff | 42 | * Standard kernel stuff |