From: Thomas Kunze <thommycheck@gmx.de>
To: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
thommycheck@gmx.de, david-b@packbell.net
Subject: mmc_test with mmc_spi
Date: Thu, 24 Jul 2008 15:23:38 +0200 [thread overview]
Message-ID: <4888825A.1080503@gmx.de> (raw)
Hi Pierre,
I wrote a small hack to be able to use the mmc_test driver on mmc-spi host. You or somebody else might find it useful.
All test but "Correct xfer_size at write (start failure)", "Correct xfer_size at read (start failure)" and "Correct xfer_size
at write (midway failure)" passed.
I'm not sure what these tests try to do and how they do it, so I don't know if my modifcations of mmc_test, my spi driver or the
mmc-spi driver are responsible.
It would be great if you could provide some insight.
Regards,
Thomas
--
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index d6b9b48..2366150 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -44,7 +44,7 @@ static int mmc_test_set_blksize(struct mmc_test_card *test, unsigned size)
cmd.opcode = MMC_SET_BLOCKLEN;
cmd.arg = size;
- cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
+ cmd.flags = MMC_RSP_SPI_R1;
ret = mmc_wait_for_cmd(test->card->host, &cmd, 0);
if (ret)
return ret;
@@ -70,14 +70,14 @@ static void mmc_test_prepare_mrq(struct mmc_test_card *test,
}
mrq->cmd->arg = dev_addr;
- mrq->cmd->flags = MMC_RSP_R1 | MMC_CMD_ADTC;
+ mrq->cmd->flags = MMC_RSP_SPI_R1;
if (blocks == 1)
mrq->stop = NULL;
else {
mrq->stop->opcode = MMC_STOP_TRANSMISSION;
mrq->stop->arg = 0;
- mrq->stop->flags = MMC_RSP_R1B | MMC_CMD_AC;
+ mrq->stop->flags = MMC_RSP_SPI_R1;
}
mrq->data->blksz = blksz;
@@ -103,7 +103,7 @@ static int mmc_test_wait_busy(struct mmc_test_card *test)
cmd.opcode = MMC_SEND_STATUS;
cmd.arg = test->card->rca << 16;
- cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
+ cmd.flags = MMC_RSP_SPI_R2;
ret = mmc_wait_for_cmd(test->card->host, &cmd, 0);
if (ret)
@@ -155,10 +155,10 @@ static int mmc_test_buffer_transfer(struct mmc_test_card *test,
if (data.error)
return data.error;
- ret = mmc_test_wait_busy(test);
+/* ret = mmc_test_wait_busy(test);
if (ret)
return ret;
-
+*/
return 0;
}
@@ -240,7 +240,7 @@ static void mmc_test_prepare_broken_mrq(struct mmc_test_card *test,
MMC_WRITE_BLOCK : MMC_READ_SINGLE_BLOCK;
mrq->stop = NULL;
} else {
- mrq->cmd->opcode = MMC_SEND_STATUS;
+ mrq->cmd->opcode = MMC_SEND_CID;
mrq->cmd->arg = test->card->rca << 16;
}
}
@@ -333,7 +333,7 @@ static int mmc_test_simple_transfer(struct mmc_test_card *test,
mmc_wait_for_req(test->card->host, &mrq);
- mmc_test_wait_busy(test);
+ //mmc_test_wait_busy(test);
return mmc_test_check_result(test, &mrq);
}
@@ -367,7 +367,7 @@ static int mmc_test_broken_transfer(struct mmc_test_card *test,
mmc_wait_for_req(test->card->host, &mrq);
- mmc_test_wait_busy(test);
+ //mmc_test_wait_busy(test);
return mmc_test_check_broken_result(test, &mrq);
}
next reply other threads:[~2008-07-24 13:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 13:23 Thomas Kunze [this message]
2008-07-26 23:34 ` mmc_test with mmc_spi Pierre Ossman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4888825A.1080503@gmx.de \
--to=thommycheck@gmx.de \
--cc=david-b@packbell.net \
--cc=drzeus-list@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox