Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270273
b: refs/heads/master
c: 2311344
h: refs/heads/master
i:
  270271: bdb7c70
v: v3
  • Loading branch information
Adrian Hunter authored and Chris Ball committed Oct 26, 2011
1 parent 2c3f2a3 commit b742da6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f2016558e4f9a8d2f9b1202064915205f4dd450
refs/heads/master: 2311344c33cb8add492881900ca427b62f5a7eae
30 changes: 30 additions & 0 deletions trunk/drivers/mmc/card/mmc_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2328,6 +2328,31 @@ static int mmc_test_profile_sglen_r_nonblock_perf(struct mmc_test_card *test)
return mmc_test_rw_multiple_sg_len(test, &test_data);
}

/*
* eMMC hardware reset.
*/
static int mmc_test_hw_reset(struct mmc_test_card *test)
{
struct mmc_card *card = test->card;
struct mmc_host *host = card->host;
int err;

err = mmc_hw_reset_check(host);
if (!err)
return RESULT_OK;

if (err == -ENOSYS)
return RESULT_FAIL;

if (err != -EOPNOTSUPP)
return err;

if (!mmc_can_reset(card))
return RESULT_UNSUP_CARD;

return RESULT_UNSUP_HOST;
}

static const struct mmc_test_case mmc_test_cases[] = {
{
.name = "Basic write (no data verification)",
Expand Down Expand Up @@ -2650,6 +2675,11 @@ static const struct mmc_test_case mmc_test_cases[] = {
.run = mmc_test_profile_sglen_r_nonblock_perf,
.cleanup = mmc_test_area_cleanup,
},

{
.name = "eMMC hardware reset",
.run = mmc_test_hw_reset,
},
};

static DEFINE_MUTEX(mmc_test_lock);
Expand Down

0 comments on commit b742da6

Please sign in to comment.