From: Vegard N. <veg...@or...> - 2016-02-10 14:31:00
|
drivers/usb/host/isp116x-hcd.c: In function ‘isp116x_remove’: drivers/usb/host/isp116x-hcd.c:1552:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(isp116x->data_reg); ^ drivers/usb/host/isp116x-hcd.c: In function ‘isp116x_probe’: drivers/usb/host/isp116x-hcd.c:1604:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] addr_reg = ioremap(addr->start, resource_size(addr)); ^ drivers/usb/host/isp116x-hcd.c:1604:11: warning: assignment makes pointer from integer without a cast [enabled by default] addr_reg = ioremap(addr->start, resource_size(addr)); ^ drivers/usb/host/isp116x-hcd.c:1613:11: warning: assignment makes pointer from integer without a cast [enabled by default] data_reg = ioremap(data->start, resource_size(data)); ^ Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 1f117c3..64d78b1 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -340,6 +340,7 @@ config USB_OXU210HP_HCD config USB_ISP116X_HCD tristate "ISP116X HCD support" + depends on HAS_IOMEM ---help--- The ISP1160 and ISP1161 chips are USB host controllers. Enable this option if your board has this chip. If unsure, say N. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:30:59
|
drivers/usb/gadget/udc/m66592-udc.c: In function ‘m66592_remove’: drivers/usb/gadget/udc/m66592-udc.c:1538:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(m66592->reg); ^ drivers/usb/gadget/udc/m66592-udc.c: In function ‘m66592_probe’: drivers/usb/gadget/udc/m66592-udc.c:1577:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] reg = ioremap(res->start, resource_size(res)); ^ drivers/usb/gadget/udc/m66592-udc.c:1577:6: warning: assignment makes pointer from integer without a cast [enabled by default] reg = ioremap(res->start, resource_size(res)); ^ Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/gadget/udc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig index ca19f6f..e06efa3 100644 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig @@ -244,6 +244,7 @@ config USB_MV_U3D config USB_M66592 tristate "Renesas M66592 USB Peripheral Controller" + depends on HAS_IOMEM help M66592 is a discrete USB peripheral controller chip that supports both full and high speed USB 2.0 data transfers. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:00
|
drivers/usb/gadget/udc/net2272.c: In function ‘net2272_remove’: drivers/usb/gadget/udc/net2272.c:2232:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(dev->base_addr); ^ drivers/usb/gadget/udc/net2272.c: In function ‘net2272_plat_probe’: drivers/usb/gadget/udc/net2272.c:2650:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration] dev->base_addr = ioremap_nocache(base, len); ^ drivers/usb/gadget/udc/net2272.c:2650:17: warning: assignment makes pointer from integer without a cast [enabled by default] dev->base_addr = ioremap_nocache(base, len); ^ Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/gadget/udc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig index 753c29b..ca19f6f 100644 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig @@ -287,6 +287,7 @@ config USB_FSL_QE dynamically linked module called "fsl_qe_udc". config USB_NET2272 + depends on HAS_IOMEM tristate "PLX NET2272" help PLX NET2272 is a USB peripheral controller which supports -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:01
|
drivers/usb/host/xhci-mvebu.c: In function ‘xhci_mvebu_mbus_init_quirk’: drivers/usb/host/xhci-mvebu.c:58:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] base = ioremap(res->start, resource_size(res)); ^ drivers/usb/host/xhci-mvebu.c:58:7: warning: assignment makes pointer from integer without a cast [enabled by default] base = ioremap(res->start, resource_size(res)); ^ drivers/usb/host/xhci-mvebu.c:69:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(base); ^ Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 64d78b1..bf68bd8 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -53,6 +53,7 @@ config USB_XHCI_MTK config USB_XHCI_MVEBU tristate "xHCI support for Marvell Armada 375/38x" select USB_XHCI_PLATFORM + depends on HAS_IOMEM depends on ARCH_MVEBU || COMPILE_TEST ---help--- Say 'Y' to enable the support for the xHCI host controller -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:06
|
CC drivers/usb/host/r8a66597-hcd.o drivers/usb/host/r8a66597-hcd.c: In function ‘r8a66597_remove’: drivers/usb/host/r8a66597-hcd.c:2401:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(r8a66597->reg); ^ drivers/usb/host/r8a66597-hcd.c: In function ‘r8a66597_probe’: drivers/usb/host/r8a66597-hcd.c:2447:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] reg = ioremap(res->start, resource_size(res)); ^ drivers/usb/host/r8a66597-hcd.c:2447:6: warning: assignment makes pointer from integer without a cast [enabled by default] reg = ioremap(res->start, resource_size(res)); ^ Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index bf68bd8..af20d93 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -701,6 +701,7 @@ config USB_SL811_CS config USB_R8A66597_HCD tristate "R8A66597 HCD support" + depends on HAS_IOMEM help The R8A66597 is a USB 2.0 host and peripheral controller. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:06
|
CC drivers/usb/musb/tusb6010.o drivers/usb/musb/tusb6010.c: In function ‘tusb_musb_init’: drivers/usb/musb/tusb6010.c:1133:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] sync = ioremap(mem->start, resource_size(mem)); ^ drivers/usb/musb/tusb6010.c:1133:7: warning: assignment makes pointer from integer without a cast [enabled by default] sync = ioremap(mem->start, resource_size(mem)); ^ drivers/usb/musb/tusb6010.c:1162:4: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(sync); ^ Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/musb/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 45c83ba..0401573 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig @@ -85,6 +85,7 @@ config USB_MUSB_DA8XX config USB_MUSB_TUSB6010 tristate "TUSB6010" + depends on HAS_IOMEM depends on ARCH_OMAP2PLUS || COMPILE_TEST depends on NOP_USB_XCEIV = USB_MUSB_HDRC # both built-in or both modules -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:12
|
CC drivers/usb/host/xhci-mtk.o drivers/usb/host/xhci-mtk.c:135:12: warning: ‘xhci_mtk_host_disable’ defined but not used [-Wunused-function] static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk) ^ drivers/usb/host/xhci-mtk.c:313:13: warning: ‘usb_wakeup_enable’ defined but not used [-Wunused-function] static void usb_wakeup_enable(struct xhci_hcd_mtk *mtk) ^ drivers/usb/host/xhci-mtk.c:321:13: warning: ‘usb_wakeup_disable’ defined but not used [-Wunused-function] static void usb_wakeup_disable(struct xhci_hcd_mtk *mtk) ^ CC drivers/usb/host/sl811-hcd.o drivers/usb/host/sl811-hcd.c: In function ‘sl811h_remove’: drivers/usb/host/sl811-hcd.c:1607:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(sl811->data_reg); ^ drivers/usb/host/sl811-hcd.c: In function ‘sl811h_probe’: drivers/usb/host/sl811-hcd.c:1669:3: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] addr_reg = ioremap(addr->start, 1); ^ drivers/usb/host/sl811-hcd.c:1669:12: warning: assignment makes pointer from integer without a cast [enabled by default] addr_reg = ioremap(addr->start, 1); ^ drivers/usb/host/sl811-hcd.c:1675:12: warning: assignment makes pointer from integer without a cast [enabled by default] data_reg = ioremap(data->start, 1); ^ Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index e781fb1..96221c4 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -671,6 +671,7 @@ config USB_U132_HCD config USB_SL811_HCD tristate "SL811HS HCD support" + depends on HAS_IOMEM help The SL811HS is a single-port USB controller that supports either host side or peripheral side roles. Enable this option if your -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:13
|
drivers/built-in.o: In function `dwc2_driver_probe': /home/vegard/linux/drivers/usb/dwc2/platform.c:491: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/dwc2/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/Kconfig b/drivers/usb/dwc2/Kconfig index fd95ba6..b56920a 100644 --- a/drivers/usb/dwc2/Kconfig +++ b/drivers/usb/dwc2/Kconfig @@ -1,6 +1,7 @@ config USB_DWC2 tristate "DesignWare USB2 DRD Core Support" depends on USB || USB_GADGET + depends on HAS_IOMEM help Say Y here if your system has a Dual Role Hi-Speed USB controller based on the DesignWare HSOTG IP Core. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:16
|
CC drivers/usb/c67x00/c67x00-drv.o drivers/usb/c67x00/c67x00-drv.c: In function ‘c67x00_drv_probe’: drivers/usb/c67x00/c67x00-drv.c:148:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration] c67x00->hpi.base = ioremap(res->start, resource_size(res)); ^ drivers/usb/c67x00/c67x00-drv.c:148:19: warning: assignment makes pointer from integer without a cast [enabled by default] c67x00->hpi.base = ioremap(res->start, resource_size(res)); ^ drivers/usb/c67x00/c67x00-drv.c:185:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(c67x00->hpi.base); ^ Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index af20d93..e781fb1 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -5,6 +5,7 @@ comment "USB Host Controller Drivers" config USB_C67X00_HCD tristate "Cypress C67x00 HCD support" + depends on HAS_IOMEM help The Cypress C67x00 (EZ-Host/EZ-OTG) chips are dual-role host/peripheral/OTG USB controllers. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:18
|
drivers/built-in.o: In function `ehci_platform_probe': /home/vegard/linux/drivers/usb/host/ehci-platform.c:282: undefined reference to `devm_ioremap_resource' drivers/built-in.o: In function `oxu_drv_probe': /home/vegard/linux/drivers/usb/host/oxu210hp-hcd.c:3821: undefined reference to `devm_ioremap_resource' drivers/built-in.o: In function `isp1362_probe': /home/vegard/linux/drivers/usb/host/isp1362-hcd.c:2668: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 96221c4..4c2e38a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -72,6 +72,7 @@ endif # USB_XHCI_HCD config USB_EHCI_HCD tristate "EHCI HCD (USB 2.0) support" + depends on HAS_IOMEM ---help--- The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:21
|
drivers/built-in.o: In function `fotg210_hcd_probe': /home/vegard/linux/drivers/usb/host/fotg210-hcd.c:5637: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 90cb8d5..89f592d 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -367,6 +367,7 @@ config USB_ISP1362_HCD config USB_FOTG210_HCD tristate "FOTG210 HCD support" depends on USB + depends on HAS_IOMEM ---help--- Faraday FOTG210 is an OTG controller which can be configured as an USB2.0 host. It is designed to meet USB2.0 EHCI specification -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:21
|
drivers/built-in.o: In function `xhci_plat_probe': /home/vegard/linux/drivers/usb/host/xhci-plat.c:160: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 4c2e38a..90cb8d5 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -18,6 +18,7 @@ config USB_C67X00_HCD config USB_XHCI_HCD tristate "xHCI HCD (USB 3.0) support" + depends on HAS_IOMEM ---help--- The eXtensible Host Controller Interface (xHCI) is standard for USB 3.0 "SuperSpeed" host controller hardware. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:23
|
drivers/built-in.o: In function `musb_probe': /home/vegard/linux/drivers/usb/musb/musb_core.c:2304: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/musb/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 0401573..886526b 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig @@ -7,6 +7,7 @@ config USB_MUSB_HDRC tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)' depends on (USB || USB_GADGET) + depends on HAS_IOMEM help Say Y here if your system has a dual role high speed USB controller based on the Mentor Graphics silicon IP. Then -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:25
|
drivers/built-in.o: In function `pxa_udc_probe': /home/vegard/linux/drivers/usb/gadget/udc/pxa27x_udc.c:2430: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/gadget/udc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig index e06efa3..70feaf2 100644 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig @@ -128,6 +128,7 @@ config USB_OMAP config USB_PXA25X tristate "PXA 25x or IXP 4xx" depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX + depends on HAS_IOMEM help Intel's PXA 25x series XScale ARM-5TE processors include an integrated full speed USB 1.1 device controller. The -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:31
|
drivers/built-in.o: In function `ohci_platform_probe': /home/vegard/linux/drivers/usb/host/ohci-platform.c:246: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 89f592d..af62016 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -389,6 +389,7 @@ config USB_MAX3421_HCD config USB_OHCI_HCD tristate "OHCI HCD (USB 1.1) support" + depends on HAS_IOMEM ---help--- The Open Host Controller Interface (OHCI) is a standard for accessing USB 1.1 host controller hardware. It does more in hardware than Intel's -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:33
|
drivers/built-in.o: In function `oxu_drv_probe': /home/vegard/linux/drivers/usb/host/oxu210hp-hcd.c:3821: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index af62016..85230d6 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -332,6 +332,7 @@ endif # USB_EHCI_HCD config USB_OXU210HP_HCD tristate "OXU210HP HCD support" + depends on HAS_IOMEM ---help--- The OXU210HP is an USB host/OTG/device controller. Enable this option if your board has this chip. If unsure, say N. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:33
|
warning: (USB_APPLEDISPLAY) selects BACKLIGHT_LCD_SUPPORT which has unmet direct dependencies (HAS_IOMEM) Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/misc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index f7a7fc2..ea10059 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -150,6 +150,7 @@ config USB_FTDI_ELAN config USB_APPLEDISPLAY tristate "Apple Cinema Display support" + depends on HAS_IOMEM select BACKLIGHT_LCD_SUPPORT select BACKLIGHT_CLASS_DEVICE help -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:34
|
drivers/built-in.o: In function `pxa_udc_probe': /home/vegard/linux/drivers/usb/gadget/udc/pxa27x_udc.c:2430: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/gadget/udc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig index 70feaf2..d6ad7e6 100644 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig @@ -188,6 +188,7 @@ config USB_RENESAS_USB3 config USB_PXA27X tristate "PXA 27x" + depends on HAS_IOMEM help Intel's PXA 27x series XScale ARM v5TE processors include an integrated full speed USB 1.1 device controller. -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:38
|
Some platforms don't have DMA, but we should still be able to build USB drivers for these platforms. They could still be used through vhci_hcd, usbip_host, or maybe something like USB passthrough in UML from a capable host. This is admittedly ugly with all the #ifdefs, but it is necessary to get around linker errors like these: drivers/built-in.o: In function `dma_unmap_sg_attrs': include/linux/dma-mapping.h:183: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_unmap_single_attrs': include/linux/dma-mapping.h:148: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_map_sg_attrs': include/linux/dma-mapping.h:168: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_map_page': include/linux/dma-mapping.h:196: undefined reference to `bad_dma_ops' drivers/built-in.o: In function `dma_mapping_error': include/linux/dma-mapping.h:430: undefined reference to `bad_dma_ops' drivers/built-in.o:include/linux/dma-mapping.h:131: more undefined references to `bad_dma_ops' follow If any of the new warnings trigger, the correct solution is almost certainly to add a CONFIG_HAS_DMA dependency in the Kconfig menu for the responsible driver. Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/core/buffer.c | 17 +++++++++++++++++ drivers/usb/core/hcd.c | 45 +++++++++++++++++++++++++++++++++++++++------ include/linux/usb/hcd.h | 8 ++++++++ 3 files changed, 64 insertions(+), 6 deletions(-) diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index 89f2e77..427b131 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -59,13 +59,16 @@ void __init usb_init_pool_max(void) */ int hcd_buffer_create(struct usb_hcd *hcd) { +#ifdef CONFIG_HAS_DMA char name[16]; int i, size; +#endif if (!hcd->self.controller->dma_mask && !(hcd->driver->flags & HCD_LOCAL_MEM)) return 0; +#ifdef CONFIG_HAS_DMA for (i = 0; i < HCD_BUFFER_POOLS; i++) { size = pool_max[i]; if (!size) @@ -78,6 +81,7 @@ int hcd_buffer_create(struct usb_hcd *hcd) return -ENOMEM; } } +#endif return 0; } @@ -91,6 +95,7 @@ int hcd_buffer_create(struct usb_hcd *hcd) */ void hcd_buffer_destroy(struct usb_hcd *hcd) { +#ifdef CONFIG_HAS_DMA int i; for (i = 0; i < HCD_BUFFER_POOLS; i++) { @@ -101,6 +106,7 @@ void hcd_buffer_destroy(struct usb_hcd *hcd) hcd->pool[i] = NULL; } } +#endif } @@ -116,7 +122,9 @@ void *hcd_buffer_alloc( ) { struct usb_hcd *hcd = bus_to_hcd(bus); +#ifdef CONFIG_HAS_DMA int i; +#endif /* some USB hosts just use PIO */ if (!bus->controller->dma_mask && @@ -125,11 +133,16 @@ void *hcd_buffer_alloc( return kmalloc(size, mem_flags); } +#ifdef CONFIG_HAS_DMA for (i = 0; i < HCD_BUFFER_POOLS; i++) { if (size <= pool_max[i]) return dma_pool_alloc(hcd->pool[i], mem_flags, dma); } return dma_alloc_coherent(hcd->self.controller, size, dma, mem_flags); +#else + WARN_ON_NO_DMA(); + return NULL; +#endif } void hcd_buffer_free( @@ -140,7 +153,9 @@ void hcd_buffer_free( ) { struct usb_hcd *hcd = bus_to_hcd(bus); +#ifdef CONFIG_HAS_DMA int i; +#endif if (!addr) return; @@ -151,6 +166,7 @@ void hcd_buffer_free( return; } +#ifdef CONFIG_HAS_DMA for (i = 0; i < HCD_BUFFER_POOLS; i++) { if (size <= pool_max[i]) { dma_pool_free(hcd->pool[i], addr, dma); @@ -158,4 +174,5 @@ void hcd_buffer_free( } } dma_free_coherent(hcd->self.controller, size, addr, dma); +#endif } diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index df0e3b9..1eb214d 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1408,12 +1408,15 @@ static void hcd_free_coherent(struct usb_bus *bus, dma_addr_t *dma_handle, void usb_hcd_unmap_urb_setup_for_dma(struct usb_hcd *hcd, struct urb *urb) { - if (urb->transfer_flags & URB_SETUP_MAP_SINGLE) + if (urb->transfer_flags & URB_SETUP_MAP_SINGLE) { +#ifdef CONFIG_HAS_DMA dma_unmap_single(hcd->self.controller, urb->setup_dma, sizeof(struct usb_ctrlrequest), DMA_TO_DEVICE); - else if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) +#endif + WARN_ON_NO_DMA(); + } else if (urb->transfer_flags & URB_SETUP_MAP_LOCAL) hcd_free_coherent(urb->dev->bus, &urb->setup_dma, (void **) &urb->setup_packet, @@ -1440,27 +1443,37 @@ void usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) usb_hcd_unmap_urb_setup_for_dma(hcd, urb); dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; - if (urb->transfer_flags & URB_DMA_MAP_SG) + if (urb->transfer_flags & URB_DMA_MAP_SG) { +#ifdef CONFIG_HAS_DMA dma_unmap_sg(hcd->self.controller, urb->sg, urb->num_sgs, dir); - else if (urb->transfer_flags & URB_DMA_MAP_PAGE) +#endif + WARN_ON_NO_DMA(); + } else if (urb->transfer_flags & URB_DMA_MAP_PAGE) { +#ifdef CONFIG_HAS_DMA dma_unmap_page(hcd->self.controller, urb->transfer_dma, urb->transfer_buffer_length, dir); - else if (urb->transfer_flags & URB_DMA_MAP_SINGLE) +#endif + WARN_ON_NO_DMA(); + } else if (urb->transfer_flags & URB_DMA_MAP_SINGLE) { +#ifdef CONFIG_HAS_DMA dma_unmap_single(hcd->self.controller, urb->transfer_dma, urb->transfer_buffer_length, dir); - else if (urb->transfer_flags & URB_MAP_LOCAL) +#endif + WARN_ON_NO_DMA(); + } else if (urb->transfer_flags & URB_MAP_LOCAL) { hcd_free_coherent(urb->dev->bus, &urb->transfer_dma, &urb->transfer_buffer, urb->transfer_buffer_length, dir); + } /* Make it safe to call this routine more than once */ urb->transfer_flags &= ~(URB_DMA_MAP_SG | URB_DMA_MAP_PAGE | @@ -1493,6 +1506,7 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, if (hcd->self.uses_pio_for_control) return ret; if (hcd->self.uses_dma) { +#ifdef CONFIG_HAS_DMA urb->setup_dma = dma_map_single( hcd->self.controller, urb->setup_packet, @@ -1502,6 +1516,10 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, urb->setup_dma)) return -EAGAIN; urb->transfer_flags |= URB_SETUP_MAP_SINGLE; +#else + WARN_ON_NO_DMA(); + return -EINVAL; +#endif } else if (hcd->driver->flags & HCD_LOCAL_MEM) { ret = hcd_alloc_coherent( urb->dev->bus, mem_flags, @@ -1520,6 +1538,7 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, && !(urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) { if (hcd->self.uses_dma) { if (urb->num_sgs) { +#ifdef CONFIG_HAS_DMA int n; /* We don't support sg for isoc transfers ! */ @@ -1541,7 +1560,12 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, if (n != urb->num_sgs) urb->transfer_flags |= URB_DMA_SG_COMBINED; +#else + WARN_ON_NO_DMA(); + ret = -EINVAL; +#endif } else if (urb->sg) { +#ifdef CONFIG_HAS_DMA struct scatterlist *sg = urb->sg; urb->transfer_dma = dma_map_page( hcd->self.controller, @@ -1554,10 +1578,15 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, ret = -EAGAIN; else urb->transfer_flags |= URB_DMA_MAP_PAGE; +#else + WARN_ON_NO_DMA(); + ret = -EINVAL; +#endif } else if (is_vmalloc_addr(urb->transfer_buffer)) { WARN_ONCE(1, "transfer buffer not dma capable\n"); ret = -EAGAIN; } else { +#ifdef CONFIG_HAS_DMA urb->transfer_dma = dma_map_single( hcd->self.controller, urb->transfer_buffer, @@ -1568,6 +1597,10 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, ret = -EAGAIN; else urb->transfer_flags |= URB_DMA_MAP_SINGLE; +#else + WARN_ON_NO_DMA(); + ret = -EINVAL; +#endif } } else if (hcd->driver->flags & HCD_LOCAL_MEM) { ret = hcd_alloc_coherent( diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 4dcf844..51b816a 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -409,6 +409,14 @@ static inline bool hcd_periodic_completion_in_progress(struct usb_hcd *hcd, return hcd->high_prio_bh.completing_ep == ep; } +#ifdef CONFIG_HAS_DMA +#define WARN_ON_NO_DMA() do { } while (0) +#else +/* If this ever triggers, the correct fix is almost certainly + * to add a CONFIG_HAS_DMA dependency in the Kconfig for that driver. */ +#define WARN_ON_NO_DMA() WARN_ONCE(1, "HCD driver tried to use DMA memory") +#endif + extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, int status); -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:39
|
USB has not been usable on UML since this commit: commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 Author: Martin Schwidefsky <sch...@de...> Date: Thu May 10 15:45:57 2007 +0200 [S390] Kconfig: menus with depends on HAS_IOMEM. Add "depends on HAS_IOMEM" to a number of menus to make them disappear for s390 which does not have I/O memory. Signed-off-by: Martin Schwidefsky <sch...@de...> With hopefully all USB Host Controller Drivers that need it now depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT itself. This makes it possible to include USB support in UML builds again. Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 8ed451d..93ba109 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -21,7 +21,6 @@ config USB_EHCI_BIG_ENDIAN_DESC menuconfig USB_SUPPORT bool "USB support" - depends on HAS_IOMEM default y ---help--- This option adds core support for Universal Serial Bus (USB). -- 1.9.1 |
From: Vegard N. <veg...@or...> - 2016-02-10 14:31:41
|
drivers/built-in.o: In function `isp1362_probe': /home/vegard/linux/drivers/usb/host/isp1362-hcd.c:2668: undefined reference to `devm_ioremap_resource' Signed-off-by: Vegard Nossum <veg...@or...> --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 85230d6..438dcf6 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -357,6 +357,7 @@ config USB_ISP116X_HCD config USB_ISP1362_HCD tristate "ISP1362 HCD support" + depends on HAS_IOMEM ---help--- Supports the Philips ISP1362 chip as a host controller -- 1.9.1 |
From: Richard W. <ri...@no...> - 2016-02-10 14:35:41
|
Am 10.02.2016 um 15:29 schrieb Vegard Nossum: > USB has not been usable on UML since this commit: > > commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 > Author: Martin Schwidefsky <sch...@de...> > Date: Thu May 10 15:45:57 2007 +0200 > > [S390] Kconfig: menus with depends on HAS_IOMEM. > > Add "depends on HAS_IOMEM" to a number of menus to make them > disappear for s390 which does not have I/O memory. > > Signed-off-by: Martin Schwidefsky <sch...@de...> > > With hopefully all USB Host Controller Drivers that need it now > depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT > itself. This makes it possible to include USB support in UML builds > again. How do you use USB on uml? Or is it just for build coverage? Thanks, //richard |
From: Anton I. <ant...@ko...> - 2016-02-10 14:39:46
|
On 10/02/16 14:35, Richard Weinberger wrote: > Am 10.02.2016 um 15:29 schrieb Vegard Nossum: >> USB has not been usable on UML since this commit: >> >> commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 >> Author: Martin Schwidefsky <sch...@de...> >> Date: Thu May 10 15:45:57 2007 +0200 >> >> [S390] Kconfig: menus with depends on HAS_IOMEM. >> >> Add "depends on HAS_IOMEM" to a number of menus to make them >> disappear for s390 which does not have I/O memory. >> >> Signed-off-by: Martin Schwidefsky <sch...@de...> >> >> With hopefully all USB Host Controller Drivers that need it now >> depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT >> itself. This makes it possible to include USB support in UML builds >> again. > How do you use USB on uml? > Or is it just for build coverage? USB over Net should work. if that is working in the first place. A. > > Thanks, > //richard > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > User-mode-linux-devel mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel > |
From: Vegard N. <veg...@or...> - 2016-02-10 14:45:22
|
On 02/10/2016 03:35 PM, Richard Weinberger wrote: > Am 10.02.2016 um 15:29 schrieb Vegard Nossum: >> USB has not been usable on UML since this commit: >> >> commit e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 >> Author: Martin Schwidefsky <sch...@de...> >> Date: Thu May 10 15:45:57 2007 +0200 >> >> [S390] Kconfig: menus with depends on HAS_IOMEM. >> >> Add "depends on HAS_IOMEM" to a number of menus to make them >> disappear for s390 which does not have I/O memory. >> >> Signed-off-by: Martin Schwidefsky <sch...@de...> >> >> With hopefully all USB Host Controller Drivers that need it now >> depending on HAS_IOMEM, we can remove the dependency from USB_SUPPORT >> itself. This makes it possible to include USB support in UML builds >> again. > > How do you use USB on uml? > Or is it just for build coverage? You can use usbip_host (USB over ip) to connect with real devices or gadgetfs (e.g. dummy_hcd) to emulate a device in the UML userspace which connects to the USB driver in the UML kernel. James McMechan at one time had some patches for passing through USB devices on the host to the UML kernel but I don't think it was ever merged. Anyway, that might be desirable to bring back at some point in the future. My specific use case is using gadgetfs inside UML for USB device driver fuzzing. Vegard |
From: Greg Kroah-H. <gr...@li...> - 2016-02-10 16:15:46
|
On Wed, Feb 10, 2016 at 03:29:37PM +0100, Vegard Nossum wrote: > drivers/usb/gadget/udc/net2272.c: In function ‘net2272_remove’: > drivers/usb/gadget/udc/net2272.c:2232:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] > iounmap(dev->base_addr); > ^ > drivers/usb/gadget/udc/net2272.c: In function ‘net2272_plat_probe’: > drivers/usb/gadget/udc/net2272.c:2650:2: error: implicit declaration of function ‘ioremap_nocache’ [-Werror=implicit-function-declaration] > dev->base_addr = ioremap_nocache(base, len); > ^ > drivers/usb/gadget/udc/net2272.c:2650:17: warning: assignment makes pointer from integer without a cast [enabled by default] > dev->base_addr = ioremap_nocache(base, len); > ^ > > Signed-off-by: Vegard Nossum <veg...@or...> > --- > drivers/usb/gadget/udc/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig > index 753c29b..ca19f6f 100644 > --- a/drivers/usb/gadget/udc/Kconfig > +++ b/drivers/usb/gadget/udc/Kconfig > @@ -287,6 +287,7 @@ config USB_FSL_QE > dynamically linked module called "fsl_qe_udc". > > config USB_NET2272 > + depends on HAS_IOMEM Why not fix the root of the problem and provide the correct functions for this when HAS_IOMEM is not enabled? thanks, greg k-h |