aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2005-09-03 11:45:02 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-09-03 11:45:02 -0400
commit865e9f13c94891daed4f6a5f69c5d6ec04d4932f (patch)
treeea969a896c3b5be5dca761605275e0895efc3976 /drivers/mmc
parentf505380ba7b98ec97bf25300c2a58aeae903530b (diff)
[MMC] ios for mmc chip select
Adds a new ios for setting the chip select pin on MMC cards. Needed on SD controllers which use this pin for other things and therefore cannot have it pulled high at all times. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 3c5904834fe8..0a8165974ba7 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -457,6 +457,11 @@ static void mmc_idle_cards(struct mmc_host *host)
457{ 457{
458 struct mmc_command cmd; 458 struct mmc_command cmd;
459 459
460 host->ios.chip_select = MMC_CS_HIGH;
461 host->ops->set_ios(host, &host->ios);
462
463 mmc_delay(1);
464
460 cmd.opcode = MMC_GO_IDLE_STATE; 465 cmd.opcode = MMC_GO_IDLE_STATE;
461 cmd.arg = 0; 466 cmd.arg = 0;
462 cmd.flags = MMC_RSP_NONE; 467 cmd.flags = MMC_RSP_NONE;
@@ -464,6 +469,11 @@ static void mmc_idle_cards(struct mmc_host *host)
464 mmc_wait_for_cmd(host, &cmd, 0); 469 mmc_wait_for_cmd(host, &cmd, 0);
465 470
466 mmc_delay(1); 471 mmc_delay(1);
472
473 host->ios.chip_select = MMC_CS_DONTCARE;
474 host->ops->set_ios(host, &host->ios);
475
476 mmc_delay(1);
467} 477}
468 478
469/* 479/*
@@ -475,6 +485,7 @@ static void mmc_power_up(struct mmc_host *host)
475 485
476 host->ios.vdd = bit; 486 host->ios.vdd = bit;
477 host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; 487 host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN;
488 host->ios.chip_select = MMC_CS_DONTCARE;
478 host->ios.power_mode = MMC_POWER_UP; 489 host->ios.power_mode = MMC_POWER_UP;
479 host->ops->set_ios(host, &host->ios); 490 host->ops->set_ios(host, &host->ios);
480 491
@@ -492,6 +503,7 @@ static void mmc_power_off(struct mmc_host *host)
492 host->ios.clock = 0; 503 host->ios.clock = 0;
493 host->ios.vdd = 0; 504 host->ios.vdd = 0;
494 host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; 505 host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN;
506 host->ios.chip_select = MMC_CS_DONTCARE;
495 host->ios.power_mode = MMC_POWER_OFF; 507 host->ios.power_mode = MMC_POWER_OFF;
496 host->ops->set_ios(host, &host->ios); 508 host->ops->set_ios(host, &host->ios);
497} 509}