]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/dwmmc.h
arm: dts: dra7-evm: add chosen node to specify serial console device
[people/ms/u-boot.git] / include / dwmmc.h
index 7a7555a73ab2c7a5291b5b2f5ee5e263998d4eae..05b0817fe1e1834b10bef69f892bd3fdc3d083c6 100644 (file)
 
 /* Status Register */
 #define DWMCI_BUSY             (1 << 9)
+#define DWMCI_FIFO_MASK                0x1ff
+#define DWMCI_FIFO_SHIFT       17
 
 /* FIFOTH Register */
 #define MSIZE(x)               ((x) << 28)
@@ -163,9 +165,26 @@ struct dwmci_host {
 
        void (*clksel)(struct dwmci_host *host);
        void (*board_init)(struct dwmci_host *host);
-       unsigned int (*get_mmc_clk)(struct dwmci_host *host);
+
+       /**
+        * Get / set a particular MMC clock frequency
+        *
+        * This is used to request the current clock frequency of the clock
+        * that drives the DWMMC peripheral. The caller will then use this
+        * information to work out the divider it needs to achieve the
+        * required MMC bus clock frequency. If you want to handle the
+        * clock external to DWMMC, use @freq to select the frequency and
+        * return that value too. Then DWMMC will put itself in bypass mode.
+        *
+        * @host:       DWMMC host
+        * @freq:       Frequency the host is trying to achieve
+        */
+       unsigned int (*get_mmc_clk)(struct dwmci_host *host, uint freq);
 
        struct mmc_config cfg;
+
+       /* use fifo mode to read and write data */
+       bool fifo_mode;
 };
 
 struct dwmci_idmac {