summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-07-19 04:41:07 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-07-19 04:41:07 +0000
commit81593e8e617d7932ecb0cdf9b7ffa766ff36f969 (patch)
treee8a01021aa1d3076b13b5aa4d5c0a7d834b1a77f /firmware
parent3f86a2cd62e9e8309142b7afd7533c1402722390 (diff)
downloadrockbox-81593e8e617d7932ecb0cdf9b7ffa766ff36f969.tar.gz
rockbox-81593e8e617d7932ecb0cdf9b7ffa766ff36f969.tar.bz2
rockbox-81593e8e617d7932ecb0cdf9b7ffa766ff36f969.zip
sd-as3525v2: remove unneeded prototypes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27488 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c50
1 files 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)
{