Skip to content

Commit

Permalink
mmc: sdhci: sdhci-pci-o2micro: Check if controller supports 8-bit width
Browse files Browse the repository at this point in the history
The O2 controller supports 8-bit EMMC access.

JESD84-B51 section A.6.3.a defines the bus testing procedure that
`mmc_select_bus_width()` implements. This is used to determine the actual
bus width of the eMMC.

Signed-off-by: Raul E Rangel <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
Raul E Rangel authored and storulf committed Jun 18, 2019
1 parent 99a9344 commit de23f0b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion drivers/mmc/host/sdhci-pci-o2micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,21 @@ int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot)
{
struct sdhci_pci_chip *chip;
struct sdhci_host *host;
u32 reg;
u32 reg, caps;
int ret;

chip = slot->chip;
host = slot->host;

caps = sdhci_readl(host, SDHCI_CAPABILITIES);

/*
* mmc_select_bus_width() will test the bus to determine the actual bus
* width.
*/
if (caps & SDHCI_CAN_DO_8BIT)
host->mmc->caps |= MMC_CAP_8_BIT_DATA;

switch (chip->pdev->device) {
case PCI_DEVICE_ID_O2_SDS0:
case PCI_DEVICE_ID_O2_SEABIRD0:
Expand Down

0 comments on commit de23f0b

Please sign in to comment.