From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Vorontsov Subject: Re: [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size Date: Fri, 23 Apr 2010 22:25:52 +0400 Message-ID: <20100423182552.GA4076@oksana.dev.rtsoft.ru> References: <20100316183400.GA24191@oksana.dev.rtsoft.ru> <20100316183430.GC25670@oksana.dev.rtsoft.ru> <4BA0708C.8070402@pelagicore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from imap.ru.mvista.com ([213.79.90.228]:54379 "EHLO buildserver.ru.mvista.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752231Ab0DWSvS (ORCPT ); Fri, 23 Apr 2010 14:51:18 -0400 Content-Disposition: inline In-Reply-To: <4BA0708C.8070402@pelagicore.com> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Richard =?utf-8?Q?R=C3=B6jfors?= Cc: Andrew Morton , David Vrabel , Pierre Ossman , Ben Dooks , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org On Wed, Mar 17, 2010 at 07:02:52AM +0100, Richard R=C3=B6jfors 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. >=20 > 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. Thanks! > > Signed-off-by: Anton Vorontsov > > --- > > drivers/mmc/host/sdhci-pltfm.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > >=20 > > diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhc= i-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 pla= tform_device *pdev) > > goto err; > > } > > =20 > > - if (resource_size(iomem) !=3D 0x100) > > + if (resource_size(iomem) < 0x100) > > dev_err(&pdev->dev, "Invalid iomem size. You may " > > "experience problems.\n"); > > =20 >=20 --=20 Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2