From 86f30b1ca02dbc004e1e9394a53f46fd66aeaa45 Mon Sep 17 00:00:00 2001 From: funman Date: Mon, 19 Jul 2010 04:41:07 +0000 Subject: [PATCH] sd-as3525v2: remove unneeded prototypes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27488 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/sd-as3525v2.c | 50 +++++++++++++++----------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 9756d9e1f0..85913ec9dc 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c @@ -327,9 +327,6 @@ static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS* SD_BLOCK_SIZE] __attribute__((aligned(32))); /* align on cache line size */ static unsigned char *uncached_buffer = AS3525_UNCACHED_ADDR(&aligned_buffer[0]); -static void init_controller(void); -static int sd_wait_for_tran_state(const int drive); - static tCardInfo card_info[NUM_DRIVES]; /* for compatibility */ @@ -451,6 +448,30 @@ static bool send_cmd(const int drive, const int cmd, const int arg, const int fl return true; } +static int sd_wait_for_tran_state(const int drive) +{ + unsigned long response; + unsigned int timeout = current_tick + 5*HZ; + + while (1) + { + while(!(send_cmd(drive, SD_SEND_STATUS, card_info[drive].rca, MCI_RESP, &response))); + + if (((response >> 9) & 0xf) == SD_TRAN) + return 0; + + if(TIME_AFTER(current_tick, timeout)) + return -10 * ((response >> 9) & 0xf); + + if (TIME_AFTER(current_tick, next_yield)) + { + yield(); + next_yield = current_tick + MIN_YIELD_PERIOD; + } + } +} + + static int sd_init_card(const int drive) { unsigned long response; @@ -759,29 +780,6 @@ int sd_init(void) return 0; } -static int sd_wait_for_tran_state(const int drive) -{ - unsigned long response; - unsigned int timeout = current_tick + 5*HZ; - - while (1) - { - while(!(send_cmd(drive, SD_SEND_STATUS, card_info[drive].rca, MCI_RESP, &response))); - - if (((response >> 9) & 0xf) == SD_TRAN) - return 0; - - if(TIME_AFTER(current_tick, timeout)) - return -10 * ((response >> 9) & 0xf); - - if (TIME_AFTER(current_tick, next_yield)) - { - yield(); - next_yield = current_tick + MIN_YIELD_PERIOD; - } - } -} - static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf, bool write) { -- 2.11.4.GIT