[PATCH] mmc: xenon_sdhci: Add missing common host capabilities

Stefan Roese sr at denx.de
Fri Sep 11 08:43:51 CEST 2020


Hi Pali, Andre and others,

On 10.09.20 21:04, Pali Rohár wrote:
> On Thursday 10 September 2020 19:53:40 Andre Heider wrote:
>> Use mmc_of_parse() to set the common host properties. That includes
>> "bus-width", so parsing it can be removed from the driver.
>>
>> But more importantly, "non-removable" is now respected, which fixes
>> the usage of eMMC.
>>
>> Signed-off-by: Andre Heider <a.heider at gmail.com>
>> ---
> 
> Adding Marek to loop, can you test this patch on MOX A to verify that it
> does not break MOX uSD and SDIO support?
> 
> (PS: Andre, for one week I would not be available, therefore in this
> time I would not be able to test or review Armada 3720 patches...)

I'll also be on vacation next week. Sorry, I was not able to follow all
discussions on these Armada related patches lately. Could someone please
summarize, which patches (fixes) are "okay" for merging in this rc stage
(rc4)? That would really be helpful.

Thanks,
Stefan

>>
>> Tested myself on v5 without emmc, `mmc info` is unchanged for my sd card
>>
>> Tested by Gérald on v7 emmc, which started working with this patch:
>> => mmc info
>> Device: sdhci at d8000
>> Manufacturer ID: 45
>> OEM: 100
>> Name: SEM04
>> Bus Speed: 52000000
>> Mode: MMC High Speed (52MHz)
>> Rd Block Len: 512
>> MMC version 4.5
>> High Capacity: Yes
>> Capacity: 3.7 GiB
>> Bus Width: 8-bit
>> Erase Group Size: 256 KiB
>> HC WP Group Size: 8 MiB
>> User Capacity: 3.7 GiB WRREL
>> Boot Capacity: 2 MiB
>> RPMB Capacity: 2 MiB
>> Boot area 0 is not write protected
>> Boot area 1 is not write protected
>>
>>   drivers/mmc/xenon_sdhci.c | 18 ++++--------------
>>   1 file changed, 4 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
>> index 7f9a579c83..6ce9d00d0a 100644
>> --- a/drivers/mmc/xenon_sdhci.c
>> +++ b/drivers/mmc/xenon_sdhci.c
>> @@ -485,20 +485,10 @@ static int xenon_sdhci_probe(struct udevice *dev)
>>   		armada_3700_soc_pad_voltage_set(host);
>>   
>>   	host->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_DDR_52MHz;
>> -	switch (fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "bus-width",
>> -		1)) {
>> -	case 8:
>> -		host->host_caps |= MMC_MODE_8BIT;
>> -		break;
>> -	case 4:
>> -		host->host_caps |= MMC_MODE_4BIT;
>> -		break;
>> -	case 1:
>> -		break;
>> -	default:
>> -		printf("Invalid \"bus-width\" value\n");
>> -		return -EINVAL;
>> -	}
>> +
>> +	ret = mmc_of_parse(dev, &plat->cfg);
>> +	if (ret)
>> +		return ret;
>>   
>>   	host->ops = &xenon_sdhci_ops;
>>   
>> -- 
>> 2.28.0
>>


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list