X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fdwmmc.h;h=05b0817fe1e1834b10bef69f892bd3fdc3d083c6;hb=02499e4edc885b3064c76f8b6e84d9ff8d7a6b4b;hp=7a7555a73ab2c7a5291b5b2f5ee5e263998d4eae;hpb=7a1af7a79bd79ded6a78d0c1afdbc3353669e313;p=u-boot diff --git a/include/dwmmc.h b/include/dwmmc.h index 7a7555a73a..05b0817fe1 100644 --- a/include/dwmmc.h +++ b/include/dwmmc.h @@ -105,6 +105,8 @@ /* 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 {