sd-as3525v2: remove unneeded prototypes

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27488 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-07-19 04:41:07 +00:00
parent 3f86a2cd62
commit 81593e8e61

View file

@ -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 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 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]; static tCardInfo card_info[NUM_DRIVES];
/* for compatibility */ /* for compatibility */
@ -451,6 +448,30 @@ static bool send_cmd(const int drive, const int cmd, const int arg, const int fl
return true; 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) static int sd_init_card(const int drive)
{ {
unsigned long response; unsigned long response;
@ -759,29 +780,6 @@ int sd_init(void)
return 0; 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, static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
int count, void* buf, bool write) int count, void* buf, bool write)
{ {