mmc: mmci: add datactrl block size variant property
[platform/kernel/linux-rpi.git] / drivers / mmc / host / mmci.h
index ed59baf..d5979e8 100644 (file)
@@ -217,6 +217,7 @@ struct mmci_host;
  * @blksz_datactrl4: true if Block size is at b4..b16 position in datactrl
  *                  register
  * @datactrl_mask_sdio: SDIO enable mask in datactrl register
+ * @datactrl_blksz: block size in power of two
  * @pwrreg_powerup: power up value for MMCIPOWER register
  * @f_max: maximum clk frequency supported by the controller.
  * @signal_direction: input/out direction of bus signals can be indicated
@@ -248,6 +249,7 @@ struct variant_data {
        unsigned int            data_cmd_enable;
        unsigned int            datactrl_mask_ddrmode;
        unsigned int            datactrl_mask_sdio;
+       unsigned int            datactrl_blocksz;
        u8                      st_sdio:1;
        u8                      st_clkdiv:1;
        u8                      blksz_datactrl16:1;
@@ -284,6 +286,8 @@ struct mmci_host_ops {
        int (*dma_start)(struct mmci_host *host, unsigned int *datactrl);
        void (*dma_finalize)(struct mmci_host *host, struct mmc_data *data);
        void (*dma_error)(struct mmci_host *host);
+       void (*set_clkreg)(struct mmci_host *host, unsigned int desired);
+       void (*set_pwrreg)(struct mmci_host *host, unsigned int pwr);
 };
 
 struct mmci_host {
@@ -336,6 +340,9 @@ struct mmci_host {
 
 #define dma_inprogress(host)   ((host)->dma_in_progress)
 
+void mmci_write_clkreg(struct mmci_host *host, u32 clk);
+void mmci_write_pwrreg(struct mmci_host *host, u32 pwr);
+
 int mmci_dmae_prep_data(struct mmci_host *host, struct mmc_data *data,
                        bool next);
 void mmci_dmae_unprep_data(struct mmci_host *host, struct mmc_data *data,