Re: [PATCH] sdhci: V2: Allow CAPS[1] to be set via QUIRK |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hi,
On Thu, Jun 28 2012, philipspatches@xxxxxxxxx wrote:
> From: Philip Rakity <prakity@xxxxxxxxxxx>
>
> currently only the capability_0 register can be set if
> SDHCI_QUIRK_MISSING_CAPS is defined. This is a problem when
> the capability_1 register also needs changing. Use the
> SDHCI_QUIRK_MISSING_CAPS to allow both registers to be set.
>
> Redefining caps[1] is useful when the board design does not
> support 1.8v vccq so UHS modes are not available. The code
> that calls sdhci_add_host can then detect this condition and
> adjust the caps so the UHS mode will not be attempted on UHS
> cards
>
> Signed-off-by: Philip Rakity <prakity@xxxxxxxxxxx>
> ---
> drivers/mmc/host/sdhci.c | 8 ++++++--
> include/linux/mmc/sdhci.h | 3 ++-
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index ef4231a..f46293d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2618,8 +2618,12 @@ int sdhci_add_host(struct sdhci_host *host)
> caps[0] = (host->quirks & SDHCI_QUIRK_MISSING_CAPS) ? host->caps :
> sdhci_readl(host, SDHCI_CAPABILITIES);
>
> - caps[1] = (host->version >= SDHCI_SPEC_300) ?
> - sdhci_readl(host, SDHCI_CAPABILITIES_1) : 0;
> + if (host->version >= SDHCI_SPEC_300)
> + caps[1] = (host->quirks & SDHCI_QUIRK_MISSING_CAPS) ?
> + host->caps1 :
> + sdhci_readl(host, SDHCI_CAPABILITIES_1);
> + else
> + caps[1] = 0;
What happened to using an initializer instead of the else for caps[1]?
Thanks,
- Chris.
--
Chris Ball <cjb@xxxxxxxxxx> <http://printf.net/>
One Laptop Per Child
--
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
[Linux USB Devel]
[Linux Media]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]