projects
/
qemu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of /home/nchip/public_html/qemu into garage-push
[qemu]
/
hw
/
sd.c
diff --git
a/hw/sd.c
b/hw/sd.c
index
2e2a0f5
..
c2648bc
100644
(file)
--- a/
hw/sd.c
+++ b/
hw/sd.c
@@
-36,10
+36,10
@@
//#define DEBUG_SD 1
#ifdef DEBUG_SD
//#define DEBUG_SD 1
#ifdef DEBUG_SD
-#define DPRINTF(fmt, args...) \
-do { fprintf(stderr, "%s: " fmt , __FUNCTION__, ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { fprintf(stderr, "SD: " fmt , ## __VA_ARGS__); } while (0)
#else
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
typedef enum {
#endif
typedef enum {
@@
-301,7
+301,7
@@
static void sd_set_sdstatus(SDState *sd)
memset(sd->sd_status, 0, 64);
}
memset(sd->sd_status, 0, 64);
}
-static int sd_req_crc_validate(struct sd_request_s *req)
+static int sd_req_crc_validate(SDRequest *req)
{
uint8_t buffer[5];
buffer[0] = 0x40 | req->cmd;
{
uint8_t buffer[5];
buffer[0] = 0x40 | req->cmd;
@@
-672,7
+672,7
@@
static void sd_lock_command(SDState *sd)
}
static sd_rsp_type_t sd_normal_command(SDState *sd,
}
static sd_rsp_type_t sd_normal_command(SDState *sd,
- struct sd_request_s req)
+ SDRequest req)
{
uint32_t rca = 0x0000;
{
uint32_t rca = 0x0000;
@@
-1211,7
+1211,7
@@
static sd_rsp_type_t sd_normal_command(SDState *sd,
}
static sd_rsp_type_t sd_app_command(SDState *sd,
}
static sd_rsp_type_t sd_app_command(SDState *sd,
- struct sd_request_s req) {
+ SDRequest req) {
uint32_t rca;
if (sd_cmd_type[req.cmd] == sd_ac || sd_cmd_type[req.cmd] == sd_adtc)
uint32_t rca;
if (sd_cmd_type[req.cmd] == sd_ac || sd_cmd_type[req.cmd] == sd_adtc)
@@
-1320,7
+1320,7
@@
static sd_rsp_type_t sd_app_command(SDState *sd,
return sd_r0;
}
return sd_r0;
}
-int sd_do_command(SDState *sd, struct sd_request_s *req,
+int sd_do_command(SDState *sd, SDRequest *req,
uint8_t *response) {
uint32_t last_status = sd->card_status;
sd_rsp_type_t rtype;
uint8_t *response) {
uint32_t last_status = sd->card_status;
sd_rsp_type_t rtype;