Re: [PATCH v3] mmc: implement Driver Stage Register handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Wed, Aug 13, 2014 at 05:44:16PM +0200, Uwe Kleine-König wrote:
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index f51b5ba3bbea..37ed493d8030 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -93,6 +93,27 @@ int mmc_deselect_cards(struct mmc_host *host)
>  	return _mmc_select_card(host, NULL);
>  }
>  
> +/*
> + * Write the value specified in the device tree or board code into the optional
> + * 16 bit Driver Stage Register. This can be used to tune raise/fall times and
> + * drive strength of the DAT and CMD outputs. The actual meaning of a given
> + * value is hardware dependant.
> + * The presence of the DSR register can be determined from the CSD register,
> + * bit 76.
> + */
> +int mmc_set_dsr(struct mmc_host *host)
> +{
> +	int err;
The line declaring err can and should be dropped. I found that during my
tests, but failed to change this in the patch before sending it out.

If you consider applying my patch, please fix this up. If not I will
take this as an opportunity to remind you in a few days with a v4 :-)

Uwe

> +	struct mmc_command cmd = {0};
> +
> +	cmd.opcode = MMC_SET_DSR;
> +
> +	cmd.arg = ((u32)host->dsr << 16) | 0xffff;
> +	cmd.flags = MMC_RSP_NONE | MMC_CMD_AC;
> +
> +	return mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
> +}
> +

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux