Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8b73df3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MMC fixes from Ulf Hansson:
 "MMC core:
   - Fix mmc card initialization for hosts not supporting HW busy
     detection
   - Fix mmc_test for sending commands during non-blocking write

  MMC host:
   - mxs: Avoid using an uninitialized
   - sdhci: Restore enhanced strobe setting during runtime resume
   - sdhci: Fix a couple of reset related issues
   - dw_mmc: Fix a reset controller issue"

* tag 'mmc-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: mxs: Initialize the spinlock prior to using it
  mmc: mmc: Use 500ms as the default generic CMD6 timeout
  mmc: mmc_test: Fix "Commands during non-blocking write" tests
  mmc: sdhci: Fix missing enhanced strobe setting during runtime resume
  mmc: sdhci: Reset cmd and data circuits after tuning failure
  mmc: sdhci: Fix unexpected data interrupt handling
  mmc: sdhci: Fix CMD line reset interfering with ongoing data transfer
  mmc: dw_mmc: add the "reset" as name of reset controller
  Documentation: synopsys-dw-mshc: add binding for reset-names
parents 5c03b53c f91346e8
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,9 @@ Optional properties:
  reset signal present internally in some host controller IC designs.
  reset signal present internally in some host controller IC designs.
  See Documentation/devicetree/bindings/reset/reset.txt for details.
  See Documentation/devicetree/bindings/reset/reset.txt for details.


* reset-names: request name for using "resets" property. Must be "reset".
	(It will be used together with "resets" property.)

* clocks: from common clock binding: handle to biu and ciu clocks for the
* clocks: from common clock binding: handle to biu and ciu clocks for the
  bus interface unit clock and the card interface unit clock.
  bus interface unit clock and the card interface unit clock.


@@ -103,6 +106,8 @@ board specific portions as listed below.
		interrupts = <0 75 0>;
		interrupts = <0 75 0>;
		#address-cells = <1>;
		#address-cells = <1>;
		#size-cells = <0>;
		#size-cells = <0>;
		resets = <&rst 20>;
		reset-names = "reset";
	};
	};


[board specific internal DMA resources]
[board specific internal DMA resources]
+4 −4
Original line number Original line Diff line number Diff line
@@ -2347,7 +2347,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test,
	struct mmc_test_req *rq = mmc_test_req_alloc();
	struct mmc_test_req *rq = mmc_test_req_alloc();
	struct mmc_host *host = test->card->host;
	struct mmc_host *host = test->card->host;
	struct mmc_test_area *t = &test->area;
	struct mmc_test_area *t = &test->area;
	struct mmc_async_req areq;
	struct mmc_test_async_req test_areq = { .test = test };
	struct mmc_request *mrq;
	struct mmc_request *mrq;
	unsigned long timeout;
	unsigned long timeout;
	bool expired = false;
	bool expired = false;
@@ -2363,8 +2363,8 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test,
		mrq->sbc = &rq->sbc;
		mrq->sbc = &rq->sbc;
	mrq->cap_cmd_during_tfr = true;
	mrq->cap_cmd_during_tfr = true;


	areq.mrq = mrq;
	test_areq.areq.mrq = mrq;
	areq.err_check = mmc_test_check_result_async;
	test_areq.areq.err_check = mmc_test_check_result_async;


	mmc_test_prepare_mrq(test, mrq, t->sg, t->sg_len, dev_addr, t->blocks,
	mmc_test_prepare_mrq(test, mrq, t->sg, t->sg_len, dev_addr, t->blocks,
			     512, write);
			     512, write);
@@ -2378,7 +2378,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test,


	/* Start ongoing data request */
	/* Start ongoing data request */
	if (use_areq) {
	if (use_areq) {
		mmc_start_req(host, &areq, &ret);
		mmc_start_req(host, &test_areq.areq, &ret);
		if (ret)
		if (ret)
			goto out_free;
			goto out_free;
	} else {
	} else {
+3 −0
Original line number Original line Diff line number Diff line
@@ -26,6 +26,8 @@
#include "mmc_ops.h"
#include "mmc_ops.h"
#include "sd_ops.h"
#include "sd_ops.h"


#define DEFAULT_CMD6_TIMEOUT_MS	500

static const unsigned int tran_exp[] = {
static const unsigned int tran_exp[] = {
	10000,		100000,		1000000,	10000000,
	10000,		100000,		1000000,	10000000,
	0,		0,		0,		0
	0,		0,		0,		0
@@ -571,6 +573,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
		card->erased_byte = 0x0;
		card->erased_byte = 0x0;


	/* eMMC v4.5 or later */
	/* eMMC v4.5 or later */
	card->ext_csd.generic_cmd6_time = DEFAULT_CMD6_TIMEOUT_MS;
	if (card->ext_csd.rev >= 6) {
	if (card->ext_csd.rev >= 6) {
		card->ext_csd.feature_support |= MMC_DISCARD_FEATURE;
		card->ext_csd.feature_support |= MMC_DISCARD_FEATURE;


+1 −1
Original line number Original line Diff line number Diff line
@@ -2940,7 +2940,7 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
		return ERR_PTR(-ENOMEM);
		return ERR_PTR(-ENOMEM);


	/* find reset controller when exist */
	/* find reset controller when exist */
	pdata->rstc = devm_reset_control_get_optional(dev, NULL);
	pdata->rstc = devm_reset_control_get_optional(dev, "reset");
	if (IS_ERR(pdata->rstc)) {
	if (IS_ERR(pdata->rstc)) {
		if (PTR_ERR(pdata->rstc) == -EPROBE_DEFER)
		if (PTR_ERR(pdata->rstc) == -EPROBE_DEFER)
			return ERR_PTR(-EPROBE_DEFER);
			return ERR_PTR(-EPROBE_DEFER);
+2 −2
Original line number Original line Diff line number Diff line
@@ -661,13 +661,13 @@ static int mxs_mmc_probe(struct platform_device *pdev)


	platform_set_drvdata(pdev, mmc);
	platform_set_drvdata(pdev, mmc);


	spin_lock_init(&host->lock);

	ret = devm_request_irq(&pdev->dev, irq_err, mxs_mmc_irq_handler, 0,
	ret = devm_request_irq(&pdev->dev, irq_err, mxs_mmc_irq_handler, 0,
			       dev_name(&pdev->dev), host);
			       dev_name(&pdev->dev), host);
	if (ret)
	if (ret)
		goto out_free_dma;
		goto out_free_dma;


	spin_lock_init(&host->lock);

	ret = mmc_add_host(mmc);
	ret = mmc_add_host(mmc);
	if (ret)
	if (ret)
		goto out_free_dma;
		goto out_free_dma;
Loading