From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755027Ab0ECGBK (ORCPT ); Mon, 3 May 2010 02:01:10 -0400 Received: from smtprelay-h22.telenor.se ([195.54.99.197]:53000 "EHLO smtprelay-h22.telenor.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754549Ab0ECGBG (ORCPT ); Mon, 3 May 2010 02:01:06 -0400 X-SENDER-IP: [85.228.117.137] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMYALYD3ktV5HWJPGdsb2JhbAAHgxCEUpVCAQEBATWpVo9lgSaCfm4E X-IronPort-AV: E=Sophos;i="4.52,317,1270418400"; d="scan'208";a="514048548" Message-ID: <4BDE669C.6030901@pelagicore.com> Date: Mon, 03 May 2010 08:01:00 +0200 From: =?UTF-8?B?UmljaGFyZCBSw7ZqZm9ycw==?= Organization: Pelagicore AB User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100411 Iceowl/1.0b1 Icedove/3.0.4 MIME-Version: 1.0 To: Anton Vorontsov CC: Andrew Morton , David Vrabel , Pierre Ossman , Ben Dooks , 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 References: <20100316183400.GA24191@oksana.dev.rtsoft.ru> <20100316183430.GC25670@oksana.dev.rtsoft.ru> <4BA0708C.8070402@pelagicore.com> <20100423182552.GA4076@oksana.dev.rtsoft.ru> In-Reply-To: <20100423182552.GA4076@oksana.dev.rtsoft.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Thanks! > >>> Signed-off-by: Anton Vorontsov >>> --- >>> 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"); >>> >> >