diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-16 15:11:07 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-16 15:17:52 -0700 | 
| commit | 8a0ca91e1db5de5eb5b18cfa919d52ff8be375af (patch) | |
| tree | bd3a1564940d27ae7f6229089db1283ff2a636c8 /drivers/mmc/host/mmc_spi.c | |
| parent | 9c1be0c4712fe760d8969427ef91107e9c062d91 (diff) | |
| parent | c43d8636971c39da993e94082fd65bfff421618e (diff) | |
| download | olio-linux-3.10-8a0ca91e1db5de5eb5b18cfa919d52ff8be375af.tar.xz olio-linux-3.10-8a0ca91e1db5de5eb5b18cfa919d52ff8be375af.zip  | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (68 commits)
  sdio_uart: Fix SDIO break control to now return success or an error
  mmc: host driver for Ricoh Bay1Controllers
  sdio: sdio_io.c Fix sparse warnings
  sdio: fix the use of hard coded timeout value.
  mmc: OLPC: update vdd/powerup quirk comment
  mmc: fix spares errors of sdhci.c
  mmc: remove multiwrite capability
  wbsd: fix bad dma_addr_t conversion
  atmel-mci: Driver for Atmel on-chip MMC controllers
  mmc: fix sdio_io sparse errors
  mmc: wbsd.c fix shadowing of 'dma' variable
  MMC: S3C24XX: Refuse incorrectly aligned transfers
  MMC: S3C24XX: Add maintainer entry
  MMC: S3C24XX: Update error debugging.
  MMC: S3C24XX: Add media presence test to request handling.
  MMC: S3C24XX: Fix use of msecs where jiffies are needed
  MMC: S3C24XX: Add MODULE_ALIAS() entries for the platform devices
  MMC: S3C24XX: Fix s3c2410_dma_request() return code check.
  MMC: S3C24XX: Allow card-detect on non-IRQ capable pin
  MMC: S3C24XX: Ensure host->mrq->data is valid
  ...
Manually fixed up bogus executable bits on drivers/mmc/core/sdio_io.c
and include/linux/mmc/sdio_func.h when merging.
Diffstat (limited to 'drivers/mmc/host/mmc_spi.c')
| -rw-r--r-- | drivers/mmc/host/mmc_spi.c | 33 | 
1 files changed, 24 insertions, 9 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index 35508584ac2..41cc63360e4 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c @@ -1126,16 +1126,28 @@ static int mmc_spi_get_ro(struct mmc_host *mmc)  	struct mmc_spi_host *host = mmc_priv(mmc);  	if (host->pdata && host->pdata->get_ro) -		return host->pdata->get_ro(mmc->parent); -	/* board doesn't support read only detection; assume writeable */ -	return 0; +		return !!host->pdata->get_ro(mmc->parent); +	/* +	 * Board doesn't support read only detection; let the mmc core +	 * decide what to do. +	 */ +	return -ENOSYS;  } +static int mmc_spi_get_cd(struct mmc_host *mmc) +{ +	struct mmc_spi_host *host = mmc_priv(mmc); + +	if (host->pdata && host->pdata->get_cd) +		return !!host->pdata->get_cd(mmc->parent); +	return -ENOSYS; +}  static const struct mmc_host_ops mmc_spi_ops = {  	.request	= mmc_spi_request,  	.set_ios	= mmc_spi_set_ios,  	.get_ro		= mmc_spi_get_ro, +	.get_cd		= mmc_spi_get_cd,  }; @@ -1240,10 +1252,7 @@ static int mmc_spi_probe(struct spi_device *spi)  	mmc->ops = &mmc_spi_ops;  	mmc->max_blk_size = MMC_SPI_BLOCKSIZE; -	/* As long as we keep track of the number of successfully -	 * transmitted blocks, we're good for multiwrite. -	 */ -	mmc->caps = MMC_CAP_SPI | MMC_CAP_MULTIWRITE; +	mmc->caps = MMC_CAP_SPI;  	/* SPI doesn't need the lowspeed device identification thing for  	 * MMC or SD cards, since it never comes up in open drain mode. @@ -1319,17 +1328,23 @@ static int mmc_spi_probe(struct spi_device *spi)  			goto fail_glue_init;  	} +	/* pass platform capabilities, if any */ +	if (host->pdata) +		mmc->caps |= host->pdata->caps; +  	status = mmc_add_host(mmc);  	if (status != 0)  		goto fail_add_host; -	dev_info(&spi->dev, "SD/MMC host %s%s%s%s\n", +	dev_info(&spi->dev, "SD/MMC host %s%s%s%s%s\n",  			mmc->class_dev.bus_id,  			host->dma_dev ? "" : ", no DMA",  			(host->pdata && host->pdata->get_ro)  				? "" : ", no WP",  			(host->pdata && host->pdata->setpower) -				? "" : ", no poweroff"); +				? "" : ", no poweroff", +			(mmc->caps & MMC_CAP_NEEDS_POLL) +				? ", cd polling" : "");  	return 0;  fail_add_host:  |