Lines Matching defs:to

56  * operations the card has to perform.
58 #define MMC_BKOPS_MAX_TIMEOUT (4 * 60 * 1000) /* max time to wait in ms */
67 * So we allow it it to be disabled.
252 * @card: MMC card to start BKOPS
253 * @form_exception: A flag to indicate if this function was
254 * called due to an exception raised by the card
273 pr_err("%s: Failed to read bkops status: %d\n",
319 * Wakes up mmc context, passed as a callback to host controller driver
334 * @host: MMC host to start the request
335 * @mrq: data request to start
337 * Sets the done callback to be called when request is completed by the card.
369 * @host: MMC host to prepare the command.
370 * @mrq: MMC request to wait for
436 * to complete, card might be still in programming state
437 * so let's try to bring the card out of programming
447 pr_err("%s: %s: Failed to interrupt sanitize\n",
465 * @host: MMC host to prepare command
466 * @mrq: MMC request to prepare for
468 * that may run in parellel to this call, otherwise false
470 * mmc_pre_req() is called in prior to mmc_start_req() to let
486 * @host: MMC host to post process command
487 * @mrq: MMC request to post process for
505 * @host: MMC host to start command
506 * @areq: async request to start
512 * Does not wait for the new request to complete.
515 * Wait for the an ongoing request (previoulsy started) to complete and
537 * nothing to return
578 * @host: MMC host to start command
579 * @mrq: MMC request to start
582 * for the command to complete. Does not attempt to parse the
632 /* In all other states, it's illegal to issue HPI */
661 * @host: MMC host to start command
662 * @cmd: MMC command to start
666 * to complete. Return any error that occurred while the command
667 * was executing. Do not attempt to parse the response.
690 * @card: MMC card to check BKOPS
692 * Send HPI command to stop ongoing background operations to
695 * to avoid errors in servicing read/write requests.
727 pr_err("%s: could not allocate buffer to receive the ext_csd.\n",
751 * Computes the data timeout parameters according to the
796 * for hosts to implement more than 500ms
799 * previous value of 300ms is known to be
821 * Address this by setting the read timeout to a "reasonably high"
849 * mmc_align_data_size - pads a transfer size to a more optimal value
854 * order to avoid controller bugs and/or performance hits
855 * (e.g. some controllers revert to PIO for certain sizes).
865 * FIXME: We don't have a system for the controller to tell
877 * @host: mmc host to claim
922 * @host: mmc host to release
924 * Release a MMC host, allowing others to claim the host
973 * Internal function that does the actual ios call to the host driver,
1003 * Sets the host clock to the highest possible frequency that
1026 * This gates the clock by setting it to 0 Hz.
1055 /* This call will also set host->clk_gated to false */
1102 * mmc_vdd_to_ocrbitnum - Convert a voltage to the OCR bit number
1106 * This function returns the OCR bit number according to the provided @vdd
1111 * with @low_bits = true, 3300 mV translates to ilog2(MMC_VDD_32_33);
1112 * with @low_bits = false, 3300 mV translates to ilog2(MMC_VDD_33_34);
1114 * Any value in the [1951:1999] range translates to the ilog2(MMC_VDD_20_21).
1138 * mmc_vddrange_to_ocrmask - Convert a voltage range to the OCR mask
1142 * This function returns the OCR mask bits according to the provided @vdd_min
1147 * [3300:3400] range is translated to MMC_VDD_32_33 | MMC_VDD_33_34 |
1167 /* Fill the mask, from max bit to min bit. */
1179 * @np: The device node need to be parsed.
1222 * @supply: regulator to use
1225 * can be provided to MMC/SD/SDIO devices using the specified voltage
1264 * mmc_regulator_set_ocr - set regulator to match host->ios voltage
1265 * @mmc: the host to regulate
1266 * @supply: regulator to use
1271 * MMC host drivers may use this to enable or disable a regulator using
1360 * Sanity check the voltages that the card claims to
1365 "card claims to support voltages below defined range\n");
1417 * Send CMD11 only if the request is to switch the card to
1447 * after the response of cmd11, but wait 1 ms to be sure
1456 * for 5 ms according to the SD spec
1476 /* Wait for at least 1 ms according to spec */
1480 * Failure to switch is indicated by the card holding
1521 * Apply power to the MMC stack. This is a two-stage process.
1522 * First, we enable power to the card without the clock running.
1523 * We then wait a bit for the power to stabilise. Finally,
1524 * enable the bus drivers and clock to the card.
1526 * We must _NOT_ enable the clock prior to power stablising.
1549 /* Try to set signal voltage to 3.3V but fall back to 1.8v or 1.2v */
1558 * This delay should be sufficient to allow the power supply
1559 * to reach the minimum voltage.
1570 * time required to reach a stable voltage.
1609 /* Wait at least 1 ms according to SD spec */
1615 * Cleanup when the last reference to the bus operator is dropped.
1654 * Assign a mmc bus handler to a host. Only one bus handler may control a
1711 * 5 s to give provision for user space to consume the event.
1724 * @delay: optional delay to wait before detection (jiffies)
1747 * It is possible to erase an arbitrarily large area of an SD or MMC
1751 * Consequently, 'pref_erase' is defined as a guide to limit erases
1752 * to that size and alignment.
1754 * For SD cards that define Allocation Unit size, limit erases to one
1756 * Erase Size, whether it is switched on or not, limit to that size.
1759 * can end up taking longer to erase.
1825 * to 1ms in that case.
1887 unsigned int to, unsigned int arg)
1896 nr = to - from + 1;
1900 * qty is used to calculate the erase timeout which depends on how many
1905 * seem to insist on that in the JEDEC standard, so we fall back to
1913 * impossible to calculate the secure trim 2 timeout correctly.
1916 qty += ((to >> card->erase_shift) -
1919 qty += to - from + 1;
1921 qty += ((to / card->erase_size) -
1926 to <<= 9;
1948 cmd.arg = to;
2009 * @card: card to erase
2010 * @from: first sector to erase
2011 * @nr: number of sectors to erase
2019 unsigned int rem, to = from + nr;
2062 to = from + nr;
2064 if (to <= from)
2067 /* 'from' and 'to' are inclusive */
2068 to -= 1;
2070 return mmc_do_erase(card, from, to, arg);
2094 * As there's no way to detect the discard support bit at v4.5
2168 /* Convert qty to sectors */
2326 pr_info("%s: %s: trying to init card at %u Hz\n",
2338 * sdio_reset sends CMD52 to reset card. Since we do not know
2374 * pads are still contacted in hardware (refer to "SD Card Mechanical
2403 * The card will be considered unchanged unless we have been asked to
2404 * detect a change or host requires polling to provide card detection.
2414 * Schedule a detect work as soon as possible to let a
2478 * Only we can add a new handler, so it's safe to
2611 * Flush the cache to the non-volatile storage.
2635 to sync the card.
2690 * Init struct context_info needed to implement asynchronous