From: Lars-Peter Clausen <lars@metafoo.de>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "'Andrew Morton'" <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
"'Alessandro Zummo'" <a.zummo@towertech.it>,
rtc-linux@googlegroups.com,
"'Thierry Reding'" <thierry.reding@gmail.com>
Subject: Re: [PATCH 3/4] rtc: rtc-jz4740: Use devm_ioremap_resource()
Date: Fri, 07 Feb 2014 09:49:22 +0100 [thread overview]
Message-ID: <52F49E12.4090102@metafoo.de> (raw)
In-Reply-To: <001801cf23de$f1b708d0$d5251a70$%han@samsung.com>
On 02/07/2014 09:31 AM, Jingoo Han wrote:
> On Friday, February 07, 2014 5:13 PM, Lars-Peter Clausen wrote:
>> On 02/07/2014 08:58 AM, Jingoo Han wrote:
>> [...]
>>> - rtc->base = devm_ioremap_nocache(&pdev->dev, rtc->mem->start,
>>> - resource_size(rtc->mem));
>>> - if (!rtc->base) {
>>> - dev_err(&pdev->dev, "Failed to ioremap mmio memory\n");
>>> - return -EBUSY;
>>> - }
>>> + mem->flags &= ~IORESOURCE_CACHEABLE;
>>
>> You shouldn't be modifying the resource, strictly speaking it is not owned
>> by the device. And IORESOURCE_CACHEABLE is never set for this device anyway.
>
> (+cc Thierry Reding)
>
> Hi Lars-Peter Clausen,
>
> Do you mean that resource's flags should NOT be modified by the
> device driver, right?
> Then, without 'mem->flags &= ~IORESOURCE_CACHEABLE', is it possible
> that devm_ioremap_nocache() can be called at devm_ioremap_resource()?
>
Yes. ioremap_nocache() will be called, when the flag is not set,
ioremap_cached() will be called when the flag is set. If the flag is set the
intention is probably that the region should be mapped cached.
> Thierry,
> Do you have any comments on this?
>
> Thank you.
>
> Best regards,
> Jingoo Han
>
>>
>>> + rtc->base = devm_ioremap_resource(&pdev->dev, mem);
>>> + if (IS_ERR(rtc->base))
>>> + return PTR_ERR(rtc->base);
>>>
>>> spin_lock_init(&rtc->lock);
>>>
>>>
>
next prev parent reply other threads:[~2014-02-07 8:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 7:54 [PATCH 0/4] rtc: Use devm_ioremap_resource() Jingoo Han
2014-02-07 7:55 ` [PATCH 1/4] rtc: rtc-coh901331: " Jingoo Han
2014-02-10 9:26 ` [rtc-linux] " Linus Walleij
2014-02-07 7:57 ` [PATCH 2/4] rtc: rtc-davinci: " Jingoo Han
2014-02-07 7:58 ` [PATCH 3/4] rtc: rtc-jz4740: " Jingoo Han
2014-02-07 8:13 ` Lars-Peter Clausen
2014-02-07 8:31 ` Jingoo Han
2014-02-07 8:49 ` Lars-Peter Clausen [this message]
2014-02-07 7:59 ` [PATCH 4/4] rtc: rtc-vt8500: " Jingoo Han
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=52F49E12.4090102@metafoo.de \
--to=lars@metafoo.de \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=jg1.han@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=thierry.reding@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.