* [PATCH 1/4] usb: gadget: USB_FUSB300 should depend on HAS_DMA
@ 2013-08-18 20:20 Geert Uytterhoeven
2013-08-18 20:20 ` [PATCH 2/4] usb: gadget: USB_R8A66597 " Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2013-08-18 20:20 UTC (permalink / raw)
To: Felipe Balbi, Alexander Shishkin, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, Geert Uytterhoeven
If NO_DMA=y:
drivers/built-in.o: In function `fusb300_set_idma':
drivers/usb/gadget/fusb300_udc.c:946: undefined reference to `usb_gadget_map_request'
drivers/usb/gadget/fusb300_udc.c:958: undefined reference to `usb_gadget_unmap_request'
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/usb/gadget/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 8e93683..d2e6f4f 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -188,7 +188,7 @@ config USB_FSL_USB2
config USB_FUSB300
tristate "Faraday FUSB300 USB Peripheral Controller"
- depends on !PHYS_ADDR_T_64BIT
+ depends on !PHYS_ADDR_T_64BIT && HAS_DMA
help
Faraday usb device controller FUSB300 driver
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/4] usb: gadget: USB_R8A66597 should depend on HAS_DMA 2013-08-18 20:20 [PATCH 1/4] usb: gadget: USB_FUSB300 should depend on HAS_DMA Geert Uytterhoeven @ 2013-08-18 20:20 ` Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 3/4] usb: gadget: USB_NET2272_DMA " Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 4/4] usb: chipidea: USB_CHIPIDEA " Geert Uytterhoeven 2 siblings, 0 replies; 7+ messages in thread From: Geert Uytterhoeven @ 2013-08-18 20:20 UTC (permalink / raw) To: Felipe Balbi, Alexander Shishkin, Greg Kroah-Hartman Cc: linux-usb, linux-kernel, Geert Uytterhoeven If NO_DMA=y: drivers/built-in.o: In function `sudmac_free_channel': drivers/usb/gadget/r8a66597-udc.c:676: undefined reference to `usb_gadget_unmap_request' drivers/built-in.o: In function `sudmac_alloc_channel': drivers/usb/gadget/r8a66597-udc.c:666: undefined reference to `usb_gadget_map_request' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index d2e6f4f..3c1cadd 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -246,6 +246,7 @@ config USB_PXA25X_SMALL config USB_R8A66597 tristate "Renesas R8A66597 USB Peripheral Controller" + depends on HAS_DMA help R8A66597 is a discrete USB host and peripheral controller chip that supports both full and high speed USB 2.0 data transfers. -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] usb: gadget: USB_NET2272_DMA should depend on HAS_DMA 2013-08-18 20:20 [PATCH 1/4] usb: gadget: USB_FUSB300 should depend on HAS_DMA Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 2/4] usb: gadget: USB_R8A66597 " Geert Uytterhoeven @ 2013-08-18 20:20 ` Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 4/4] usb: chipidea: USB_CHIPIDEA " Geert Uytterhoeven 2 siblings, 0 replies; 7+ messages in thread From: Geert Uytterhoeven @ 2013-08-18 20:20 UTC (permalink / raw) To: Felipe Balbi, Alexander Shishkin, Greg Kroah-Hartman Cc: linux-usb, linux-kernel, Geert Uytterhoeven If NO_DMA=y: drivers/built-in.o: In function `net2272_done': drivers/usb/gadget/net2272.c:386: undefined reference to `usb_gadget_unmap_request' drivers/built-in.o: In function `net2272_queue': drivers/usb/gadget/net2272.c:848: undefined reference to `usb_gadget_map_request' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- drivers/usb/gadget/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 3c1cadd..324dc61 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -403,7 +403,7 @@ config USB_NET2272 config USB_NET2272_DMA boolean "Support external DMA controller" - depends on USB_NET2272 + depends on USB_NET2272 && HAS_DMA help The NET2272 part can optionally support an external DMA controller, but your board has to have support in the -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] usb: chipidea: USB_CHIPIDEA should depend on HAS_DMA 2013-08-18 20:20 [PATCH 1/4] usb: gadget: USB_FUSB300 should depend on HAS_DMA Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 2/4] usb: gadget: USB_R8A66597 " Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 3/4] usb: gadget: USB_NET2272_DMA " Geert Uytterhoeven @ 2013-08-18 20:20 ` Geert Uytterhoeven 2013-08-19 1:24 ` Peter Chen 2 siblings, 1 reply; 7+ messages in thread From: Geert Uytterhoeven @ 2013-08-18 20:20 UTC (permalink / raw) To: Felipe Balbi, Alexander Shishkin, Greg Kroah-Hartman Cc: linux-usb, linux-kernel, Geert Uytterhoeven If NO_DMA=y: drivers/built-in.o: In function `dma_set_coherent_mask': include/linux/dma-mapping.h:93: undefined reference to `dma_supported' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- drivers/usb/chipidea/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index d1bd8ef..dbd5232 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig @@ -1,6 +1,6 @@ config USB_CHIPIDEA tristate "ChipIdea Highspeed Dual Role Controller" - depends on USB || USB_GADGET + depends on (USB || USB_GADGET) && HAS_DMA help Say Y here if your system has a dual role high speed USB controller based on ChipIdea silicon IP. Currently, only the -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] usb: chipidea: USB_CHIPIDEA should depend on HAS_DMA 2013-08-18 20:20 ` [PATCH 4/4] usb: chipidea: USB_CHIPIDEA " Geert Uytterhoeven @ 2013-08-19 1:24 ` Peter Chen 2013-08-27 19:16 ` Felipe Balbi 0 siblings, 1 reply; 7+ messages in thread From: Peter Chen @ 2013-08-19 1:24 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Felipe Balbi, Alexander Shishkin, Greg Kroah-Hartman, linux-usb, linux-kernel On Sun, Aug 18, 2013 at 10:20:44PM +0200, Geert Uytterhoeven wrote: > If NO_DMA=y: > > drivers/built-in.o: In function `dma_set_coherent_mask': > include/linux/dma-mapping.h:93: undefined reference to `dma_supported' > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > drivers/usb/chipidea/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig > index d1bd8ef..dbd5232 100644 > --- a/drivers/usb/chipidea/Kconfig > +++ b/drivers/usb/chipidea/Kconfig > @@ -1,6 +1,6 @@ > config USB_CHIPIDEA > tristate "ChipIdea Highspeed Dual Role Controller" > - depends on USB || USB_GADGET > + depends on (USB || USB_GADGET) && HAS_DMA > help > Say Y here if your system has a dual role high speed USB > controller based on ChipIdea silicon IP. Currently, only the I can't understand why the DMA can't be changed to fix this instead of changing every driver? -- Best Regards, Peter Chen ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] usb: chipidea: USB_CHIPIDEA should depend on HAS_DMA 2013-08-19 1:24 ` Peter Chen @ 2013-08-27 19:16 ` Felipe Balbi 2013-08-27 19:26 ` Geert Uytterhoeven 0 siblings, 1 reply; 7+ messages in thread From: Felipe Balbi @ 2013-08-27 19:16 UTC (permalink / raw) To: Peter Chen Cc: Geert Uytterhoeven, Felipe Balbi, Alexander Shishkin, Greg Kroah-Hartman, linux-usb, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1196 bytes --] On Mon, Aug 19, 2013 at 09:24:01AM +0800, Peter Chen wrote: > On Sun, Aug 18, 2013 at 10:20:44PM +0200, Geert Uytterhoeven wrote: > > If NO_DMA=y: > > > > drivers/built-in.o: In function `dma_set_coherent_mask': > > include/linux/dma-mapping.h:93: undefined reference to `dma_supported' > > > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > > --- > > drivers/usb/chipidea/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig > > index d1bd8ef..dbd5232 100644 > > --- a/drivers/usb/chipidea/Kconfig > > +++ b/drivers/usb/chipidea/Kconfig > > @@ -1,6 +1,6 @@ > > config USB_CHIPIDEA > > tristate "ChipIdea Highspeed Dual Role Controller" > > - depends on USB || USB_GADGET > > + depends on (USB || USB_GADGET) && HAS_DMA > > help > > Say Y here if your system has a dual role high speed USB > > controller based on ChipIdea silicon IP. Currently, only the > > I can't understand why the DMA can't be changed to fix this instead > of changing every driver? I'm with you. It'd be nicer to just provide empty stubs when !HAS_DMA -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 4/4] usb: chipidea: USB_CHIPIDEA should depend on HAS_DMA 2013-08-27 19:16 ` Felipe Balbi @ 2013-08-27 19:26 ` Geert Uytterhoeven 0 siblings, 0 replies; 7+ messages in thread From: Geert Uytterhoeven @ 2013-08-27 19:26 UTC (permalink / raw) To: Felipe Balbi Cc: Peter Chen, Alexander Shishkin, Greg Kroah-Hartman, USB list, linux-kernel@vger.kernel.org, Dan Williams, Arnd Bergmann, Linux-Arch On Tue, Aug 27, 2013 at 9:16 PM, Felipe Balbi <balbi@ti.com> wrote: > On Mon, Aug 19, 2013 at 09:24:01AM +0800, Peter Chen wrote: >> On Sun, Aug 18, 2013 at 10:20:44PM +0200, Geert Uytterhoeven wrote: >> > If NO_DMA=y: >> > >> > drivers/built-in.o: In function `dma_set_coherent_mask': >> > include/linux/dma-mapping.h:93: undefined reference to `dma_supported' >> > >> > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> >> > --- >> > drivers/usb/chipidea/Kconfig | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig >> > index d1bd8ef..dbd5232 100644 >> > --- a/drivers/usb/chipidea/Kconfig >> > +++ b/drivers/usb/chipidea/Kconfig >> > @@ -1,6 +1,6 @@ >> > config USB_CHIPIDEA >> > tristate "ChipIdea Highspeed Dual Role Controller" >> > - depends on USB || USB_GADGET >> > + depends on (USB || USB_GADGET) && HAS_DMA >> > help >> > Say Y here if your system has a dual role high speed USB >> > controller based on ChipIdea silicon IP. Currently, only the >> >> I can't understand why the DMA can't be changed to fix this instead >> of changing every driver? > > I'm with you. It'd be nicer to just provide empty stubs when !HAS_DMA That would give us drivers that compile but don't work. Not having stubs is intentional, cfr. the comment at the top of include/asm-generic/dma-mapping-broken.h: /* define the dma api to allow compilation but not linking of * dma dependent code. Code that depends on the dma-mapping * API needs to set 'depends on HAS_DMA' in its Kconfig */ and the comments in the commit that introduced it: commit 1b0fac45878bb88759eec347c273285195649ff7 Author: Dan Williams <dan.j.williams@intel.com> Date: Sun Jul 15 23:40:26 2007 -0700 dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs Continuing the work started in 411f0f3edc141a582190d3605cadd1d993abb6df ... This enables code with a dma path, that compiles away, to build without requiring additional code factoring. It also prevents code that calls dma_alloc_coherent and dma_free_coherent from linking whereas previously the code would hit a BUG() at run time. Finally, it allows archs that set !HAS_DMA to delete their asm/dma-mapping.h file. 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
end of thread, other threads:[~2013-08-27 19:26 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-08-18 20:20 [PATCH 1/4] usb: gadget: USB_FUSB300 should depend on HAS_DMA Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 2/4] usb: gadget: USB_R8A66597 " Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 3/4] usb: gadget: USB_NET2272_DMA " Geert Uytterhoeven 2013-08-18 20:20 ` [PATCH 4/4] usb: chipidea: USB_CHIPIDEA " Geert Uytterhoeven 2013-08-19 1:24 ` Peter Chen 2013-08-27 19:16 ` Felipe Balbi 2013-08-27 19:26 ` Geert Uytterhoeven
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).