···12871287 * indicating signal direction for the signals in12881288 * the SD/MMC bus and feedback-clock usage.12891289 */12901290- pwr |= host->plat->sigdir;12901290+ pwr |= host->pwr_reg_add;1291129112921292 if (ios->bus_width == MMC_BUS_WIDTH_4)12931293 pwr &= ~MCI_ST_DATA74DIREN;···13861386 .start_signal_voltage_switch = mmci_sig_volt_switch,13871387};1388138813891389-static void mmci_dt_populate_generic_pdata(struct device_node *np,13901390- struct mmci_platform_data *pdata)13911391-{13921392- if (of_get_property(np, "st,sig-dir-dat0", NULL))13931393- pdata->sigdir |= MCI_ST_DATA0DIREN;13941394- if (of_get_property(np, "st,sig-dir-dat2", NULL))13951395- pdata->sigdir |= MCI_ST_DATA2DIREN;13961396- if (of_get_property(np, "st,sig-dir-dat31", NULL))13971397- pdata->sigdir |= MCI_ST_DATA31DIREN;13981398- if (of_get_property(np, "st,sig-dir-dat74", NULL))13991399- pdata->sigdir |= MCI_ST_DATA74DIREN;14001400- if (of_get_property(np, "st,sig-dir-cmd", NULL))14011401- pdata->sigdir |= MCI_ST_CMDDIREN;14021402- if (of_get_property(np, "st,sig-pin-fbclk", NULL))14031403- pdata->sigdir |= MCI_ST_FBCLKEN;14041404-}14051405-14061389static int mmci_of_parse(struct device_node *np, struct mmc_host *mmc)14071390{13911391+ struct mmci_host *host = mmc_priv(mmc);14081392 int ret = mmc_of_parse(mmc);1409139314101394 if (ret)14111395 return ret;13961396+13971397+ if (of_get_property(np, "st,sig-dir-dat0", NULL))13981398+ host->pwr_reg_add |= MCI_ST_DATA0DIREN;13991399+ if (of_get_property(np, "st,sig-dir-dat2", NULL))14001400+ host->pwr_reg_add |= MCI_ST_DATA2DIREN;14011401+ if (of_get_property(np, "st,sig-dir-dat31", NULL))14021402+ host->pwr_reg_add |= MCI_ST_DATA31DIREN;14031403+ if (of_get_property(np, "st,sig-dir-dat74", NULL))14041404+ host->pwr_reg_add |= MCI_ST_DATA74DIREN;14051405+ if (of_get_property(np, "st,sig-dir-cmd", NULL))14061406+ host->pwr_reg_add |= MCI_ST_CMDDIREN;14071407+ if (of_get_property(np, "st,sig-pin-fbclk", NULL))14081408+ host->pwr_reg_add |= MCI_ST_FBCLKEN;1412140914131410 if (of_get_property(np, "mmc-cap-mmc-highspeed", NULL))14141411 mmc->caps |= MMC_CAP_MMC_HIGHSPEED;···14361439 if (!plat)14371440 return -ENOMEM;14381441 }14391439-14401440- if (np)14411441- mmci_dt_populate_generic_pdata(np, plat);1442144214431443 mmc = mmc_alloc_host(sizeof(struct mmci_host), &dev->dev);14441444 if (!mmc)
+11
drivers/mmc/host/mmci.h
···1313#define MCI_PWR_ON 0x031414#define MCI_OD (1 << 6)1515#define MCI_ROD (1 << 7)1616+/*1717+ * The ST Micro version does not have ROD and reuse the voltage registers for1818+ * direction settings.1919+ */2020+#define MCI_ST_DATA2DIREN (1 << 2)2121+#define MCI_ST_CMDDIREN (1 << 3)2222+#define MCI_ST_DATA0DIREN (1 << 4)2323+#define MCI_ST_DATA31DIREN (1 << 5)2424+#define MCI_ST_FBCLKEN (1 << 7)2525+#define MCI_ST_DATA74DIREN (1 << 8)16261727#define MMCICLOCK 0x0041828#define MCI_CLK_ENABLE (1 << 8)···193183 unsigned int mclk;194184 unsigned int cclk;195185 u32 pwr_reg;186186+ u32 pwr_reg_add;196187 u32 clk_reg;197188 u32 datactrl_reg;198189 u32 busy_status;
-16
include/linux/amba/mmci.h
···6677#include <linux/mmc/host.h>8899-1010-/*1111- * These defines is places here due to access is needed from machine1212- * configuration files. The ST Micro version does not have ROD and1313- * reuse the voltage registers for direction settings.1414- */1515-#define MCI_ST_DATA2DIREN (1 << 2)1616-#define MCI_ST_CMDDIREN (1 << 3)1717-#define MCI_ST_DATA0DIREN (1 << 4)1818-#define MCI_ST_DATA31DIREN (1 << 5)1919-#define MCI_ST_FBCLKEN (1 << 7)2020-#define MCI_ST_DATA74DIREN (1 << 8)2121-229/* Just some dummy forwarding */2310struct dma_chan;2411···3245 * @capabilities: the capabilities of the block as implemented in3346 * this platform, signify anything MMC_CAP_* from mmc/host.h3447 * @capabilities2: more capabilities, MMC_CAP2_* from mmc/host.h3535- * @sigdir: a bit field indicating for what bits in the MMC bus the host3636- * should enable signal direction indication.3748 * @dma_filter: function used to select an appropriate RX and TX3849 * DMA channel to be used for DMA, if and only if you're deploying the3950 * generic DMA engine···5469 bool cd_invert;5570 unsigned long capabilities;5671 unsigned long capabilities2;5757- u32 sigdir;5872 bool (*dma_filter)(struct dma_chan *chan, void *filter_param);5973 void *dma_rx_param;6074 void *dma_tx_param;