Commit 2c93e790 authored by yuan linyu's avatar yuan linyu Committed by Greg Kroah-Hartman

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: default avataryuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Acked-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b5a6a4e5
...@@ -35,7 +35,6 @@ config USB_COMMON ...@@ -35,7 +35,6 @@ config USB_COMMON
config USB_ARCH_HAS_HCD config USB_ARCH_HAS_HCD
def_bool y def_bool y
# ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
config USB config USB
tristate "Support for Host-side USB" tristate "Support for Host-side USB"
depends on USB_ARCH_HAS_HCD depends on USB_ARCH_HAS_HCD
...@@ -73,6 +72,17 @@ config USB ...@@ -73,6 +72,17 @@ config USB
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called usbcore. module will be called usbcore.
config USB_PCI
bool "PCI based USB host interface"
depends on PCI
default y
---help---
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.
if USB if USB
source "drivers/usb/core/Kconfig" source "drivers/usb/core/Kconfig"
......
...@@ -14,7 +14,7 @@ obj-$(CONFIG_USB_ISP1760) += isp1760/ ...@@ -14,7 +14,7 @@ obj-$(CONFIG_USB_ISP1760) += isp1760/
obj-$(CONFIG_USB_MON) += mon/ obj-$(CONFIG_USB_MON) += mon/
obj-$(CONFIG_USB_MTU3) += mtu3/ obj-$(CONFIG_USB_MTU3) += mtu3/
obj-$(CONFIG_PCI) += host/ obj-$(CONFIG_USB_PCI) += host/
obj-$(CONFIG_USB_EHCI_HCD) += host/ obj-$(CONFIG_USB_EHCI_HCD) += host/
obj-$(CONFIG_USB_ISP116X_HCD) += host/ obj-$(CONFIG_USB_ISP116X_HCD) += host/
obj-$(CONFIG_USB_OHCI_HCD) += host/ obj-$(CONFIG_USB_OHCI_HCD) += host/
......
...@@ -20,7 +20,7 @@ config USB_CHIPIDEA_OF ...@@ -20,7 +20,7 @@ config USB_CHIPIDEA_OF
config USB_CHIPIDEA_PCI config USB_CHIPIDEA_PCI
tristate tristate
depends on PCI depends on USB_PCI
depends on NOP_USB_XCEIV depends on NOP_USB_XCEIV
default USB_CHIPIDEA default USB_CHIPIDEA
......
...@@ -8,7 +8,7 @@ usbcore-y += devio.o notify.o generic.o quirks.o devices.o ...@@ -8,7 +8,7 @@ usbcore-y += devio.o notify.o generic.o quirks.o devices.o
usbcore-y += port.o usbcore-y += port.o
usbcore-$(CONFIG_OF) += of.o usbcore-$(CONFIG_OF) += of.o
usbcore-$(CONFIG_PCI) += hcd-pci.o usbcore-$(CONFIG_USB_PCI) += hcd-pci.o
usbcore-$(CONFIG_ACPI) += usb-acpi.o usbcore-$(CONFIG_ACPI) += usb-acpi.o
obj-$(CONFIG_USB) += usbcore.o obj-$(CONFIG_USB) += usbcore.o
......
...@@ -54,7 +54,7 @@ endchoice ...@@ -54,7 +54,7 @@ endchoice
config USB_DWC2_PCI config USB_DWC2_PCI
tristate "DWC2 PCI" tristate "DWC2 PCI"
depends on PCI depends on USB_PCI
depends on USB_GADGET || !USB_GADGET depends on USB_GADGET || !USB_GADGET
default n default n
select NOP_USB_XCEIV select NOP_USB_XCEIV
......
...@@ -70,7 +70,7 @@ config USB_DWC3_EXYNOS ...@@ -70,7 +70,7 @@ config USB_DWC3_EXYNOS
config USB_DWC3_PCI config USB_DWC3_PCI
tristate "PCIe-based Platforms" tristate "PCIe-based Platforms"
depends on PCI && ACPI depends on USB_PCI && ACPI
default USB_DWC3 default USB_DWC3
help help
If you're using the DesignWare Core IP with a PCIe, please say If you're using the DesignWare Core IP with a PCIe, please say
......
...@@ -277,7 +277,7 @@ source "drivers/usb/gadget/udc/bdc/Kconfig" ...@@ -277,7 +277,7 @@ source "drivers/usb/gadget/udc/bdc/Kconfig"
config USB_AMD5536UDC config USB_AMD5536UDC
tristate "AMD5536 UDC" tristate "AMD5536 UDC"
depends on PCI depends on USB_PCI
help help
The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge. The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge.
It is a USB Highspeed DMA capable USB device controller. Beside ep0 It is a USB Highspeed DMA capable USB device controller. Beside ep0
...@@ -327,7 +327,7 @@ config USB_NET2272_DMA ...@@ -327,7 +327,7 @@ config USB_NET2272_DMA
config USB_NET2280 config USB_NET2280
tristate "NetChip NET228x / PLX USB3x8x" tristate "NetChip NET228x / PLX USB3x8x"
depends on PCI depends on USB_PCI
help help
NetChip 2280 / 2282 is a PCI based USB peripheral controller which NetChip 2280 / 2282 is a PCI based USB peripheral controller which
supports both full and high speed USB 2.0 data transfers. supports both full and high speed USB 2.0 data transfers.
...@@ -352,7 +352,7 @@ config USB_NET2280 ...@@ -352,7 +352,7 @@ config USB_NET2280
config USB_GOKU config USB_GOKU
tristate "Toshiba TC86C001 'Goku-S'" tristate "Toshiba TC86C001 'Goku-S'"
depends on PCI depends on USB_PCI
help help
The Toshiba TC86C001 is a PCI device which includes controllers The Toshiba TC86C001 is a PCI device which includes controllers
for full speed USB devices, IDE, I2C, SIO, plus a USB host (OHCI). for full speed USB devices, IDE, I2C, SIO, plus a USB host (OHCI).
...@@ -366,7 +366,7 @@ config USB_GOKU ...@@ -366,7 +366,7 @@ config USB_GOKU
config USB_EG20T config USB_EG20T
tristate "Intel QUARK X1000/EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC" tristate "Intel QUARK X1000/EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC"
depends on PCI depends on USB_PCI
help help
This is a USB device driver for EG20T PCH. This is a USB device driver for EG20T PCH.
EG20T PCH is the platform controller hub that is used in Intel's EG20T PCH is the platform controller hub that is used in Intel's
......
...@@ -14,7 +14,7 @@ if USB_BDC_UDC ...@@ -14,7 +14,7 @@ if USB_BDC_UDC
comment "Platform Support" comment "Platform Support"
config USB_BDC_PCI config USB_BDC_PCI
tristate "BDC support for PCIe based platforms" tristate "BDC support for PCIe based platforms"
depends on PCI depends on USB_PCI
default USB_BDC_UDC default USB_BDC_UDC
help help
Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform. Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform.
......
...@@ -653,7 +653,7 @@ net2272_request_dma(struct net2272 *dev, unsigned ep, u32 buf, ...@@ -653,7 +653,7 @@ net2272_request_dma(struct net2272 *dev, unsigned ep, u32 buf,
dev->dma_busy = 1; dev->dma_busy = 1;
/* initialize platform's dma */ /* initialize platform's dma */
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
/* NET2272 addr, buffer addr, length, etc. */ /* NET2272 addr, buffer addr, length, etc. */
switch (dev->dev_id) { switch (dev->dev_id) {
case PCI_DEVICE_ID_RDK1: case PCI_DEVICE_ID_RDK1:
...@@ -701,7 +701,7 @@ static void ...@@ -701,7 +701,7 @@ static void
net2272_start_dma(struct net2272 *dev) net2272_start_dma(struct net2272 *dev)
{ {
/* start platform's dma controller */ /* start platform's dma controller */
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
switch (dev->dev_id) { switch (dev->dev_id) {
case PCI_DEVICE_ID_RDK1: case PCI_DEVICE_ID_RDK1:
writeb((1 << CHANNEL_ENABLE) | (1 << CHANNEL_START), writeb((1 << CHANNEL_ENABLE) | (1 << CHANNEL_START),
...@@ -797,7 +797,7 @@ net2272_kick_dma(struct net2272_ep *ep, struct net2272_request *req) ...@@ -797,7 +797,7 @@ net2272_kick_dma(struct net2272_ep *ep, struct net2272_request *req)
static void net2272_cancel_dma(struct net2272 *dev) static void net2272_cancel_dma(struct net2272 *dev)
{ {
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
switch (dev->dev_id) { switch (dev->dev_id) {
case PCI_DEVICE_ID_RDK1: case PCI_DEVICE_ID_RDK1:
writeb(0, dev->rdk1.plx9054_base_addr + DMACSR0); writeb(0, dev->rdk1.plx9054_base_addr + DMACSR0);
...@@ -2306,7 +2306,7 @@ net2272_probe_fin(struct net2272 *dev, unsigned int irqflags) ...@@ -2306,7 +2306,7 @@ net2272_probe_fin(struct net2272 *dev, unsigned int irqflags)
return ret; return ret;
} }
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
/* /*
* wrap this driver around the specified device, but * wrap this driver around the specified device, but
......
...@@ -472,7 +472,7 @@ struct net2272 { ...@@ -472,7 +472,7 @@ struct net2272 {
unsigned int base_shift; unsigned int base_shift;
u16 __iomem *base_addr; u16 __iomem *base_addr;
union { union {
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
struct { struct {
void __iomem *plx9054_base_addr; void __iomem *plx9054_base_addr;
void __iomem *epld_base_addr; void __iomem *epld_base_addr;
......
...@@ -30,7 +30,7 @@ if USB_XHCI_HCD ...@@ -30,7 +30,7 @@ if USB_XHCI_HCD
config USB_XHCI_PCI config USB_XHCI_PCI
tristate tristate
depends on PCI depends on USB_PCI
default y default y
config USB_XHCI_PLATFORM config USB_XHCI_PLATFORM
...@@ -139,7 +139,7 @@ if USB_EHCI_HCD ...@@ -139,7 +139,7 @@ if USB_EHCI_HCD
config USB_EHCI_PCI config USB_EHCI_PCI
tristate tristate
depends on PCI depends on USB_PCI
default y default y
config USB_EHCI_HCD_PMC_MSP config USB_EHCI_HCD_PMC_MSP
...@@ -525,7 +525,7 @@ config USB_OHCI_HCD_PPC_OF ...@@ -525,7 +525,7 @@ config USB_OHCI_HCD_PPC_OF
config USB_OHCI_HCD_PCI config USB_OHCI_HCD_PCI
tristate "OHCI support for PCI-bus USB controllers" tristate "OHCI support for PCI-bus USB controllers"
depends on PCI depends on USB_PCI
default y default y
select USB_OHCI_LITTLE_ENDIAN select USB_OHCI_LITTLE_ENDIAN
---help--- ---help---
...@@ -606,7 +606,7 @@ endif # USB_OHCI_HCD ...@@ -606,7 +606,7 @@ endif # USB_OHCI_HCD
config USB_UHCI_HCD config USB_UHCI_HCD
tristate "UHCI HCD (most Intel and VIA) support" tristate "UHCI HCD (most Intel and VIA) support"
depends on PCI || USB_UHCI_SUPPORT_NON_PCI_HC depends on USB_PCI || USB_UHCI_SUPPORT_NON_PCI_HC
---help--- ---help---
The Universal Host Controller Interface is a standard by Intel for The Universal Host Controller Interface is a standard by Intel for
accessing the USB hardware in the PC (which is also called the USB accessing the USB hardware in the PC (which is also called the USB
...@@ -739,7 +739,7 @@ config USB_RENESAS_USBHS_HCD ...@@ -739,7 +739,7 @@ config USB_RENESAS_USBHS_HCD
config USB_WHCI_HCD config USB_WHCI_HCD
tristate "Wireless USB Host Controller Interface (WHCI) driver" tristate "Wireless USB Host Controller Interface (WHCI) driver"
depends on PCI && USB && UWB depends on USB_PCI && USB && UWB
select USB_WUSB select USB_WUSB
select UWB_WHCI select UWB_WHCI
help help
......
...@@ -27,9 +27,7 @@ endif ...@@ -27,9 +27,7 @@ endif
obj-$(CONFIG_USB_WHCI_HCD) += whci/ obj-$(CONFIG_USB_WHCI_HCD) += whci/
ifneq ($(CONFIG_USB), ) obj-$(CONFIG_USB_PCI) += pci-quirks.o
obj-$(CONFIG_PCI) += pci-quirks.o
endif
obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o
obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
......
...@@ -803,7 +803,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) ...@@ -803,7 +803,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
size -= temp; size -= temp;
next += temp; next += temp;
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
/* EHCI 0.96 and later may have "extended capabilities" */ /* EHCI 0.96 and later may have "extended capabilities" */
if (dev_is_pci(hcd->self.controller)) { if (dev_is_pci(hcd->self.controller)) {
struct pci_dev *pdev; struct pci_dev *pdev;
......
...@@ -994,7 +994,7 @@ static void ohci_stop (struct usb_hcd *hcd) ...@@ -994,7 +994,7 @@ static void ohci_stop (struct usb_hcd *hcd)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
#if defined(CONFIG_PM) || defined(CONFIG_PCI) #if defined(CONFIG_PM) || defined(CONFIG_USB_PCI)
/* must not be called from interrupt context */ /* must not be called from interrupt context */
int ohci_restart(struct ohci_hcd *ohci) int ohci_restart(struct ohci_hcd *ohci)
......
...@@ -438,7 +438,7 @@ struct ohci_hcd { ...@@ -438,7 +438,7 @@ struct ohci_hcd {
}; };
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
static inline int quirk_nec(struct ohci_hcd *ohci) static inline int quirk_nec(struct ohci_hcd *ohci)
{ {
return ohci->flags & OHCI_QUIRK_NEC; return ohci->flags & OHCI_QUIRK_NEC;
......
#ifndef __LINUX_USB_PCI_QUIRKS_H #ifndef __LINUX_USB_PCI_QUIRKS_H
#define __LINUX_USB_PCI_QUIRKS_H #define __LINUX_USB_PCI_QUIRKS_H
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
void uhci_reset_hc(struct pci_dev *pdev, unsigned long base); void uhci_reset_hc(struct pci_dev *pdev, unsigned long base);
int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base); int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base);
int usb_amd_find_chipset_info(void); int usb_amd_find_chipset_info(void);
...@@ -21,6 +21,6 @@ static inline void usb_amd_quirk_pll_enable(void) {} ...@@ -21,6 +21,6 @@ static inline void usb_amd_quirk_pll_enable(void) {}
static inline void usb_amd_dev_put(void) {} static inline void usb_amd_dev_put(void) {}
static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
static inline void sb800_prefetch(struct device *dev, int on) {} static inline void sb800_prefetch(struct device *dev, int on) {}
#endif /* CONFIG_PCI */ #endif /* CONFIG_USB_PCI */
#endif /* __LINUX_USB_PCI_QUIRKS_H */ #endif /* __LINUX_USB_PCI_QUIRKS_H */
...@@ -837,7 +837,7 @@ static int uhci_count_ports(struct usb_hcd *hcd) ...@@ -837,7 +837,7 @@ static int uhci_count_ports(struct usb_hcd *hcd)
static const char hcd_name[] = "uhci_hcd"; static const char hcd_name[] = "uhci_hcd";
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
#include "uhci-pci.c" #include "uhci-pci.c"
#define PCI_DRIVER uhci_pci_driver #define PCI_DRIVER uhci_pci_driver
#endif #endif
......
...@@ -530,7 +530,7 @@ static inline void uhci_writeb(const struct uhci_hcd *uhci, u8 val, int reg) ...@@ -530,7 +530,7 @@ static inline void uhci_writeb(const struct uhci_hcd *uhci, u8 val, int reg)
#else #else
/* Support non-PCI host controllers */ /* Support non-PCI host controllers */
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
/* Support PCI and non-PCI host controllers */ /* Support PCI and non-PCI host controllers */
#define uhci_has_pci_registers(u) ((u)->io_addr != 0) #define uhci_has_pci_registers(u) ((u)->io_addr != 0)
#else #else
......
...@@ -216,7 +216,7 @@ int xhci_reset(struct xhci_hcd *xhci) ...@@ -216,7 +216,7 @@ int xhci_reset(struct xhci_hcd *xhci)
return ret; return ret;
} }
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
static int xhci_free_msi(struct xhci_hcd *xhci) static int xhci_free_msi(struct xhci_hcd *xhci)
{ {
int i; int i;
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
#include "isp1760-core.h" #include "isp1760-core.h"
#include "isp1760-regs.h" #include "isp1760-regs.h"
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
#include <linux/pci.h> #include <linux/pci.h>
#endif #endif
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
static int isp1761_pci_init(struct pci_dev *dev) static int isp1761_pci_init(struct pci_dev *dev)
{ {
resource_size_t mem_start; resource_size_t mem_start;
...@@ -286,7 +286,7 @@ static int __init isp1760_init(void) ...@@ -286,7 +286,7 @@ static int __init isp1760_init(void)
ret = platform_driver_register(&isp1760_plat_driver); ret = platform_driver_register(&isp1760_plat_driver);
if (!ret) if (!ret)
any_ret = 0; any_ret = 0;
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
ret = pci_register_driver(&isp1761_pci_driver); ret = pci_register_driver(&isp1761_pci_driver);
if (!ret) if (!ret)
any_ret = 0; any_ret = 0;
...@@ -301,7 +301,7 @@ module_init(isp1760_init); ...@@ -301,7 +301,7 @@ module_init(isp1760_init);
static void __exit isp1760_exit(void) static void __exit isp1760_exit(void)
{ {
platform_driver_unregister(&isp1760_plat_driver); platform_driver_unregister(&isp1760_plat_driver);
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
pci_unregister_driver(&isp1761_pci_driver); pci_unregister_driver(&isp1761_pci_driver);
#endif #endif
isp1760_deinit_kmem_cache(); isp1760_deinit_kmem_cache();
......
...@@ -453,7 +453,7 @@ extern int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1); ...@@ -453,7 +453,7 @@ extern int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1);
struct platform_device; struct platform_device;
extern void usb_hcd_platform_shutdown(struct platform_device *dev); extern void usb_hcd_platform_shutdown(struct platform_device *dev);
#ifdef CONFIG_PCI #ifdef CONFIG_USB_PCI
struct pci_dev; struct pci_dev;
struct pci_device_id; struct pci_device_id;
extern int usb_hcd_pci_probe(struct pci_dev *dev, extern int usb_hcd_pci_probe(struct pci_dev *dev,
...@@ -466,7 +466,7 @@ extern int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *dev); ...@@ -466,7 +466,7 @@ extern int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *dev);
#ifdef CONFIG_PM #ifdef CONFIG_PM
extern const struct dev_pm_ops usb_hcd_pci_pm_ops; extern const struct dev_pm_ops usb_hcd_pci_pm_ops;
#endif #endif
#endif /* CONFIG_PCI */ #endif /* CONFIG_USB_PCI */
/* pci-ish (pdev null is ok) buffer alloc/mapping support */ /* pci-ish (pdev null is ok) buffer alloc/mapping support */
void usb_init_pool_max(void); void usb_init_pool_max(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment