Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW

a lot of embeded system SOC (e.g. freescale T2080) have both
PCI and USB modules. But USB module is controlled by registers directly,
it have no relationship with PCI module.

when say N here it will not build PCI related code in USB driver.

Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

yuan linyu and committed by
Greg Kroah-Hartman
2c93e790 b5a6a4e5

+46 -38
+11 -1
drivers/usb/Kconfig
··· 35 35 config USB_ARCH_HAS_HCD 36 36 def_bool y 37 37 38 - # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. 39 38 config USB 40 39 tristate "Support for Host-side USB" 41 40 depends on USB_ARCH_HAS_HCD ··· 71 72 72 73 To compile this driver as a module, choose M here: the 73 74 module will be called usbcore. 75 + 76 + config USB_PCI 77 + bool "PCI based USB host interface" 78 + depends on PCI 79 + default y 80 + ---help--- 81 + A lot of embeded system SOC (e.g. freescale T2080) have both 82 + PCI and USB modules. But USB module is controlled by registers 83 + directly, it have no relationship with PCI module. 84 + 85 + When say N here it will not build PCI related code in USB driver. 74 86 75 87 if USB 76 88
+1 -1
drivers/usb/Makefile
··· 14 14 obj-$(CONFIG_USB_MON) += mon/ 15 15 obj-$(CONFIG_USB_MTU3) += mtu3/ 16 16 17 - obj-$(CONFIG_PCI) += host/ 17 + obj-$(CONFIG_USB_PCI) += host/ 18 18 obj-$(CONFIG_USB_EHCI_HCD) += host/ 19 19 obj-$(CONFIG_USB_ISP116X_HCD) += host/ 20 20 obj-$(CONFIG_USB_OHCI_HCD) += host/
+1 -1
drivers/usb/chipidea/Kconfig
··· 20 20 21 21 config USB_CHIPIDEA_PCI 22 22 tristate 23 - depends on PCI 23 + depends on USB_PCI 24 24 depends on NOP_USB_XCEIV 25 25 default USB_CHIPIDEA 26 26
+1 -1
drivers/usb/core/Makefile
··· 8 8 usbcore-y += port.o 9 9 10 10 usbcore-$(CONFIG_OF) += of.o 11 - usbcore-$(CONFIG_PCI) += hcd-pci.o 11 + usbcore-$(CONFIG_USB_PCI) += hcd-pci.o 12 12 usbcore-$(CONFIG_ACPI) += usb-acpi.o 13 13 14 14 obj-$(CONFIG_USB) += usbcore.o
+1 -1
drivers/usb/dwc2/Kconfig
··· 54 54 55 55 config USB_DWC2_PCI 56 56 tristate "DWC2 PCI" 57 - depends on PCI 57 + depends on USB_PCI 58 58 depends on USB_GADGET || !USB_GADGET 59 59 default n 60 60 select NOP_USB_XCEIV
+1 -1
drivers/usb/dwc3/Kconfig
··· 70 70 71 71 config USB_DWC3_PCI 72 72 tristate "PCIe-based Platforms" 73 - depends on PCI && ACPI 73 + depends on USB_PCI && ACPI 74 74 default USB_DWC3 75 75 help 76 76 If you're using the DesignWare Core IP with a PCIe, please say
+4 -4
drivers/usb/gadget/udc/Kconfig
··· 277 277 278 278 config USB_AMD5536UDC 279 279 tristate "AMD5536 UDC" 280 - depends on PCI 280 + depends on USB_PCI 281 281 help 282 282 The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge. 283 283 It is a USB Highspeed DMA capable USB device controller. Beside ep0 ··· 327 327 328 328 config USB_NET2280 329 329 tristate "NetChip NET228x / PLX USB3x8x" 330 - depends on PCI 330 + depends on USB_PCI 331 331 help 332 332 NetChip 2280 / 2282 is a PCI based USB peripheral controller which 333 333 supports both full and high speed USB 2.0 data transfers. ··· 352 352 353 353 config USB_GOKU 354 354 tristate "Toshiba TC86C001 'Goku-S'" 355 - depends on PCI 355 + depends on USB_PCI 356 356 help 357 357 The Toshiba TC86C001 is a PCI device which includes controllers 358 358 for full speed USB devices, IDE, I2C, SIO, plus a USB host (OHCI). ··· 366 366 367 367 config USB_EG20T 368 368 tristate "Intel QUARK X1000/EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC" 369 - depends on PCI 369 + depends on USB_PCI 370 370 help 371 371 This is a USB device driver for EG20T PCH. 372 372 EG20T PCH is the platform controller hub that is used in Intel's
+1 -1
drivers/usb/gadget/udc/bdc/Kconfig
··· 14 14 comment "Platform Support" 15 15 config USB_BDC_PCI 16 16 tristate "BDC support for PCIe based platforms" 17 - depends on PCI 17 + depends on USB_PCI 18 18 default USB_BDC_UDC 19 19 help 20 20 Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform.
+4 -4
drivers/usb/gadget/udc/net2272.c
··· 653 653 dev->dma_busy = 1; 654 654 655 655 /* initialize platform's dma */ 656 - #ifdef CONFIG_PCI 656 + #ifdef CONFIG_USB_PCI 657 657 /* NET2272 addr, buffer addr, length, etc. */ 658 658 switch (dev->dev_id) { 659 659 case PCI_DEVICE_ID_RDK1: ··· 701 701 net2272_start_dma(struct net2272 *dev) 702 702 { 703 703 /* start platform's dma controller */ 704 - #ifdef CONFIG_PCI 704 + #ifdef CONFIG_USB_PCI 705 705 switch (dev->dev_id) { 706 706 case PCI_DEVICE_ID_RDK1: 707 707 writeb((1 << CHANNEL_ENABLE) | (1 << CHANNEL_START), ··· 797 797 798 798 static void net2272_cancel_dma(struct net2272 *dev) 799 799 { 800 - #ifdef CONFIG_PCI 800 + #ifdef CONFIG_USB_PCI 801 801 switch (dev->dev_id) { 802 802 case PCI_DEVICE_ID_RDK1: 803 803 writeb(0, dev->rdk1.plx9054_base_addr + DMACSR0); ··· 2306 2306 return ret; 2307 2307 } 2308 2308 2309 - #ifdef CONFIG_PCI 2309 + #ifdef CONFIG_USB_PCI 2310 2310 2311 2311 /* 2312 2312 * wrap this driver around the specified device, but
+1 -1
drivers/usb/gadget/udc/net2272.h
··· 472 472 unsigned int base_shift; 473 473 u16 __iomem *base_addr; 474 474 union { 475 - #ifdef CONFIG_PCI 475 + #ifdef CONFIG_USB_PCI 476 476 struct { 477 477 void __iomem *plx9054_base_addr; 478 478 void __iomem *epld_base_addr;
+5 -5
drivers/usb/host/Kconfig
··· 30 30 31 31 config USB_XHCI_PCI 32 32 tristate 33 - depends on PCI 33 + depends on USB_PCI 34 34 default y 35 35 36 36 config USB_XHCI_PLATFORM ··· 139 139 140 140 config USB_EHCI_PCI 141 141 tristate 142 - depends on PCI 142 + depends on USB_PCI 143 143 default y 144 144 145 145 config USB_EHCI_HCD_PMC_MSP ··· 525 525 526 526 config USB_OHCI_HCD_PCI 527 527 tristate "OHCI support for PCI-bus USB controllers" 528 - depends on PCI 528 + depends on USB_PCI 529 529 default y 530 530 select USB_OHCI_LITTLE_ENDIAN 531 531 ---help--- ··· 606 606 607 607 config USB_UHCI_HCD 608 608 tristate "UHCI HCD (most Intel and VIA) support" 609 - depends on PCI || USB_UHCI_SUPPORT_NON_PCI_HC 609 + depends on USB_PCI || USB_UHCI_SUPPORT_NON_PCI_HC 610 610 ---help--- 611 611 The Universal Host Controller Interface is a standard by Intel for 612 612 accessing the USB hardware in the PC (which is also called the USB ··· 739 739 740 740 config USB_WHCI_HCD 741 741 tristate "Wireless USB Host Controller Interface (WHCI) driver" 742 - depends on PCI && USB && UWB 742 + depends on USB_PCI && USB && UWB 743 743 select USB_WUSB 744 744 select UWB_WHCI 745 745 help
+1 -3
drivers/usb/host/Makefile
··· 27 27 28 28 obj-$(CONFIG_USB_WHCI_HCD) += whci/ 29 29 30 - ifneq ($(CONFIG_USB), ) 31 - obj-$(CONFIG_PCI) += pci-quirks.o 32 - endif 30 + obj-$(CONFIG_USB_PCI) += pci-quirks.o 33 31 34 32 obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o 35 33 obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
+1 -1
drivers/usb/host/ehci-dbg.c
··· 803 803 size -= temp; 804 804 next += temp; 805 805 806 - #ifdef CONFIG_PCI 806 + #ifdef CONFIG_USB_PCI 807 807 /* EHCI 0.96 and later may have "extended capabilities" */ 808 808 if (dev_is_pci(hcd->self.controller)) { 809 809 struct pci_dev *pdev;
+1 -1
drivers/usb/host/ohci-hcd.c
··· 994 994 995 995 /*-------------------------------------------------------------------------*/ 996 996 997 - #if defined(CONFIG_PM) || defined(CONFIG_PCI) 997 + #if defined(CONFIG_PM) || defined(CONFIG_USB_PCI) 998 998 999 999 /* must not be called from interrupt context */ 1000 1000 int ohci_restart(struct ohci_hcd *ohci)
+1 -1
drivers/usb/host/ohci.h
··· 438 438 439 439 }; 440 440 441 - #ifdef CONFIG_PCI 441 + #ifdef CONFIG_USB_PCI 442 442 static inline int quirk_nec(struct ohci_hcd *ohci) 443 443 { 444 444 return ohci->flags & OHCI_QUIRK_NEC;
+2 -2
drivers/usb/host/pci-quirks.h
··· 1 1 #ifndef __LINUX_USB_PCI_QUIRKS_H 2 2 #define __LINUX_USB_PCI_QUIRKS_H 3 3 4 - #ifdef CONFIG_PCI 4 + #ifdef CONFIG_USB_PCI 5 5 void uhci_reset_hc(struct pci_dev *pdev, unsigned long base); 6 6 int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base); 7 7 int usb_amd_find_chipset_info(void); ··· 21 21 static inline void usb_amd_dev_put(void) {} 22 22 static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} 23 23 static inline void sb800_prefetch(struct device *dev, int on) {} 24 - #endif /* CONFIG_PCI */ 24 + #endif /* CONFIG_USB_PCI */ 25 25 26 26 #endif /* __LINUX_USB_PCI_QUIRKS_H */
+1 -1
drivers/usb/host/uhci-hcd.c
··· 837 837 838 838 static const char hcd_name[] = "uhci_hcd"; 839 839 840 - #ifdef CONFIG_PCI 840 + #ifdef CONFIG_USB_PCI 841 841 #include "uhci-pci.c" 842 842 #define PCI_DRIVER uhci_pci_driver 843 843 #endif
+1 -1
drivers/usb/host/uhci-hcd.h
··· 530 530 531 531 #else 532 532 /* Support non-PCI host controllers */ 533 - #ifdef CONFIG_PCI 533 + #ifdef CONFIG_USB_PCI 534 534 /* Support PCI and non-PCI host controllers */ 535 535 #define uhci_has_pci_registers(u) ((u)->io_addr != 0) 536 536 #else
+1 -1
drivers/usb/host/xhci.c
··· 216 216 return ret; 217 217 } 218 218 219 - #ifdef CONFIG_PCI 219 + #ifdef CONFIG_USB_PCI 220 220 static int xhci_free_msi(struct xhci_hcd *xhci) 221 221 { 222 222 int i;
+4 -4
drivers/usb/isp1760/isp1760-if.c
··· 21 21 #include "isp1760-core.h" 22 22 #include "isp1760-regs.h" 23 23 24 - #ifdef CONFIG_PCI 24 + #ifdef CONFIG_USB_PCI 25 25 #include <linux/pci.h> 26 26 #endif 27 27 28 - #ifdef CONFIG_PCI 28 + #ifdef CONFIG_USB_PCI 29 29 static int isp1761_pci_init(struct pci_dev *dev) 30 30 { 31 31 resource_size_t mem_start; ··· 286 286 ret = platform_driver_register(&isp1760_plat_driver); 287 287 if (!ret) 288 288 any_ret = 0; 289 - #ifdef CONFIG_PCI 289 + #ifdef CONFIG_USB_PCI 290 290 ret = pci_register_driver(&isp1761_pci_driver); 291 291 if (!ret) 292 292 any_ret = 0; ··· 301 301 static void __exit isp1760_exit(void) 302 302 { 303 303 platform_driver_unregister(&isp1760_plat_driver); 304 - #ifdef CONFIG_PCI 304 + #ifdef CONFIG_USB_PCI 305 305 pci_unregister_driver(&isp1761_pci_driver); 306 306 #endif 307 307 isp1760_deinit_kmem_cache();
+2 -2
include/linux/usb/hcd.h
··· 453 453 struct platform_device; 454 454 extern void usb_hcd_platform_shutdown(struct platform_device *dev); 455 455 456 - #ifdef CONFIG_PCI 456 + #ifdef CONFIG_USB_PCI 457 457 struct pci_dev; 458 458 struct pci_device_id; 459 459 extern int usb_hcd_pci_probe(struct pci_dev *dev, ··· 466 466 #ifdef CONFIG_PM 467 467 extern const struct dev_pm_ops usb_hcd_pci_pm_ops; 468 468 #endif 469 - #endif /* CONFIG_PCI */ 469 + #endif /* CONFIG_USB_PCI */ 470 470 471 471 /* pci-ish (pdev null is ok) buffer alloc/mapping support */ 472 472 void usb_init_pool_max(void);