public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Richard Röjfors" <richard.rojfors@pelagicore.com>
To: Anton Vorontsov <avorontsov@mvista.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Vrabel <david.vrabel@csr.com>,
	Pierre Ossman <pierre@ossman.eu>, Ben Dooks <ben@simtec.co.uk>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size
Date: Mon, 03 May 2010 08:01:00 +0200	[thread overview]
Message-ID: <4BDE669C.6030901@pelagicore.com> (raw)
In-Reply-To: <20100423182552.GA4076@oksana.dev.rtsoft.ru>

On 04/23/2010 08:25 PM, Anton Vorontsov wrote:
> On Wed, Mar 17, 2010 at 07:02:52AM +0100, Richard Röjfors wrote:
>> On 3/16/10 7:34 PM, Anton Vorontsov wrote:
>>> Some hosts have an extended SDHCI iomem size, so the driver should
>>> only print errors if the iomem size is less than 0x100.
>>
>> With this change you allow a bigger resource than we really need.
>> I think you should also change request_mem_region and ioremap to only
>> request and map the actual needed size. (0x100)
>
> Sorry for the delayed response.
>
> Why do you think that mapping more than "needed" is a bad thing?
> Looking into the PCI driver, it just maps the whole PCI BAR (which
> makes sense, since later SDHCI spec might easily introduce an
> extended address space, so hardcoding 0x100 isn't very good).
>
> There is another case when mapping the whole SDHCI mem space
> might be convenient: if the platform code will want to use
> the ioremapped region inside the platform hooks.

That's a good reason.

Acked-by: Richard Röjfors <richard.rojfors@pelagicore.com>

>
> Thanks!
>
>>> Signed-off-by: Anton Vorontsov<avorontsov@ru.mvista.com>
>>> ---
>>>   drivers/mmc/host/sdhci-pltfm.c |    2 +-
>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
>>> index 217b911..b6ee0d7 100644
>>> --- a/drivers/mmc/host/sdhci-pltfm.c
>>> +++ b/drivers/mmc/host/sdhci-pltfm.c
>>> @@ -61,7 +61,7 @@ static int __devinit sdhci_pltfm_probe(struct platform_device *pdev)
>>>   		goto err;
>>>   	}
>>>
>>> -	if (resource_size(iomem) != 0x100)
>>> +	if (resource_size(iomem)<  0x100)
>>>   		dev_err(&pdev->dev, "Invalid iomem size. You may "
>>>   			"experience problems.\n");
>>>
>>
>

  reply	other threads:[~2010-05-03  6:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 18:34 [PATCH resend 0/3] sdhci-pltfm: Few additions and enhancements Anton Vorontsov
2010-03-16 18:34 ` [PATCH 1/3] sdhci: Implement CAP_CLOCK_BASE_BROKEN quirk Anton Vorontsov
2010-03-16 18:34 ` [PATCH 2/3] sdhci-pltfm: Implement platform data passing Anton Vorontsov
2010-03-17  6:14   ` Richard Röjfors
2010-04-23 18:26     ` [PATCH] sdhci-pltfm: Add kernel-doc for struct sdhci_pltfm_data Anton Vorontsov
2010-03-16 18:34 ` [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size Anton Vorontsov
2010-03-17  6:02   ` Richard Röjfors
2010-03-22 19:30     ` Andrew Morton
2010-04-23 18:25     ` Anton Vorontsov
2010-05-03  6:01       ` Richard Röjfors [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-02-19 19:48 Anton Vorontsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BDE669C.6030901@pelagicore.com \
    --to=richard.rojfors@pelagicore.com \
    --cc=akpm@linux-foundation.org \
    --cc=avorontsov@mvista.com \
    --cc=ben@simtec.co.uk \
    --cc=david.vrabel@csr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=pierre@ossman.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox