Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / bluetooth / btmrvl_sdio.h
index 27329f1..43d35a6 100644 (file)
 /* Max retry number of CMD53 write */
 #define MAX_WRITE_IOMEM_RETRY          2
 
-/* Host Control Registers */
-#define IO_PORT_0_REG                  0x00
-#define IO_PORT_1_REG                  0x01
-#define IO_PORT_2_REG                  0x02
-
-#define CONFIG_REG                     0x03
-#define HOST_POWER_UP                  BIT(1)
-#define HOST_CMD53_FIN                 BIT(2)
-
-#define HOST_INT_MASK_REG              0x04
-#define HIM_DISABLE                    0xff
-#define HIM_ENABLE                     (BIT(0) | BIT(1))
-
-#define HOST_INTSTATUS_REG             0x05
-#define UP_LD_HOST_INT_STATUS          BIT(0)
-#define DN_LD_HOST_INT_STATUS          BIT(1)
-
-/* Card Control Registers */
-#define SQ_READ_BASE_ADDRESS_A0_REG    0x10
-#define SQ_READ_BASE_ADDRESS_A1_REG    0x11
-
-#define CARD_STATUS_REG                0x20
-#define DN_LD_CARD_RDY                 BIT(0)
-#define CARD_IO_READY                  BIT(3)
-
-#define CARD_FW_STATUS0_REG            0x40
-#define CARD_FW_STATUS1_REG            0x41
-#define FIRMWARE_READY                 0xfedc
-
-#define CARD_RX_LEN_REG                        0x42
-#define CARD_RX_UNIT_REG               0x43
-
+/* register bitmasks */
+#define HOST_POWER_UP                          BIT(1)
+#define HOST_CMD53_FIN                         BIT(2)
+
+#define HIM_DISABLE                            0xff
+#define HIM_ENABLE                             (BIT(0) | BIT(1))
+
+#define UP_LD_HOST_INT_STATUS                  BIT(0)
+#define DN_LD_HOST_INT_STATUS                  BIT(1)
+
+#define DN_LD_CARD_RDY                         BIT(0)
+#define CARD_IO_READY                          BIT(3)
+
+#define FIRMWARE_READY                         0xfedc
+
+
+struct btmrvl_sdio_card_reg {
+       u8 cfg;
+       u8 host_int_mask;
+       u8 host_intstatus;
+       u8 card_status;
+       u8 sq_read_base_addr_a0;
+       u8 sq_read_base_addr_a1;
+       u8 card_revision;
+       u8 card_fw_status0;
+       u8 card_fw_status1;
+       u8 card_rx_len;
+       u8 card_rx_unit;
+       u8 io_port_0;
+       u8 io_port_1;
+       u8 io_port_2;
+};
 
 struct btmrvl_sdio_card {
        struct sdio_func *func;
        u32 ioport;
        const char *helper;
        const char *firmware;
+       const struct btmrvl_sdio_card_reg *reg;
+       u16 sd_blksz_fw_dl;
        u8 rx_unit;
        struct btmrvl_private *priv;
 };
@@ -92,6 +94,8 @@ struct btmrvl_sdio_card {
 struct btmrvl_sdio_device {
        const char *helper;
        const char *firmware;
+       const struct btmrvl_sdio_card_reg *reg;
+       u16 sd_blksz_fw_dl;
 };