* [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size
@ 2010-02-19 19:48 Anton Vorontsov
0 siblings, 0 replies; 6+ messages in thread
From: Anton Vorontsov @ 2010-02-19 19:48 UTC (permalink / raw)
To: Andrew Morton
Cc: Richard Röjfors, Pierre Ossman, Ben Dooks, linux-mmc,
linux-kernel
Some hosts have an extended SDHCI iomem size, so the driver should
only print errors if the iomem size is less than 0x100.
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 d0a52cb..3e65221 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");
--
1.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size
2010-03-16 18:34 [PATCH resend 0/3] sdhci-pltfm: Few additions and enhancements Anton Vorontsov
@ 2010-03-16 18:34 ` Anton Vorontsov
2010-03-17 6:02 ` Richard Röjfors
0 siblings, 1 reply; 6+ messages in thread
From: Anton Vorontsov @ 2010-03-16 18:34 UTC (permalink / raw)
To: Andrew Morton
Cc: David Vrabel, Richard Röjfors, Pierre Ossman, Ben Dooks,
linux-mmc, linux-kernel
Some hosts have an extended SDHCI iomem size, so the driver should
only print errors if the iomem size is less than 0x100.
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");
--
1.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size
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
0 siblings, 2 replies; 6+ messages in thread
From: Richard Röjfors @ 2010-03-17 6:02 UTC (permalink / raw)
To: Anton Vorontsov
Cc: Andrew Morton, David Vrabel, Pierre Ossman, Ben Dooks, linux-mmc,
linux-kernel
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)
>
> 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");
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size
2010-03-17 6:02 ` Richard Röjfors
@ 2010-03-22 19:30 ` Andrew Morton
2010-04-23 18:25 ` Anton Vorontsov
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2010-03-22 19:30 UTC (permalink / raw)
To: Richard Röjfors
Cc: Anton Vorontsov, David Vrabel, Pierre Ossman, Ben Dooks,
linux-mmc, linux-kernel
On Wed, 17 Mar 2010 07:02:52 +0100
Richard R__jfors <richard.rojfors@pelagicore.com> 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)
I merged these three with a note-to-self that some updates are expected
(hint).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size
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
1 sibling, 1 reply; 6+ messages in thread
From: Anton Vorontsov @ 2010-04-23 18:25 UTC (permalink / raw)
To: Richard Röjfors
Cc: Andrew Morton, David Vrabel, Pierre Ossman, Ben Dooks, linux-mmc,
linux-kernel
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.
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");
> >
>
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size
2010-04-23 18:25 ` Anton Vorontsov
@ 2010-05-03 6:01 ` Richard Röjfors
0 siblings, 0 replies; 6+ messages in thread
From: Richard Röjfors @ 2010-05-03 6:01 UTC (permalink / raw)
To: Anton Vorontsov
Cc: Andrew Morton, David Vrabel, Pierre Ossman, Ben Dooks, linux-mmc,
linux-kernel
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");
>>>
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-03 6:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-19 19:48 [PATCH 3/3] sdhci-pltfm: Do not print errors in case of an extended iomem size Anton Vorontsov
-- strict thread matches above, loose matches on Subject: below --
2010-03-16 18:34 [PATCH resend 0/3] sdhci-pltfm: Few additions and enhancements 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).