/drivers/mmc/core/ |
H A D | debugfs.c | 56 struct mmc_ios *ios = &host->ios; local 59 seq_printf(s, "clock:\t\t%u Hz\n", ios->clock); 62 seq_printf(s, "vdd:\t\t%u ", ios->vdd); 63 if ((1 << ios->vdd) & MMC_VDD_165_195) 65 else if (ios->vdd < (ARRAY_SIZE(vdd_str) - 1) 66 && vdd_str[ios->vdd] && vdd_str[ios->vdd + 1]) 67 seq_printf(s, "(%s ~ %s V)\n", vdd_str[ios->vdd], 68 vdd_str[ios [all...] |
H A D | core.c | 707 * Internal function that does the actual ios call to the host driver, 712 struct mmc_ios *ios = &host->ios; local 716 mmc_hostname(host), ios->clock, ios->bus_mode, 717 ios->power_mode, ios->chip_select, ios->vdd, 718 ios->bus_width, ios [all...] |
H A D | host.c | 83 * set_ios() operations with ios.clock field set to 0 to gate (disable) 89 unsigned long freq = host->ios.clock; 123 /* This will set host->ios.clock to 0 */ 147 * Makes sure the host ios.clock is restored to a non-zero value 194 * Calls the host driver with ios.clock set to zero as often as possible 226 freq = host->ios.clock;
|
H A D | mmc.c | 687 switch (1 << host->ios.vdd) { 689 if (host->ios.clock <= 26000000) 691 else if (host->ios.clock <= 52000000) 695 else if (host->ios.clock <= 200000000) 707 if (host->ios.clock <= 26000000) 709 else if (host->ios.clock <= 52000000) 713 else if (host->ios.clock <= 200000000) 1090 u32 bus_width = card->host->ios.bus_width;
|
/drivers/mmc/host/ |
H A D | sdhci.c | 222 static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); 240 sdhci_set_ios(host->mmc, &host->mmc->ios); 1310 static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) argument 1320 if (host->vmmc && ios->power_mode == MMC_POWER_OFF) 1329 if (ios->power_mode == MMC_POWER_OFF) { 1334 sdhci_set_clock(host, ios->clock); 1336 if (ios->power_mode == MMC_POWER_OFF) 1339 vdd_bit = sdhci_set_power(host, ios->vdd); 1348 host->ops->platform_send_init_74_clocks(host, ios->power_mode); 1356 host->ops->platform_8bit_width(host, ios 1476 sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 1578 sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, struct mmc_ios *ios) argument 1677 sdhci_start_signal_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios) argument [all...] |
H A D | omap_hsmmc.c | 478 static u16 calc_divisor(struct omap_hsmmc_host *host, struct mmc_ios *ios) argument 482 if (ios->clock) { 483 dsor = DIV_ROUND_UP(clk_get_rate(host->fclk), ios->clock); 493 struct mmc_ios *ios = &host->mmc->ios; local 497 dev_dbg(mmc_dev(host->mmc), "Set clock to %uHz\n", ios->clock); 503 regval = regval | (calc_divisor(host, ios) << 6) | (DTO << 16); 519 struct mmc_ios *ios = &host->mmc->ios; local 523 switch (ios 542 struct mmc_ios *ios = &host->mmc->ios; local 560 struct mmc_ios *ios = &host->mmc->ios; local 1511 omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument [all...] |
H A D | bfin_sdh.c | 343 static void sdh_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 353 if (ios->clock) { 356 ios_clk = 2 * ios->clock; 368 if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) 375 if (ios->bus_width == MMC_BUS_WIDTH_4) { 391 host->power_mode = ios->power_mode; 392 if (ios->power_mode == MMC_POWER_ON) 403 ios->clock);
|
H A D | mvsdio.c | 609 static void mvsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 615 if (ios->power_mode == MMC_POWER_UP) 618 if (ios->clock == 0) { 623 } else if (ios->clock != host->clock) { 624 u32 m = DIV_ROUND_UP(host->base_clock, ios->clock) - 1; 628 host->clock = ios->clock; 631 ios->clock, host->base_clock / (m+1), m); 642 if (ios->bus_mode == MMC_BUSMODE_PUSHPULL) 645 if (ios->bus_width == MMC_BUS_WIDTH_4) 656 if (ios [all...] |
H A D | tmio_mmc_pio.c | 687 if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) { 760 static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 774 ios->clock, ios->power_mode); 798 if (ios->power_mode == MMC_POWER_ON && ios->clock) { 803 tmio_mmc_set_clock(host, ios->clock); 809 } else if (ios->power_mode != MMC_POWER_UP) { 810 if (host->set_pwr && ios->power_mode == MMC_POWER_OFF) 819 switch (ios [all...] |
H A D | mxcmmc.c | 720 static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 729 if (ios->bus_width == MMC_BUS_WIDTH_4) 746 if (ios->bus_width == MMC_BUS_WIDTH_4) 751 if (host->power_mode != ios->power_mode) { 752 mxcmci_set_power(host, ios->power_mode, ios->vdd); 753 host->power_mode = ios->power_mode; 755 if (ios->power_mode == MMC_POWER_ON) 759 if (ios->clock) { 760 mxcmci_set_clk_rate(host, ios [all...] |
H A D | pxamci.c | 465 static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 469 if (ios->clock) { 471 unsigned int clk = rate / ios->clock; 476 if (ios->clock == 26000000) { 489 if (rate / clk > ios->clock) 505 if (host->power_mode != ios->power_mode) { 508 host->power_mode = ios->power_mode; 510 ret = pxamci_set_power(host, ios->power_mode, ios->vdd); 522 if (ios [all...] |
H A D | davinci_mmc.c | 786 static void calculate_clk_divider(struct mmc_host *mmc, struct mmc_ios *ios) argument 792 if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) { 812 mmc_push_pull_freq = calculate_freq_for_card(host, ios->clock); 832 static void mmc_davinci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 840 ios->clock, ios->bus_mode, ios->power_mode, 841 ios->vdd); 843 switch (ios->power_mode) { 854 switch (ios [all...] |
H A D | tifm_sd.c | 797 static void tifm_sd_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 806 dev_dbg(&sock->dev, "ios: clock = %u, vdd = %x, bus_mode = %x, " 808 ios->clock, ios->vdd, ios->bus_mode, ios->chip_select, 809 ios->power_mode, ios->bus_width); 811 if (ios->bus_width == MMC_BUS_WIDTH_4) { 820 if (ios [all...] |
H A D | s3cmci.c | 1205 static void s3cmci_set_clk(struct s3cmci_host *host, struct mmc_ios *ios) argument 1213 if (host->real_rate <= ios->clock) 1224 if (ios->clock == 0) 1228 static void s3cmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 1237 switch (ios->power_mode) { 1248 host->pdata->set_power(ios->power_mode, ios->vdd); 1263 host->pdata->set_power(ios->power_mode, ios->vdd); 1268 s3cmci_set_clk(host, ios); [all...] |
H A D | mmc_spi.c | 1186 static void mmc_spi_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 1190 if (host->power_mode != ios->power_mode) { 1196 mmc_powerstring(ios->power_mode), 1197 ios->vdd, 1204 switch (ios->power_mode) { 1208 ios->vdd); 1209 if (ios->power_mode == MMC_POWER_UP) 1215 if (ios->power_mode == MMC_POWER_ON) 1227 if (canpower && ios->power_mode == MMC_POWER_OFF) { 1261 host->power_mode = ios [all...] |
H A D | via-sdmmc.c | 719 static void via_sdc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 735 if (ios->bus_width == MMC_BUS_WIDTH_1) 740 if (ios->power_mode == MMC_POWER_OFF) 745 if (ios->timing == MMC_TIMING_SD_HS) 753 if (ios->clock >= 48000000) 755 else if (ios->clock >= 33000000) 757 else if (ios->clock >= 24000000) 759 else if (ios->clock >= 16000000) 761 else if (ios->clock >= 12000000) 763 else if (ios [all...] |
H A D | omap.c | 1207 static int mmc_omap_calc_divisor(struct mmc_host *mmc, struct mmc_ios *ios) argument 1214 if (ios->clock == 0) 1217 dsor = func_clk_rate / ios->clock; 1221 if (func_clk_rate / dsor > ios->clock) 1229 if (ios->bus_width == MMC_BUS_WIDTH_4) 1235 static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 1244 dsor = mmc_omap_calc_divisor(mmc, ios); 1246 if (ios->vdd != slot->vdd) 1247 slot->vdd = ios->vdd; 1250 switch (ios [all...] |
H A D | sdricoh_cs.c | 355 static void sdricoh_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 360 if (ios->power_mode == MMC_POWER_ON) { 363 if (ios->bus_width == MMC_BUS_WIDTH_4) { 370 } else if (ios->power_mode == MMC_POWER_UP) {
|
H A D | mmci.c | 186 if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) 188 if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_8) 1063 static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 1074 host->plat->ios_handler(mmc_dev(mmc), ios)) 1077 switch (ios->power_mode) { 1084 ret = mmc_regulator_set_ocr(mmc, host->vcc, ios->vdd); 1109 if (variant->signal_direction && ios->power_mode != MMC_POWER_OFF) { 1117 if (ios->bus_width == MMC_BUS_WIDTH_4) 1119 else if (ios->bus_width == MMC_BUS_WIDTH_1) 1125 if (ios [all...] |
H A D | at91_mci.c | 705 static void at91_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 711 host->bus_mode = ios->bus_mode; 713 if (ios->clock == 0) { 722 if ((at91_master_clock % (ios->clock * 2)) == 0) 723 clkdiv = ((at91_master_clock / ios->clock) / 2) - 1; 725 clkdiv = (at91_master_clock / ios->clock) / 2; 730 if (ios->bus_width == MMC_BUS_WIDTH_4 && host->board->wire4) { 744 switch (ios->power_mode) {
|
H A D | au1xmmc.c | 754 static void au1xmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 759 if (ios->power_mode == MMC_POWER_OFF) 761 else if (ios->power_mode == MMC_POWER_ON) { 765 if (ios->clock && ios->clock != host->clock) { 766 au1xmmc_set_clock(host, ios->clock); 767 host->clock = ios->clock; 771 switch (ios->bus_width) {
|
H A D | cb710-mmc.c | 561 static void cb710_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 567 cb710_mmc_select_clock_divider(mmc, ios->clock); 569 if (ios->power_mode != reader->last_power_mode) 570 switch (ios->power_mode) { 595 cb710_mmc_enable_4bit_data(slot, ios->bus_width != MMC_BUS_WIDTH_1);
|
H A D | ushc.c | 375 static void ushc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 379 ushc_set_power(ushc, ios->power_mode); 380 ushc_set_bus_width(ushc, 1 << ios->bus_width); 381 ushc_set_bus_freq(ushc, ios->clock, ios->timing == MMC_TIMING_SD_HS);
|
H A D | sh_mmcif.c | 919 static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 934 if (ios->power_mode == MMC_POWER_UP) { 940 } else if (ios->power_mode == MMC_POWER_OFF || !ios->clock) { 943 if (ios->power_mode == MMC_POWER_OFF) { 952 if (p->down_pwr && ios->power_mode == MMC_POWER_OFF) 959 if (ios->clock) { 962 p->set_pwr(host->pd, ios->power_mode); 967 sh_mmcif_clock_control(host, ios->clock); 970 host->bus_width = ios [all...] |
H A D | wbsd.c | 851 static void wbsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) argument 862 if (ios->power_mode == MMC_POWER_OFF) 865 if (ios->clock >= 24000000) 867 else if (ios->clock >= 16000000) 869 else if (ios->clock >= 12000000) 886 if (ios->power_mode != MMC_POWER_OFF) { 898 if (ios->chip_select == MMC_CS_HIGH) { 899 BUG_ON(ios->bus_width != MMC_BUS_WIDTH_1); 919 host->bus_width = ios->bus_width;
|