diff options
Diffstat (limited to 'drivers/usb/host')
| -rw-r--r-- | drivers/usb/host/ehci-fsl.c | 7 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-hcd.c | 9 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-omap.c | 39 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-pci.c | 8 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-tegra.c | 377 | ||||
| -rw-r--r-- | drivers/usb/host/ohci-at91.c | 12 | 
6 files changed, 259 insertions, 193 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 3e7345172e0..d0a84bd3f3e 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -218,6 +218,9 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,  	u32 portsc;  	struct usb_hcd *hcd = ehci_to_hcd(ehci);  	void __iomem *non_ehci = hcd->regs; +	struct fsl_usb2_platform_data *pdata; + +	pdata = hcd->self.controller->platform_data;  	portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]);  	portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW); @@ -234,7 +237,9 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,  		/* fall through */  	case FSL_USB2_PHY_UTMI:  		/* enable UTMI PHY */ -		setbits32(non_ehci + FSL_SOC_USB_CTRL, CTRL_UTMI_PHY_EN); +		if (pdata->have_sysif_regs) +			setbits32(non_ehci + FSL_SOC_USB_CTRL, +				  CTRL_UTMI_PHY_EN);  		portsc |= PORT_PTS_UTMI;  		break;  	case FSL_USB2_PHY_NONE: diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 806cc95317a..4a3bc5b7a06 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -858,8 +858,13 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)  		goto dead;  	} +	/* +	 * We don't use STS_FLR, but some controllers don't like it to +	 * remain on, so mask it out along with the other status bits. +	 */ +	masked_status = status & (INTR_MASK | STS_FLR); +  	/* Shared IRQ? */ -	masked_status = status & INTR_MASK;  	if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {  		spin_unlock(&ehci->lock);  		return IRQ_NONE; @@ -910,7 +915,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)  		pcd_status = status;  		/* resume root hub? */ -		if (!(cmd & CMD_RUN)) +		if (ehci->rh_state == EHCI_RH_SUSPENDED)  			usb_hcd_resume_root_hub(hcd);  		/* get per-port change detect bits */ diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index bba9850f32f..5c78f9e7146 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -42,6 +42,7 @@  #include <plat/usb.h>  #include <linux/regulator/consumer.h>  #include <linux/pm_runtime.h> +#include <linux/gpio.h>  /* EHCI Register Set */  #define EHCI_INSNREG04					(0xA0) @@ -191,6 +192,19 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)  		}  	} +	if (pdata->phy_reset) { +		if (gpio_is_valid(pdata->reset_gpio_port[0])) +			gpio_request_one(pdata->reset_gpio_port[0], +					 GPIOF_OUT_INIT_LOW, "USB1 PHY reset"); + +		if (gpio_is_valid(pdata->reset_gpio_port[1])) +			gpio_request_one(pdata->reset_gpio_port[1], +					 GPIOF_OUT_INIT_LOW, "USB2 PHY reset"); + +		/* Hold the PHY in RESET for enough time till DIR is high */ +		udelay(10); +	} +  	pm_runtime_enable(dev);  	pm_runtime_get_sync(dev); @@ -237,6 +251,19 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)  	/* root ports should always stay powered */  	ehci_port_power(omap_ehci, 1); +	if (pdata->phy_reset) { +		/* Hold the PHY in RESET for enough time till +		 * PHY is settled and ready +		 */ +		udelay(10); + +		if (gpio_is_valid(pdata->reset_gpio_port[0])) +			gpio_set_value(pdata->reset_gpio_port[0], 1); + +		if (gpio_is_valid(pdata->reset_gpio_port[1])) +			gpio_set_value(pdata->reset_gpio_port[1], 1); +	} +  	return 0;  err_add_hcd: @@ -259,8 +286,9 @@ err_io:   */  static int ehci_hcd_omap_remove(struct platform_device *pdev)  { -	struct device *dev	= &pdev->dev; -	struct usb_hcd *hcd	= dev_get_drvdata(dev); +	struct device *dev				= &pdev->dev; +	struct usb_hcd *hcd				= dev_get_drvdata(dev); +	struct ehci_hcd_omap_platform_data *pdata	= dev->platform_data;  	usb_remove_hcd(hcd);  	disable_put_regulator(dev->platform_data); @@ -269,6 +297,13 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)  	pm_runtime_put_sync(dev);  	pm_runtime_disable(dev); +	if (pdata->phy_reset) { +		if (gpio_is_valid(pdata->reset_gpio_port[0])) +			gpio_free(pdata->reset_gpio_port[0]); + +		if (gpio_is_valid(pdata->reset_gpio_port[1])) +			gpio_free(pdata->reset_gpio_port[1]); +	}  	return 0;  } diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 01bb7241d6e..fe8dc069164 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -144,6 +144,14 @@ static int ehci_pci_setup(struct usb_hcd *hcd)  			hcd->has_tt = 1;  			tdi_reset(ehci);  		} +		if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) { +			/* EHCI #1 or #2 on 6 Series/C200 Series chipset */ +			if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) { +				ehci_info(ehci, "broken D3 during system sleep on ASUS\n"); +				hcd->broken_pci_sleep = 1; +				device_set_wakeup_capable(&pdev->dev, false); +			} +		}  		break;  	case PCI_VENDOR_ID_TDI:  		if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 73544bd440b..f214a80cdee 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -24,6 +24,7 @@  #include <linux/gpio.h>  #include <linux/of.h>  #include <linux/of_gpio.h> +#include <linux/pm_runtime.h>  #include <mach/usb_phy.h>  #include <mach/iomap.h> @@ -37,9 +38,7 @@ struct tegra_ehci_hcd {  	struct clk *emc_clk;  	struct usb_phy *transceiver;  	int host_resumed; -	int bus_suspended;  	int port_resuming; -	int power_down_on_bus_suspend;  	enum tegra_usb_phy_port_speed port_speed;  }; @@ -273,120 +272,6 @@ static void tegra_ehci_restart(struct usb_hcd *hcd)  	up_write(&ehci_cf_port_reset_rwsem);  } -static int tegra_usb_suspend(struct usb_hcd *hcd) -{ -	struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); -	struct ehci_regs __iomem *hw = tegra->ehci->regs; -	unsigned long flags; - -	spin_lock_irqsave(&tegra->ehci->lock, flags); - -	tegra->port_speed = (readl(&hw->port_status[0]) >> 26) & 0x3; -	ehci_halt(tegra->ehci); -	clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); - -	spin_unlock_irqrestore(&tegra->ehci->lock, flags); - -	tegra_ehci_power_down(hcd); -	return 0; -} - -static int tegra_usb_resume(struct usb_hcd *hcd) -{ -	struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); -	struct ehci_hcd	*ehci = hcd_to_ehci(hcd); -	struct ehci_regs __iomem *hw = ehci->regs; -	unsigned long val; - -	set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); -	tegra_ehci_power_up(hcd); - -	if (tegra->port_speed > TEGRA_USB_PHY_PORT_SPEED_HIGH) { -		/* Wait for the phy to detect new devices -		 * before we restart the controller */ -		msleep(10); -		goto restart; -	} - -	/* Force the phy to keep data lines in suspend state */ -	tegra_ehci_phy_restore_start(tegra->phy, tegra->port_speed); - -	/* Enable host mode */ -	tdi_reset(ehci); - -	/* Enable Port Power */ -	val = readl(&hw->port_status[0]); -	val |= PORT_POWER; -	writel(val, &hw->port_status[0]); -	udelay(10); - -	/* Check if the phy resume from LP0. When the phy resume from LP0 -	 * USB register will be reset. */ -	if (!readl(&hw->async_next)) { -		/* Program the field PTC based on the saved speed mode */ -		val = readl(&hw->port_status[0]); -		val &= ~PORT_TEST(~0); -		if (tegra->port_speed == TEGRA_USB_PHY_PORT_SPEED_HIGH) -			val |= PORT_TEST_FORCE; -		else if (tegra->port_speed == TEGRA_USB_PHY_PORT_SPEED_FULL) -			val |= PORT_TEST(6); -		else if (tegra->port_speed == TEGRA_USB_PHY_PORT_SPEED_LOW) -			val |= PORT_TEST(7); -		writel(val, &hw->port_status[0]); -		udelay(10); - -		/* Disable test mode by setting PTC field to NORMAL_OP */ -		val = readl(&hw->port_status[0]); -		val &= ~PORT_TEST(~0); -		writel(val, &hw->port_status[0]); -		udelay(10); -	} - -	/* Poll until CCS is enabled */ -	if (handshake(ehci, &hw->port_status[0], PORT_CONNECT, -						 PORT_CONNECT, 2000)) { -		pr_err("%s: timeout waiting for PORT_CONNECT\n", __func__); -		goto restart; -	} - -	/* Poll until PE is enabled */ -	if (handshake(ehci, &hw->port_status[0], PORT_PE, -						 PORT_PE, 2000)) { -		pr_err("%s: timeout waiting for USB_PORTSC1_PE\n", __func__); -		goto restart; -	} - -	/* Clear the PCI status, to avoid an interrupt taken upon resume */ -	val = readl(&hw->status); -	val |= STS_PCD; -	writel(val, &hw->status); - -	/* Put controller in suspend mode by writing 1 to SUSP bit of PORTSC */ -	val = readl(&hw->port_status[0]); -	if ((val & PORT_POWER) && (val & PORT_PE)) { -		val |= PORT_SUSPEND; -		writel(val, &hw->port_status[0]); - -		/* Wait until port suspend completes */ -		if (handshake(ehci, &hw->port_status[0], PORT_SUSPEND, -							 PORT_SUSPEND, 1000)) { -			pr_err("%s: timeout waiting for PORT_SUSPEND\n", -								__func__); -			goto restart; -		} -	} - -	tegra_ehci_phy_restore_end(tegra->phy); -	return 0; - -restart: -	if (tegra->port_speed <= TEGRA_USB_PHY_PORT_SPEED_HIGH) -		tegra_ehci_phy_restore_end(tegra->phy); - -	tegra_ehci_restart(hcd); -	return 0; -} -  static void tegra_ehci_shutdown(struct usb_hcd *hcd)  {  	struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); @@ -434,36 +319,6 @@ static int tegra_ehci_setup(struct usb_hcd *hcd)  	return retval;  } -#ifdef CONFIG_PM -static int tegra_ehci_bus_suspend(struct usb_hcd *hcd) -{ -	struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); -	int error_status = 0; - -	error_status = ehci_bus_suspend(hcd); -	if (!error_status && tegra->power_down_on_bus_suspend) { -		tegra_usb_suspend(hcd); -		tegra->bus_suspended = 1; -	} - -	return error_status; -} - -static int tegra_ehci_bus_resume(struct usb_hcd *hcd) -{ -	struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); - -	if (tegra->bus_suspended && tegra->power_down_on_bus_suspend) { -		tegra_usb_resume(hcd); -		tegra->bus_suspended = 0; -	} - -	tegra_usb_phy_preresume(tegra->phy); -	tegra->port_resuming = 1; -	return ehci_bus_resume(hcd); -} -#endif -  struct temp_buffer {  	void *kmalloc_ptr;  	void *old_xfer_buffer; @@ -574,8 +429,8 @@ static const struct hc_driver tegra_ehci_hc_driver = {  	.hub_control		= tegra_ehci_hub_control,  	.clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,  #ifdef CONFIG_PM -	.bus_suspend		= tegra_ehci_bus_suspend, -	.bus_resume		= tegra_ehci_bus_resume, +	.bus_suspend		= ehci_bus_suspend, +	.bus_resume		= ehci_bus_resume,  #endif  	.relinquish_port	= ehci_relinquish_port,  	.port_handed_over	= ehci_port_handed_over, @@ -603,11 +458,187 @@ static int setup_vbus_gpio(struct platform_device *pdev)  		dev_err(&pdev->dev, "can't enable vbus\n");  		return err;  	} -	gpio_set_value(gpio, 1);  	return err;  } +#ifdef CONFIG_PM + +static int controller_suspend(struct device *dev) +{ +	struct tegra_ehci_hcd *tegra = +			platform_get_drvdata(to_platform_device(dev)); +	struct ehci_hcd	*ehci = tegra->ehci; +	struct usb_hcd *hcd = ehci_to_hcd(ehci); +	struct ehci_regs __iomem *hw = ehci->regs; +	unsigned long flags; + +	if (time_before(jiffies, ehci->next_statechange)) +		msleep(10); + +	spin_lock_irqsave(&ehci->lock, flags); + +	tegra->port_speed = (readl(&hw->port_status[0]) >> 26) & 0x3; +	ehci_halt(ehci); +	clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); + +	spin_unlock_irqrestore(&ehci->lock, flags); + +	tegra_ehci_power_down(hcd); +	return 0; +} + +static int controller_resume(struct device *dev) +{ +	struct tegra_ehci_hcd *tegra = +			platform_get_drvdata(to_platform_device(dev)); +	struct ehci_hcd	*ehci = tegra->ehci; +	struct usb_hcd *hcd = ehci_to_hcd(ehci); +	struct ehci_regs __iomem *hw = ehci->regs; +	unsigned long val; + +	set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); +	tegra_ehci_power_up(hcd); + +	if (tegra->port_speed > TEGRA_USB_PHY_PORT_SPEED_HIGH) { +		/* Wait for the phy to detect new devices +		 * before we restart the controller */ +		msleep(10); +		goto restart; +	} + +	/* Force the phy to keep data lines in suspend state */ +	tegra_ehci_phy_restore_start(tegra->phy, tegra->port_speed); + +	/* Enable host mode */ +	tdi_reset(ehci); + +	/* Enable Port Power */ +	val = readl(&hw->port_status[0]); +	val |= PORT_POWER; +	writel(val, &hw->port_status[0]); +	udelay(10); + +	/* Check if the phy resume from LP0. When the phy resume from LP0 +	 * USB register will be reset. */ +	if (!readl(&hw->async_next)) { +		/* Program the field PTC based on the saved speed mode */ +		val = readl(&hw->port_status[0]); +		val &= ~PORT_TEST(~0); +		if (tegra->port_speed == TEGRA_USB_PHY_PORT_SPEED_HIGH) +			val |= PORT_TEST_FORCE; +		else if (tegra->port_speed == TEGRA_USB_PHY_PORT_SPEED_FULL) +			val |= PORT_TEST(6); +		else if (tegra->port_speed == TEGRA_USB_PHY_PORT_SPEED_LOW) +			val |= PORT_TEST(7); +		writel(val, &hw->port_status[0]); +		udelay(10); + +		/* Disable test mode by setting PTC field to NORMAL_OP */ +		val = readl(&hw->port_status[0]); +		val &= ~PORT_TEST(~0); +		writel(val, &hw->port_status[0]); +		udelay(10); +	} + +	/* Poll until CCS is enabled */ +	if (handshake(ehci, &hw->port_status[0], PORT_CONNECT, +						 PORT_CONNECT, 2000)) { +		pr_err("%s: timeout waiting for PORT_CONNECT\n", __func__); +		goto restart; +	} + +	/* Poll until PE is enabled */ +	if (handshake(ehci, &hw->port_status[0], PORT_PE, +						 PORT_PE, 2000)) { +		pr_err("%s: timeout waiting for USB_PORTSC1_PE\n", __func__); +		goto restart; +	} + +	/* Clear the PCI status, to avoid an interrupt taken upon resume */ +	val = readl(&hw->status); +	val |= STS_PCD; +	writel(val, &hw->status); + +	/* Put controller in suspend mode by writing 1 to SUSP bit of PORTSC */ +	val = readl(&hw->port_status[0]); +	if ((val & PORT_POWER) && (val & PORT_PE)) { +		val |= PORT_SUSPEND; +		writel(val, &hw->port_status[0]); + +		/* Wait until port suspend completes */ +		if (handshake(ehci, &hw->port_status[0], PORT_SUSPEND, +							 PORT_SUSPEND, 1000)) { +			pr_err("%s: timeout waiting for PORT_SUSPEND\n", +								__func__); +			goto restart; +		} +	} + +	tegra_ehci_phy_restore_end(tegra->phy); +	goto done; + + restart: +	if (tegra->port_speed <= TEGRA_USB_PHY_PORT_SPEED_HIGH) +		tegra_ehci_phy_restore_end(tegra->phy); + +	tegra_ehci_restart(hcd); + + done: +	tegra_usb_phy_preresume(tegra->phy); +	tegra->port_resuming = 1; +	return 0; +} + +static int tegra_ehci_suspend(struct device *dev) +{ +	struct tegra_ehci_hcd *tegra = +			platform_get_drvdata(to_platform_device(dev)); +	struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci); +	int rc = 0; + +	/* +	 * When system sleep is supported and USB controller wakeup is +	 * implemented: If the controller is runtime-suspended and the +	 * wakeup setting needs to be changed, call pm_runtime_resume(). +	 */ +	if (HCD_HW_ACCESSIBLE(hcd)) +		rc = controller_suspend(dev); +	return rc; +} + +static int tegra_ehci_resume(struct device *dev) +{ +	int rc; + +	rc = controller_resume(dev); +	if (rc == 0) { +		pm_runtime_disable(dev); +		pm_runtime_set_active(dev); +		pm_runtime_enable(dev); +	} +	return rc; +} + +static int tegra_ehci_runtime_suspend(struct device *dev) +{ +	return controller_suspend(dev); +} + +static int tegra_ehci_runtime_resume(struct device *dev) +{ +	return controller_resume(dev); +} + +static const struct dev_pm_ops tegra_ehci_pm_ops = { +	.suspend	= tegra_ehci_suspend, +	.resume		= tegra_ehci_resume, +	.runtime_suspend = tegra_ehci_runtime_suspend, +	.runtime_resume	= tegra_ehci_runtime_resume, +}; + +#endif +  static u64 tegra_ehci_dma_mask = DMA_BIT_MASK(32);  static int tegra_ehci_probe(struct platform_device *pdev) @@ -722,7 +753,6 @@ static int tegra_ehci_probe(struct platform_device *pdev)  	}  	tegra->host_resumed = 1; -	tegra->power_down_on_bus_suspend = pdata->power_down_on_bus_suspend;  	tegra->ehci = hcd_to_ehci(hcd);  	irq = platform_get_irq(pdev, 0); @@ -731,7 +761,6 @@ static int tegra_ehci_probe(struct platform_device *pdev)  		err = -ENODEV;  		goto fail;  	} -	set_irq_flags(irq, IRQF_VALID);  #ifdef CONFIG_USB_OTG_UTILS  	if (pdata->operating_mode == TEGRA_USB_OTG) { @@ -747,6 +776,14 @@ static int tegra_ehci_probe(struct platform_device *pdev)  		goto fail;  	} +	pm_runtime_set_active(&pdev->dev); +	pm_runtime_get_noresume(&pdev->dev); + +	/* Don't skip the pm_runtime_forbid call if wakeup isn't working */ +	/* if (!pdata->power_down_on_bus_suspend) */ +		pm_runtime_forbid(&pdev->dev); +	pm_runtime_enable(&pdev->dev); +	pm_runtime_put_sync(&pdev->dev);  	return err;  fail: @@ -773,33 +810,6 @@ fail_hcd:  	return err;  } -#ifdef CONFIG_PM -static int tegra_ehci_resume(struct platform_device *pdev) -{ -	struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); -	struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci); - -	if (tegra->bus_suspended) -		return 0; - -	return tegra_usb_resume(hcd); -} - -static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state) -{ -	struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); -	struct usb_hcd *hcd = ehci_to_hcd(tegra->ehci); - -	if (tegra->bus_suspended) -		return 0; - -	if (time_before(jiffies, tegra->ehci->next_statechange)) -		msleep(10); - -	return tegra_usb_suspend(hcd); -} -#endif -  static int tegra_ehci_remove(struct platform_device *pdev)  {  	struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); @@ -808,6 +818,10 @@ static int tegra_ehci_remove(struct platform_device *pdev)  	if (tegra == NULL || hcd == NULL)  		return -EINVAL; +	pm_runtime_get_sync(&pdev->dev); +	pm_runtime_disable(&pdev->dev); +	pm_runtime_put_noidle(&pdev->dev); +  #ifdef CONFIG_USB_OTG_UTILS  	if (tegra->transceiver) {  		otg_set_host(tegra->transceiver->otg, NULL); @@ -848,13 +862,12 @@ static struct of_device_id tegra_ehci_of_match[] __devinitdata = {  static struct platform_driver tegra_ehci_driver = {  	.probe		= tegra_ehci_probe,  	.remove		= tegra_ehci_remove, -#ifdef CONFIG_PM -	.suspend	= tegra_ehci_suspend, -	.resume		= tegra_ehci_resume, -#endif  	.shutdown	= tegra_ehci_hcd_shutdown,  	.driver		= {  		.name	= "tegra-ehci",  		.of_match_table = tegra_ehci_of_match, +#ifdef CONFIG_PM +		.pm	= &tegra_ehci_pm_ops, +#endif  	}  }; diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 09f597ad6e0..13ebeca8e73 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -94,7 +94,7 @@ static void at91_stop_hc(struct platform_device *pdev)  /*-------------------------------------------------------------------------*/ -static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *); +static void __devexit usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);  /* configure so an HC device and id are always provided */  /* always called with process context; sleeping is OK */ @@ -108,7 +108,7 @@ static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);   * then invokes the start() method for the HCD associated with it   * through the hotplug entry's driver_data.   */ -static int usb_hcd_at91_probe(const struct hc_driver *driver, +static int __devinit usb_hcd_at91_probe(const struct hc_driver *driver,  			struct platform_device *pdev)  {  	int retval; @@ -203,7 +203,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,   * context, "rmmod" or something similar.   *   */ -static void usb_hcd_at91_remove(struct usb_hcd *hcd, +static void __devexit usb_hcd_at91_remove(struct usb_hcd *hcd,  				struct platform_device *pdev)  {  	usb_remove_hcd(hcd); @@ -545,7 +545,7 @@ static int __devinit ohci_at91_of_init(struct platform_device *pdev)  /*-------------------------------------------------------------------------*/ -static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) +static int __devinit ohci_hcd_at91_drv_probe(struct platform_device *pdev)  {  	struct at91_usbh_data	*pdata;  	int			i; @@ -620,7 +620,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)  	return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);  } -static int ohci_hcd_at91_drv_remove(struct platform_device *pdev) +static int __devexit ohci_hcd_at91_drv_remove(struct platform_device *pdev)  {  	struct at91_usbh_data	*pdata = pdev->dev.platform_data;  	int			i; @@ -696,7 +696,7 @@ MODULE_ALIAS("platform:at91_ohci");  static struct platform_driver ohci_hcd_at91_driver = {  	.probe		= ohci_hcd_at91_drv_probe, -	.remove		= ohci_hcd_at91_drv_remove, +	.remove		= __devexit_p(ohci_hcd_at91_drv_remove),  	.shutdown	= usb_hcd_platform_shutdown,  	.suspend	= ohci_hcd_at91_drv_suspend,  	.resume		= ohci_hcd_at91_drv_resume,  |