mmc: dw_mmc: don't hard code fifo depth, fix usage
[pandora-kernel.git] / include / linux / mmc / dw_mmc.h
index dea4847..01db1a0 100644 (file)
@@ -74,6 +74,7 @@ struct mmc_data;
  * @pdev: Platform device associated with the MMC controller.
  * @pdata: Platform data associated with the MMC controller.
  * @slot: Slots sharing this MMC controller.
+ * @fifo_depth: depth of FIFO.
  * @data_shift: log2 of FIFO item size.
  * @push_data: Pointer to FIFO push function.
  * @pull_data: Pointer to FIFO pull function.
@@ -146,6 +147,7 @@ struct dw_mci {
        struct dw_mci_slot      *slot[MAX_MCI_SLOTS];
 
        /* FIFO push and pull */
+       int                     fifo_depth;
        int                     data_shift;
        void (*push_data)(struct dw_mci *host, void *buf, int cnt);
        void (*pull_data)(struct dw_mci *host, void *buf, int cnt);
@@ -196,6 +198,12 @@ struct dw_mci_board {
        unsigned int bus_hz; /* Bus speed */
 
        unsigned int caps;      /* Capabilities */
+       /*
+        * Override fifo depth. If 0, autodetect it from the FIFOTH register,
+        * but note that this may not be reliable after a bootloader has used
+        * it.
+        */
+       unsigned int fifo_depth;
 
        /* delay in mS before detecting cards after interrupt */
        u32 detect_delay_ms;