lkml.org 
[lkml]   [2011]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] sdhci: fix undue iomem warning
From
Hi Wolfram,

On 30 May 2011 20:58, Wolfram Sang <w.sang@pengutronix.de> wrote:
> Hi Daniel,
>
>> diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
>> index 936bbca..ae948b0 100644
>> --- a/drivers/mmc/host/sdhci-pci.c
>> +++ b/drivers/mmc/host/sdhci-pci.c
>> @@ -918,8 +918,9 @@ static struct sdhci_pci_slot * __devinit sdhci_pci_probe_slot(
>>               return ERR_PTR(-ENODEV);
>>       }
>>
>> -     if (pci_resource_len(pdev, bar) != 0x100) {
>> -             dev_err(&pdev->dev, "Invalid iomem size. You may "
>> +     int len = pci_resource_len(pdev, bar);
>> +     if (len != 0x100 && len != 0x200) {
>
> Hmmm,
>
> a) SDHC Specs (even v3) only mention 0x100, so this _is_ the standard.
>   Do the new cards (which ones?) have anything located in the extra
>   area?

This controller is a dual-slot one, so has two register sets (though
one set of pins aren't wired to a socket).

> b) your approach won't scale very well

True - a more scalable test would be to check for non-zero length and
a multiple of 256 bytes, would you say?

This would be in-tune with page 2 of:
http://www.sdcard.org/developers/tech/host_controller/simple_spec/Simplified_SD_Host_Controller_Spec.pdf

> so, I'd say it is better to keep the old way.
>
>> +             dev_warn(&pdev->dev, "Invalid iomem size. You may "
>>                       "experience problems.\n");
>
> I second turning the message into a warning, though.

If the latter method is preferred, I'll adjust the patch and resend.

Thanks,
Daniel
--
Daniel J Blueman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-05-30 15:29    [W:0.058 / U:1.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site