USB: EHCI: fix build error by making ChipIdea host a normal EHCI driver
This patch (as1627) splits the ehci-hcd core code, which has become a
separate library module, out from the ChipIdea host driver.  Instead
of #include-ing ehci-hcd.c directly, the ChipIdea module will now use
the ehci-hcd library in a normal fashion.
This fixes a build error caused by commit
3e02320399 (USB: EHCI: prepare to make
ehci-hcd a library module); I had forgotten about the unorthodox way
the ChipIdea driver uses the ehci-hcd code.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
	
	
This commit is contained in:
		
					parent
					
						
							
								57465109ce
							
						
					
				
			
			
				commit
				
					
						09f6ffde2e
					
				
			
		
					 3 changed files with 9 additions and 54 deletions
				
			
		|  | @ -20,6 +20,7 @@ config USB_CHIPIDEA_UDC | ||||||
| config USB_CHIPIDEA_HOST | config USB_CHIPIDEA_HOST | ||||||
| 	bool "ChipIdea host controller" | 	bool "ChipIdea host controller" | ||||||
| 	depends on USB=y || USB=USB_CHIPIDEA | 	depends on USB=y || USB=USB_CHIPIDEA | ||||||
|  | 	depends on USB_EHCI_HCD | ||||||
| 	select USB_EHCI_ROOT_HUB_TT | 	select USB_EHCI_ROOT_HUB_TT | ||||||
| 	help | 	help | ||||||
| 	  Say Y here to enable host controller functionality of the | 	  Say Y here to enable host controller functionality of the | ||||||
|  |  | ||||||
|  | @ -25,57 +25,18 @@ | ||||||
| #include <linux/usb/chipidea.h> | #include <linux/usb/chipidea.h> | ||||||
| 
 | 
 | ||||||
| #define CHIPIDEA_EHCI | #define CHIPIDEA_EHCI | ||||||
| #include "../host/ehci-hcd.c" | #include "../host/ehci.h" | ||||||
| 
 | 
 | ||||||
| #include "ci.h" | #include "ci.h" | ||||||
| #include "bits.h" | #include "bits.h" | ||||||
| #include "host.h" | #include "host.h" | ||||||
| 
 | 
 | ||||||
| static const struct hc_driver ci_ehci_hc_driver = { | static const struct ehci_driver_overrides ci_overrides = { | ||||||
| 	.description	= "ehci_hcd", | 	.product_desc =		"ChipIdea HDRC EHCI host controller", | ||||||
| 	.product_desc	= "ChipIdea HDRC EHCI", |  | ||||||
| 	.hcd_priv_size	= sizeof(struct ehci_hcd), |  | ||||||
| 
 |  | ||||||
| 	/*
 |  | ||||||
| 	 * generic hardware linkage |  | ||||||
| 	 */ |  | ||||||
| 	.irq	= ehci_irq, |  | ||||||
| 	.flags	= HCD_MEMORY | HCD_USB2, |  | ||||||
| 
 |  | ||||||
| 	/*
 |  | ||||||
| 	 * basic lifecycle operations |  | ||||||
| 	 */ |  | ||||||
| 	.reset		= ehci_setup, |  | ||||||
| 	.start		= ehci_run, |  | ||||||
| 	.stop		= ehci_stop, |  | ||||||
| 	.shutdown	= ehci_shutdown, |  | ||||||
| 
 |  | ||||||
| 	/*
 |  | ||||||
| 	 * managing i/o requests and associated device resources |  | ||||||
| 	 */ |  | ||||||
| 	.urb_enqueue		= ehci_urb_enqueue, |  | ||||||
| 	.urb_dequeue		= ehci_urb_dequeue, |  | ||||||
| 	.endpoint_disable	= ehci_endpoint_disable, |  | ||||||
| 	.endpoint_reset		= ehci_endpoint_reset, |  | ||||||
| 
 |  | ||||||
| 	/*
 |  | ||||||
| 	 * scheduling support |  | ||||||
| 	 */ |  | ||||||
| 	.get_frame_number = ehci_get_frame, |  | ||||||
| 
 |  | ||||||
| 	/*
 |  | ||||||
| 	 * root hub support |  | ||||||
| 	 */ |  | ||||||
| 	.hub_status_data	= ehci_hub_status_data, |  | ||||||
| 	.hub_control		= ehci_hub_control, |  | ||||||
| 	.bus_suspend		= ehci_bus_suspend, |  | ||||||
| 	.bus_resume		= ehci_bus_resume, |  | ||||||
| 	.relinquish_port	= ehci_relinquish_port, |  | ||||||
| 	.port_handed_over	= ehci_port_handed_over, |  | ||||||
| 
 |  | ||||||
| 	.clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, |  | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | static struct hc_driver __read_mostly ci_ehci_hc_driver; | ||||||
|  | 
 | ||||||
| static irqreturn_t host_irq(struct ci13xxx *ci) | static irqreturn_t host_irq(struct ci13xxx *ci) | ||||||
| { | { | ||||||
| 	return usb_hcd_irq(ci->irq, ci->hcd); | 	return usb_hcd_irq(ci->irq, ci->hcd); | ||||||
|  | @ -141,5 +102,7 @@ int ci_hdrc_host_init(struct ci13xxx *ci) | ||||||
| 	rdrv->name	= "host"; | 	rdrv->name	= "host"; | ||||||
| 	ci->roles[CI_ROLE_HOST] = rdrv; | 	ci->roles[CI_ROLE_HOST] = rdrv; | ||||||
| 
 | 
 | ||||||
|  | 	ehci_init_driver(&ci_ehci_hc_driver, &ci_overrides); | ||||||
|  | 
 | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1240,14 +1240,6 @@ EXPORT_SYMBOL_GPL(ehci_init_driver); | ||||||
| 
 | 
 | ||||||
| /*-------------------------------------------------------------------------*/ | /*-------------------------------------------------------------------------*/ | ||||||
| 
 | 
 | ||||||
| /*
 |  | ||||||
|  * The EHCI in ChipIdea HDRC cannot be a separate module or device, |  | ||||||
|  * because its registers (and irq) are shared between host/gadget/otg |  | ||||||
|  * functions  and in order to facilitate role switching we cannot |  | ||||||
|  * give the ehci driver exclusive access to those. |  | ||||||
|  */ |  | ||||||
| #ifndef CHIPIDEA_EHCI |  | ||||||
| 
 |  | ||||||
| MODULE_DESCRIPTION(DRIVER_DESC); | MODULE_DESCRIPTION(DRIVER_DESC); | ||||||
| MODULE_AUTHOR (DRIVER_AUTHOR); | MODULE_AUTHOR (DRIVER_AUTHOR); | ||||||
| MODULE_LICENSE ("GPL"); | MODULE_LICENSE ("GPL"); | ||||||
|  | @ -1359,6 +1351,7 @@ MODULE_LICENSE ("GPL"); | ||||||
| 
 | 
 | ||||||
| #if !IS_ENABLED(CONFIG_USB_EHCI_PCI) && \ | #if !IS_ENABLED(CONFIG_USB_EHCI_PCI) && \ | ||||||
| 	!IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \ | 	!IS_ENABLED(CONFIG_USB_EHCI_HCD_PLATFORM) && \ | ||||||
|  | 	!defined(CONFIG_USB_CHIPIDEA_HOST) && \ | ||||||
| 	!defined(PLATFORM_DRIVER) && \ | 	!defined(PLATFORM_DRIVER) && \ | ||||||
| 	!defined(PS3_SYSTEM_BUS_DRIVER) && \ | 	!defined(PS3_SYSTEM_BUS_DRIVER) && \ | ||||||
| 	!defined(OF_PLATFORM_DRIVER) && \ | 	!defined(OF_PLATFORM_DRIVER) && \ | ||||||
|  | @ -1464,5 +1457,3 @@ static void __exit ehci_hcd_cleanup(void) | ||||||
| 	clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); | 	clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded); | ||||||
| } | } | ||||||
| module_exit(ehci_hcd_cleanup); | module_exit(ehci_hcd_cleanup); | ||||||
| 
 |  | ||||||
| #endif /* CHIPIDEA_EHCI */ |  | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alan Stern
				Alan Stern