* [PATCH] pwm,renesas-tpu: Add dependency on HAS_IOMEM
@ 2014-01-31 12:45 Richard Weinberger
2014-02-26 11:59 ` Richard Weinberger
2014-02-26 12:08 ` Thierry Reding
0 siblings, 2 replies; 5+ messages in thread
From: Richard Weinberger @ 2014-01-31 12:45 UTC (permalink / raw)
To: thierry.reding; +Cc: linux-pwm, linux-kernel, Richard Weinberger
On archs like S390 or um this driver cannot build nor work.
Make it depend on HAS_IOMEM to bypass build failures.
drivers/built-in.o: In function `tpu_probe':
drivers/pwm/pwm-renesas-tpu.c:421: undefined reference to `devm_ioremap_resource'
Signed-off-by: Richard Weinberger <richard@nod.at>
---
drivers/pwm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 22f2f28..0b7a3c9 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -160,6 +160,7 @@ config PWM_PXA
config PWM_RENESAS_TPU
tristate "Renesas TPU PWM support"
depends on ARCH_SHMOBILE || COMPILE_TEST
+ depends on HAS_IOMEM
help
This driver exposes the Timer Pulse Unit (TPU) PWM controller found
in Renesas chips through the PWM API.
--
1.8.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] pwm,renesas-tpu: Add dependency on HAS_IOMEM
2014-01-31 12:45 [PATCH] pwm,renesas-tpu: Add dependency on HAS_IOMEM Richard Weinberger
@ 2014-02-26 11:59 ` Richard Weinberger
2014-02-26 12:08 ` Thierry Reding
1 sibling, 0 replies; 5+ messages in thread
From: Richard Weinberger @ 2014-02-26 11:59 UTC (permalink / raw)
To: thierry.reding; +Cc: linux-pwm, linux-kernel, Richard Weinberger
Am 31.01.2014 13:45, schrieb Richard Weinberger:
> On archs like S390 or um this driver cannot build nor work.
> Make it depend on HAS_IOMEM to bypass build failures.
>
> drivers/built-in.o: In function `tpu_probe':
> drivers/pwm/pwm-renesas-tpu.c:421: undefined reference to `devm_ioremap_resource'
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
Ping?
Thanks,
//richard
> ---
> drivers/pwm/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index 22f2f28..0b7a3c9 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -160,6 +160,7 @@ config PWM_PXA
> config PWM_RENESAS_TPU
> tristate "Renesas TPU PWM support"
> depends on ARCH_SHMOBILE || COMPILE_TEST
> + depends on HAS_IOMEM
> help
> This driver exposes the Timer Pulse Unit (TPU) PWM controller found
> in Renesas chips through the PWM API.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pwm,renesas-tpu: Add dependency on HAS_IOMEM
2014-01-31 12:45 [PATCH] pwm,renesas-tpu: Add dependency on HAS_IOMEM Richard Weinberger
2014-02-26 11:59 ` Richard Weinberger
@ 2014-02-26 12:08 ` Thierry Reding
2014-02-26 14:06 ` Richard Weinberger
1 sibling, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2014-02-26 12:08 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-pwm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 720 bytes --]
On Fri, Jan 31, 2014 at 01:45:18PM +0100, Richard Weinberger wrote:
> On archs like S390 or um this driver cannot build nor work.
> Make it depend on HAS_IOMEM to bypass build failures.
>
> drivers/built-in.o: In function `tpu_probe':
> drivers/pwm/pwm-renesas-tpu.c:421: undefined reference to `devm_ioremap_resource'
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> drivers/pwm/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
In the long run I think it might be better to add a dummy implementation
for devm_ioremap_resource() in order to make it build properly even for
architectures where it isn't implemented.
For now this looks like the best option. Applied, thanks.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pwm,renesas-tpu: Add dependency on HAS_IOMEM
2014-02-26 12:08 ` Thierry Reding
@ 2014-02-26 14:06 ` Richard Weinberger
2014-02-26 14:12 ` Thierry Reding
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2014-02-26 14:06 UTC (permalink / raw)
To: Thierry Reding; +Cc: linux-pwm, linux-kernel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 26.02.2014 13:08, schrieb Thierry Reding:
> On Fri, Jan 31, 2014 at 01:45:18PM +0100, Richard Weinberger wrote:
>> On archs like S390 or um this driver cannot build nor work. Make it depend on HAS_IOMEM to bypass build failures.
>>
>> drivers/built-in.o: In function `tpu_probe': drivers/pwm/pwm-renesas-tpu.c:421: undefined reference to `devm_ioremap_resource'
>>
>> Signed-off-by: Richard Weinberger <richard@nod.at> --- drivers/pwm/Kconfig | 1 + 1 file changed, 1 insertion(+)
>
> In the long run I think it might be better to add a dummy implementation for devm_ioremap_resource() in order to make it build properly even for architectures where it isn't
> implemented.
And what should devm_ioremap_resource() or in general ioremap() do on archs without
iomem?
BUG()? Returning a random error and hoping that the driver handles it correctly? :)
IMHO such a dummy implementation does not make much sense.
> For now this looks like the best option. Applied, thanks.
Thanks!
//richard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJTDfTnAAoJEPmeIjfg4Uaa0hsP/1lgoKuMLbfXEw8Z064st3lk
pOQoQQYiyk9nW5Uj/yjFAq9hly+jtL6YdY9+i2q9aQAaIOqTj0I0VbmMy+1nFrdF
x7ahD1Z4BAI0PSTj3P8LaYs6Jn+zaok2Zo7B6BlJIvLlNZqqvgQHcCVWHK5srdHu
sjd6JwpvBykWSmNUMBG2oAkWCTKLjisXTIL1OsIbcyTgBSS7/17dHfaFqhgZJBTI
L3aHRQYOTEdXJyCRZq4SUwNSBXUdP2AmaDJZ4HQ17nuXUTOTnAMgpVUgidgLasmF
GAmSDunoi/i7Pu6Vu+562cZhmuzO+uYFo87hDivjn7tTPIJ0OMh4pHeWWaMWVye/
o9GYI1Ew86Lbekd5Xxhf32hNnhz5RxZlNrnjdO1y2GNW5bt7A5ukF4jY0QEuHC+q
tgLsS45NIECkqA2hk7nvgRdds1ZaqueuY1dw8mb2jIbuAuR3XXSfjVzdfQiXKxzA
tXugXynMSP93mHEeOwzc1pRnFl6j1KgbNOMX9MuYwc5corUShab/Z1d+RVWNat7c
iTn6b/GxWpPeMQv3qXvIe77R2UnFv50M2KW4RXs2MRZdXCbIR2FLojGl0fTp1lNo
7mTnB/8SnJBbHz5+1tQv2exFfmalNhM78RighfONJcTnmXfvmA20aNo9Kn3IEU0t
m2V40kQySnkcb7+gRXrR
=34dU
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pwm,renesas-tpu: Add dependency on HAS_IOMEM
2014-02-26 14:06 ` Richard Weinberger
@ 2014-02-26 14:12 ` Thierry Reding
0 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2014-02-26 14:12 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-pwm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]
On Wed, Feb 26, 2014 at 03:06:31PM +0100, Richard Weinberger wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 26.02.2014 13:08, schrieb Thierry Reding:
> > On Fri, Jan 31, 2014 at 01:45:18PM +0100, Richard Weinberger wrote:
> >> On archs like S390 or um this driver cannot build nor work. Make it depend on HAS_IOMEM to bypass build failures.
> >>
> >> drivers/built-in.o: In function `tpu_probe': drivers/pwm/pwm-renesas-tpu.c:421: undefined reference to `devm_ioremap_resource'
> >>
> >> Signed-off-by: Richard Weinberger <richard@nod.at> --- drivers/pwm/Kconfig | 1 + 1 file changed, 1 insertion(+)
> >
> > In the long run I think it might be better to add a dummy implementation for devm_ioremap_resource() in order to make it build properly even for architectures where it isn't
> > implemented.
>
> And what should devm_ioremap_resource() or in general ioremap() do on archs without
> iomem?
> BUG()? Returning a random error and hoping that the driver handles it correctly? :)
>
> IMHO such a dummy implementation does not make much sense.
Well, it could still be useful for drivers that want to support
COMPILE_TEST. If we just make it return any error drivers should simply
refuse to probe just like if the error was genuine.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-26 14:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-31 12:45 [PATCH] pwm,renesas-tpu: Add dependency on HAS_IOMEM Richard Weinberger
2014-02-26 11:59 ` Richard Weinberger
2014-02-26 12:08 ` Thierry Reding
2014-02-26 14:06 ` Richard Weinberger
2014-02-26 14:12 ` Thierry Reding
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).