* [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA
@ 2014-12-15 13:37 Geert Uytterhoeven
[not found] ` <1418650624-28174-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-12-15 13:37 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven
If NO_DMA=y:
drivers/built-in.o: In function `sh_mobile_i2c_dma_unmap':
i2c-sh_mobile.c:(.text+0x60de42): undefined reference to `dma_unmap_single'
drivers/built-in.o: In function `sh_mobile_i2c_xfer_dma':
i2c-sh_mobile.c:(.text+0x60df22): undefined reference to `dma_map_single'
i2c-sh_mobile.c:(.text+0x60df2e): undefined reference to `dma_mapping_error'
Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
---
drivers/i2c/busses/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index c1351d9fb35bbc8d..f08dd20f625c184d 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -753,6 +753,7 @@ config I2C_SH7760
config I2C_SH_MOBILE
tristate "SuperH Mobile I2C Controller"
+ depends on HAS_DMA
depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
help
If you say yes to this option, support will be included for the
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA
[not found] ` <1418650624-28174-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-12-17 6:58 ` Wolfram Sang
2014-12-17 8:04 ` Geert Uytterhoeven
2014-12-17 18:29 ` Wolfram Sang
1 sibling, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2014-12-17 6:58 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]
On Mon, Dec 15, 2014 at 02:37:04PM +0100, Geert Uytterhoeven wrote:
> If NO_DMA=y:
>
> drivers/built-in.o: In function `sh_mobile_i2c_dma_unmap':
> i2c-sh_mobile.c:(.text+0x60de42): undefined reference to `dma_unmap_single'
> drivers/built-in.o: In function `sh_mobile_i2c_xfer_dma':
> i2c-sh_mobile.c:(.text+0x60df22): undefined reference to `dma_map_single'
> i2c-sh_mobile.c:(.text+0x60df2e): undefined reference to `dma_mapping_error'
>
> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Thanks for spotting this. However, since DMA is opt-in, isn't this
dependency too much? I can't think of anything better than #ifdeffing
the code, though.
> ---
> drivers/i2c/busses/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index c1351d9fb35bbc8d..f08dd20f625c184d 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -753,6 +753,7 @@ config I2C_SH7760
>
> config I2C_SH_MOBILE
> tristate "SuperH Mobile I2C Controller"
> + depends on HAS_DMA
> depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
> help
> If you say yes to this option, support will be included for the
> --
> 1.9.1
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA
2014-12-17 6:58 ` Wolfram Sang
@ 2014-12-17 8:04 ` Geert Uytterhoeven
2014-12-17 8:39 ` Wolfram Sang
0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 8:04 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux I2C, Linux-sh list, linux-kernel@vger.kernel.org
Hi Wolfram,
On Wed, Dec 17, 2014 at 7:58 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Mon, Dec 15, 2014 at 02:37:04PM +0100, Geert Uytterhoeven wrote:
>> If NO_DMA=y:
>>
>> drivers/built-in.o: In function `sh_mobile_i2c_dma_unmap':
>> i2c-sh_mobile.c:(.text+0x60de42): undefined reference to `dma_unmap_single'
>> drivers/built-in.o: In function `sh_mobile_i2c_xfer_dma':
>> i2c-sh_mobile.c:(.text+0x60df22): undefined reference to `dma_map_single'
>> i2c-sh_mobile.c:(.text+0x60df2e): undefined reference to `dma_mapping_error'
>>
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>
> Thanks for spotting this. However, since DMA is opt-in, isn't this
> dependency too much? I can't think of anything better than #ifdeffing
> the code, though.
You're right.
E.g. drivers/spi/spi.c (in SPI the mapping is handled by the core), this
code is #ifdefed out.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA
2014-12-17 8:04 ` Geert Uytterhoeven
@ 2014-12-17 8:39 ` Wolfram Sang
2014-12-17 8:47 ` Geert Uytterhoeven
0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2014-12-17 8:39 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux I2C, Linux-sh list, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
On Wed, Dec 17, 2014 at 09:04:52AM +0100, Geert Uytterhoeven wrote:
> Hi Wolfram,
>
> On Wed, Dec 17, 2014 at 7:58 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> > On Mon, Dec 15, 2014 at 02:37:04PM +0100, Geert Uytterhoeven wrote:
> >> If NO_DMA=y:
> >>
> >> drivers/built-in.o: In function `sh_mobile_i2c_dma_unmap':
> >> i2c-sh_mobile.c:(.text+0x60de42): undefined reference to `dma_unmap_single'
> >> drivers/built-in.o: In function `sh_mobile_i2c_xfer_dma':
> >> i2c-sh_mobile.c:(.text+0x60df22): undefined reference to `dma_map_single'
> >> i2c-sh_mobile.c:(.text+0x60df2e): undefined reference to `dma_mapping_error'
> >>
> >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> >
> > Thanks for spotting this. However, since DMA is opt-in, isn't this
> > dependency too much? I can't think of anything better than #ifdeffing
> > the code, though.
>
> You're right.
>
> E.g. drivers/spi/spi.c (in SPI the mapping is handled by the core), this
> code is #ifdefed out.
Then again, we could depend on ARM || SUPERH || (COMPILE_TEST &&
HAS_DMA) to skip the #ifdeffery? ARM and SUPERH don't have NO_DMA.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA
2014-12-17 8:39 ` Wolfram Sang
@ 2014-12-17 8:47 ` Geert Uytterhoeven
2014-12-17 8:59 ` Wolfram Sang
0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 8:47 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux I2C, Linux-sh list, linux-kernel@vger.kernel.org
Hi Wolfram,
On Wed, Dec 17, 2014 at 9:39 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Wed, Dec 17, 2014 at 09:04:52AM +0100, Geert Uytterhoeven wrote:
>> On Wed, Dec 17, 2014 at 7:58 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
>> > On Mon, Dec 15, 2014 at 02:37:04PM +0100, Geert Uytterhoeven wrote:
>> >> If NO_DMA=y:
>> >>
>> >> drivers/built-in.o: In function `sh_mobile_i2c_dma_unmap':
>> >> i2c-sh_mobile.c:(.text+0x60de42): undefined reference to `dma_unmap_single'
>> >> drivers/built-in.o: In function `sh_mobile_i2c_xfer_dma':
>> >> i2c-sh_mobile.c:(.text+0x60df22): undefined reference to `dma_map_single'
>> >> i2c-sh_mobile.c:(.text+0x60df2e): undefined reference to `dma_mapping_error'
>> >>
>> >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> >
>> > Thanks for spotting this. However, since DMA is opt-in, isn't this
>> > dependency too much? I can't think of anything better than #ifdeffing
>> > the code, though.
>>
>> You're right.
>>
>> E.g. drivers/spi/spi.c (in SPI the mapping is handled by the core), this
>> code is #ifdefed out.
>
> Then again, we could depend on ARM || SUPERH || (COMPILE_TEST &&
> HAS_DMA) to skip the #ifdeffery? ARM and SUPERH don't have NO_DMA.
If ARM and SUPERH imply HAS_DMA, that formula is almost identical to
the one I proposed in my patch?
depends on HAS_DMA
depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
I just prefer to split dependencies in two lines where it makes sense ("hard"
dependencies vs. "soft" (user platform configuration) dependencies).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA
2014-12-17 8:47 ` Geert Uytterhoeven
@ 2014-12-17 8:59 ` Wolfram Sang
0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-12-17 8:59 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux I2C, Linux-sh list, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
> If ARM and SUPERH imply HAS_DMA, that formula is almost identical to
> the one I proposed in my patch?
Ehrm, true :)
> depends on HAS_DMA
> depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
>
> I just prefer to split dependencies in two lines where it makes sense ("hard"
> dependencies vs. "soft" (user platform configuration) dependencies).
I prefer my version slightly. But not worth the hazzle, I'll pick yours.
Thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA
[not found] ` <1418650624-28174-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-12-17 6:58 ` Wolfram Sang
@ 2014-12-17 18:29 ` Wolfram Sang
1 sibling, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-12-17 18:29 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
On Mon, Dec 15, 2014 at 02:37:04PM +0100, Geert Uytterhoeven wrote:
> If NO_DMA=y:
>
> drivers/built-in.o: In function `sh_mobile_i2c_dma_unmap':
> i2c-sh_mobile.c:(.text+0x60de42): undefined reference to `dma_unmap_single'
> drivers/built-in.o: In function `sh_mobile_i2c_xfer_dma':
> i2c-sh_mobile.c:(.text+0x60df22): undefined reference to `dma_map_single'
> i2c-sh_mobile.c:(.text+0x60df2e): undefined reference to `dma_mapping_error'
>
> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Applied to for-current, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-12-17 18:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-15 13:37 [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA Geert Uytterhoeven
[not found] ` <1418650624-28174-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-12-17 6:58 ` Wolfram Sang
2014-12-17 8:04 ` Geert Uytterhoeven
2014-12-17 8:39 ` Wolfram Sang
2014-12-17 8:47 ` Geert Uytterhoeven
2014-12-17 8:59 ` Wolfram Sang
2014-12-17 18:29 ` Wolfram Sang
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).