OSDN Git Service

greybus: sdio: split cmd_flags to there meaning
authorRui Miguel Silva <rui.silva@linaro.org>
Thu, 2 Jul 2015 18:11:30 +0000 (19:11 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 6 Jul 2015 18:15:42 +0000 (11:15 -0700)
Instead of using values in the command cmd_flags field use the real
flags in a bit mask.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/sdio.c

index 6f8c15e..498f6e9 100644 (file)
@@ -769,10 +769,11 @@ struct gb_sdio_command_request {
        __u8    cmd;
        __u8    cmd_flags;
 #define GB_SDIO_RSP_NONE               0x00
-#define GB_SDIO_RSP_R1_R5_R6_R7                0x01
-#define GB_SDIO_RSP_R1B                        0x02
-#define GB_SDIO_RSP_R2                 0x03
-#define GB_SDIO_RSP_R3_R4              0x04
+#define GB_SDIO_RSP_PRESENT            0x01
+#define GB_SDIO_RSP_136                        0x02
+#define GB_SDIO_RSP_CRC                        0x04
+#define GB_SDIO_RSP_BUSY               0x08
+#define GB_SDIO_RSP_OPCODE             0x10
 
        __u8    cmd_type;
 #define GB_SDIO_CMD_AC         0x00
index f028e14..e842cae 100644 (file)
@@ -38,6 +38,14 @@ static struct workqueue_struct *gb_sdio_mrq_workqueue;
 /* Define get_version() routine */
 define_get_version(gb_sdio_host, SDIO);
 
+#define GB_SDIO_RSP_R1_R5_R6_R7        (GB_SDIO_RSP_PRESENT | GB_SDIO_RSP_CRC | \
+                                GB_SDIO_RSP_OPCODE)
+#define GB_SDIO_RSP_R3_R4      (GB_SDIO_RSP_PRESENT)
+#define GB_SDIO_RSP_R2         (GB_SDIO_RSP_PRESENT | GB_SDIO_RSP_CRC | \
+                                GB_SDIO_RSP_136)
+#define GB_SDIO_RSP_R1B                (GB_SDIO_RSP_PRESENT | GB_SDIO_RSP_CRC | \
+                                GB_SDIO_RSP_OPCODE | GB_SDIO_RSP_BUSY)
+
 static void _gb_sdio_set_host_caps(struct gb_sdio_host *host, u32 r)
 {
        u32 caps = 0;