Re: [PATCH v2 2/4] mmc: core: group default initial state

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

 



Hi Ulf,

2014-11-06 10:38 GMT+01:00 Ulf Hansson <ulf.hansson@xxxxxxxxxx>:
> [...]
>
>>>
>>> Earlier we used always used MMC_BUSMODE_PUSHPULL, now it will depend on "spi".
>>
>> The JEDEC spec says that in device identification mode the bus should
>> be open-drain and not push-pull. So this way should be compliant to
>> the spec, right? Unfortunately, I will require help in testing this on
>> a proper eMMC.
>
> For MMC yes, but you will break SD/SDIO in this patch.
>
> The default bus mode at initialization needs to be
> MMC_BUSMODE_PUSHPULL, since that's required by the SD/SDIO spec.
>
> The MMC cards are being initialized after SD and SDIO, which means a
> switch to MMC_BUSMODE_OPENDRAIN is done in mmc_attach_mmc().
> Additionally, to handle resume of MMC cards, mmc_init_card() also do a
> switch to MMC_BUSMODE_OPENDRAIN.
>
>>
>> I can't find anything in the JEDEC or the SD spec about bus mode in
>> SPI mode though. However, this behavior is not changed by this patch,
>> so we should be safe.
>
> SPI mode has been removed from the eMMC spec.
>
> The SD spec doesn't have open drain mode but do support SPI mode. That
> tells me that we should keep using MMC_BUSMODE_PUSHPULL for SPI mode.

Thank you for explaining this. So I think we should be OK by always
choosing MMC_BUSMODE_PUSHPULL, because for MMC cards mmc_init_card is
called from mmc_power_restore which is called after the hw_reset. Will
post a v3 of this patch.

//Johan
--
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