cregit-Linux how code gets into the kernel

Release 4.10 drivers/usb/host/ohci-at91.c

Directory: drivers/usb/host
/*
 * OHCI HCD (Host Controller Driver) for USB.
 *
 *  Copyright (C) 2004 SAN People (Pty) Ltd.
 *  Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
 *
 * AT91 Bus Glue
 *
 * Based on fragments of 2.4 driver by Rick Bronson.
 * Based on ohci-omap.c
 *
 * This file is licenced under the GPL.
 */

#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/gpio/consumer.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/platform_data/atmel.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include <soc/at91/atmel-sfr.h>

#include "ohci.h"


#define valid_port(index)	((index) >= 0 && (index) < AT91_MAX_USBH_PORTS)

#define at91_for_each_port(index)	\
		for ((index) = 0; (index) < AT91_MAX_USBH_PORTS; (index)++)

/* interface, function and usb clocks; sometimes also an AHB clock */

#define hcd_to_ohci_at91_priv(h) \
	((struct ohci_at91_priv *)hcd_to_ohci(h)->priv)


#define AT91_MAX_USBH_PORTS	3

struct at91_usbh_data {
	
struct gpio_desc *vbus_pin[AT91_MAX_USBH_PORTS];
	
struct gpio_desc *overcurrent_pin[AT91_MAX_USBH_PORTS];
	
u8 ports;				/* number of ports on root hub */
	
u8 overcurrent_supported;
	
u8 overcurrent_status[AT91_MAX_USBH_PORTS];
	
u8 overcurrent_changed[AT91_MAX_USBH_PORTS];
};


struct ohci_at91_priv {
	
struct clk *iclk;
	
struct clk *fclk;
	
struct clk *hclk;
	
bool clocked;
	
bool wakeup;		/* Saved wake-up state for resume */
	
struct regmap *sfr_regmap;
};
/* interface and function clocks; sometimes also an AHB clock */


#define DRIVER_DESC "OHCI Atmel driver"


static const char hcd_name[] = "ohci-atmel";


static struct hc_driver __read_mostly ohci_at91_hc_driver;


static const struct ohci_driver_overrides ohci_at91_drv_overrides __initconst = {
	.extra_priv_size = sizeof(struct ohci_at91_priv),
};

/*-------------------------------------------------------------------------*/


static void at91_start_clock(struct ohci_at91_priv *ohci_at91) { if (ohci_at91->clocked) return; clk_set_rate(ohci_at91->fclk, 48000000); clk_prepare_enable(ohci_at91->hclk); clk_prepare_enable(ohci_at91->iclk); clk_prepare_enable(ohci_at91->fclk); ohci_at91->clocked = true; }

Contributors

PersonTokensPropCommitsCommitProp
andrew victorandrew victor2138.89%116.67%
sylvain rochetsylvain rochet2037.04%233.33%
boris brezillonboris brezillon1324.07%350.00%
Total54100.00%6100.00%


static void at91_stop_clock(struct ohci_at91_priv *ohci_at91) { if (!ohci_at91->clocked) return; clk_disable_unprepare(ohci_at91->fclk); clk_disable_unprepare(ohci_at91->iclk); clk_disable_unprepare(ohci_at91->hclk); ohci_at91->clocked = false; }

Contributors

PersonTokensPropCommitsCommitProp
andrew victorandrew victor2247.83%125.00%
sylvain rochetsylvain rochet2145.65%250.00%
boris brezillonboris brezillon36.52%125.00%
Total46100.00%4100.00%


static void at91_start_hc(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); struct ohci_regs __iomem *regs = hcd->regs; struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); dev_dbg(&pdev->dev, "start\n"); /* * Start the USB clocks. */ at91_start_clock(ohci_at91); /* * The USB host controller must remain in reset. */ writel(0, &regs->control); }

Contributors

PersonTokensPropCommitsCommitProp
andrew victorandrew victor5377.94%250.00%
sylvain rochetsylvain rochet1319.12%125.00%
david brownelldavid brownell22.94%125.00%
Total68100.00%4100.00%


static void at91_stop_hc(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); struct ohci_regs __iomem *regs = hcd->regs; struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); dev_dbg(&pdev->dev, "stop\n"); /* * Put the USB host controller into reset. */ writel(0, &regs->control); /* * Stop the USB clocks. */ at91_stop_clock(ohci_at91); }

Contributors

PersonTokensPropCommitsCommitProp
andrew victorandrew victor5377.94%250.00%
sylvain rochetsylvain rochet1319.12%125.00%
david brownelldavid brownell22.94%125.00%
Total68100.00%4100.00%

/*-------------------------------------------------------------------------*/ static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);
static struct regmap *at91_dt_syscon_sfr(void) { struct regmap *regmap; regmap = syscon_regmap_lookup_by_compatible("atmel,sama5d2-sfr"); if (IS_ERR(regmap)) regmap = NULL; return regmap; }

Contributors

PersonTokensPropCommitsCommitProp
wenyou yangwenyou yang3597.22%150.00%
wei yongjunwei yongjun12.78%150.00%
Total36100.00%2100.00%

/* configure so an HC device and id are always provided */ /* always called with process context; sleeping is OK */ /** * usb_hcd_at91_probe - initialize AT91-based HCDs * Context: !in_interrupt() * * Allocates basic resources for this USB host controller, and * 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, struct platform_device *pdev) { struct at91_usbh_data *board; struct ohci_hcd *ohci; int retval; struct usb_hcd *hcd; struct ohci_at91_priv *ohci_at91; struct device *dev = &pdev->dev; struct resource *res; int irq; irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_dbg(dev, "hcd probe: missing irq resource\n"); return irq; } hcd = usb_create_hcd(driver, dev, "at91"); if (!hcd) return -ENOMEM; ohci_at91 = hcd_to_ohci_at91_priv(hcd); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hcd->regs = devm_ioremap_resource(dev, res); if (IS_ERR(hcd->regs)) { retval = PTR_ERR(hcd->regs); goto err; } hcd->rsrc_start = res->start; hcd->rsrc_len = resource_size(res); ohci_at91->iclk = devm_clk_get(dev, "ohci_clk"); if (IS_ERR(ohci_at91->iclk)) { dev_err(dev, "failed to get ohci_clk\n"); retval = PTR_ERR(ohci_at91->iclk); goto err; } ohci_at91->fclk = devm_clk_get(dev, "uhpck"); if (IS_ERR(ohci_at91->fclk)) { dev_err(dev, "failed to get uhpck\n"); retval = PTR_ERR(ohci_at91->fclk); goto err; } ohci_at91->hclk = devm_clk_get(dev, "hclk"); if (IS_ERR(ohci_at91->hclk)) { dev_err(dev, "failed to get hclk\n"); retval = PTR_ERR(ohci_at91->hclk); goto err; } ohci_at91->sfr_regmap = at91_dt_syscon_sfr(); if (!ohci_at91->sfr_regmap) dev_warn(dev, "failed to find sfr node\n"); board = hcd->self.controller->platform_data; ohci = hcd_to_ohci(hcd); ohci->num_ports = board->ports; at91_start_hc(pdev); /* * The RemoteWakeupConnected bit has to be set explicitly * before calling ohci_run. The reset value of this bit is 0. */ ohci->hc_control = OHCI_CTRL_RWC; retval = usb_add_hcd(hcd, irq, IRQF_SHARED); if (retval == 0) { device_wakeup_enable(hcd->self.controller); return retval; } /* Error handling */ at91_stop_hc(pdev); err: usb_put_hcd(hcd); return retval; }

Contributors

PersonTokensPropCommitsCommitProp
andrew victorandrew victor14135.07%211.76%
jean-christophe plagniol-villardjean-christophe plagniol-villard7618.91%211.76%
boris brezillonboris brezillon5413.43%317.65%
manjunath goudarmanjunath goudar338.21%15.88%
sylvain rochetsylvain rochet307.46%15.88%
wenyou yangwenyou yang286.97%211.76%
varka bhadramvarka bhadram235.72%15.88%
peter chenpeter chen102.49%15.88%
nicolas ferrenicolas ferre30.75%211.76%
arnd bergmannarnd bergmann20.50%15.88%
david brownelldavid brownell20.50%15.88%
Total402100.00%17100.00%

/* may be called with controller, bus, and devices active */ /** * usb_hcd_at91_remove - shutdown processing for AT91-based HCDs * @dev: USB Host Controller being removed * Context: !in_interrupt() * * Reverses the effect of usb_hcd_at91_probe(), first invoking * the HCD's stop() method. It is always called from a thread * context, "rmmod" or something similar. * */
static void usb_hcd_at91_remove(struct usb_hcd *hcd, struct platform_device *pdev) { usb_remove_hcd(hcd); at91_stop_hc(pdev); usb_put_hcd(hcd); }

Contributors

PersonTokensPropCommitsCommitProp
andrew victorandrew victor2477.42%133.33%
pete zaitcevpete zaitcev619.35%133.33%
arnd bergmannarnd bergmann13.23%133.33%
Total31100.00%3100.00%

/*-------------------------------------------------------------------------*/
static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int enable) { if (!valid_port(port)) return; gpiod_set_value(pdata->vbus_pin[port], enable); }

Contributors

PersonTokensPropCommitsCommitProp
thomas petazzonithomas petazzoni3386.84%133.33%
nicolas ferrenicolas ferre410.53%133.33%
wenyou yangwenyou yang12.63%133.33%
Total38100.00%3100.00%


static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port) { if (!valid_port(port)) return -EINVAL; return gpiod_get_value(pdata->vbus_pin[port]); }

Contributors

PersonTokensPropCommitsCommitProp
thomas petazzonithomas petazzoni3183.78%125.00%
nicolas ferrenicolas ferre410.81%125.00%
jean-christophe plagniol-villardjean-christophe plagniol-villard12.70%125.00%
wenyou yangwenyou yang12.70%125.00%
Total37100.00%4100.00%

/* * Update the status data from the hub with the over-current indicator change. */
static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf) { struct at91_usbh_data *pdata = hcd->self.controller->platform_data; int length = ohci_hub_status_data(hcd, buf); int port; at91_for_each_port(port) { if (pdata->overcurrent_changed[port]) { if (!length) length = 1; buf[0] |= 1 << (port + 1); } } return length; }

Contributors

PersonTokensPropCommitsCommitProp
thomas petazzonithomas petazzoni7893.98%125.00%
nicolas ferrenicolas ferre22.41%125.00%
manjunath goudarmanjunath goudar22.41%125.00%
laurent pinchartlaurent pinchart11.20%125.00%
Total83100.00%4100.00%


static int ohci_at91_port_suspend(struct regmap *regmap, u8 set) { u32 regval; int ret; if (!regmap) return 0; ret = regmap_read(regmap, AT91_SFR_OHCIICR, &regval); if (ret) return ret; if (set) regval |= AT91_OHCIICR_USB_SUSPEND; else regval &= ~AT91_OHCIICR_USB_SUSPEND; regmap_write(regmap, AT91_SFR_OHCIICR, regval); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
wenyou yangwenyou yang73100.00%1100.00%
Total73100.00%1100.00%

/* * Look at the control requests to the root hub and see if we need to override. */
static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength) { struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller); struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); struct usb_hub_descriptor *desc; int ret = -EINVAL; u32 *data = (u32 *)buf; dev_dbg(hcd->self.controller, "ohci_at91_hub_control(%p,0x%04x,0x%04x,0x%04x,%p,%04x)\n", hcd, typeReq, wValue, wIndex, buf, wLength); wIndex--; switch (typeReq) { case SetPortFeature: switch (wValue) { case USB_PORT_FEAT_POWER: dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n"); if (valid_port(wIndex)) { ohci_at91_usb_set_power(pdata, wIndex, 1); ret = 0; } goto out; case USB_PORT_FEAT_SUSPEND: dev_dbg(hcd->self.controller, "SetPortFeat: SUSPEND\n"); if (valid_port(wIndex)) { ohci_at91_port_suspend(ohci_at91->sfr_regmap, 1); return 0; } break; } break; case ClearPortFeature: switch (wValue) { case USB_PORT_FEAT_C_OVER_CURRENT: dev_dbg(hcd->self.controller, "ClearPortFeature: C_OVER_CURRENT\n"); if (valid_port(wIndex)) { pdata->overcurrent_changed[wIndex] = 0; pdata->overcurrent_status[wIndex] = 0; } goto out; case USB_PORT_FEAT_OVER_CURRENT: dev_dbg(hcd->self.controller, "ClearPortFeature: OVER_CURRENT\n"); if (valid_port(wIndex)) pdata->overcurrent_status[wIndex] = 0; goto out; case USB_PORT_FEAT_POWER: dev_dbg(hcd->self.controller, "ClearPortFeature: POWER\n"); if (valid_port(wIndex)) { ohci_at91_usb_set_power(pdata, wIndex, 0); return 0; } break; case USB_PORT_FEAT_SUSPEND: dev_dbg(hcd->self.controller, "ClearPortFeature: SUSPEND\n"); if (valid_port(wIndex)) { ohci_at91_port_suspend(ohci_at91->sfr_regmap, 0); return 0; } break; } break; } ret = ohci_hub_control(hcd, typeReq, wValue, wIndex + 1, buf, wLength); if (ret) goto out; switch (typeReq) { case GetHubDescriptor: /* update the hub's descriptor */ desc = (struct usb_hub_descriptor *)buf; dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n", desc->wHubCharacteristics); /* remove the old configurations for power-switching, and * over-current protection, and insert our new configuration */ desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_LPSM); desc->wHubCharacteristics |= cpu_to_le16(HUB_CHAR_INDV_PORT_LPSM); if (pdata->overcurrent_supported) { desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_OCPM); desc->wHubCharacteristics |= cpu_to_le16(HUB_CHAR_INDV_PORT_OCPM); } dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n", desc->wHubCharacteristics); return ret; case GetPortStatus: /* check port status */ dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex); if (valid_port(wIndex)) { if (!ohci_at91_usb_get_power(pdata, wIndex)) *data &= ~cpu_to_le32(RH_PS_PPS); if (pdata->overcurrent_changed[wIndex]) *data |= cpu_to_le32(RH_PS_OCIC); if (pdata->overcurrent_status[wIndex]) *data |= cpu_to_le32(RH_PS_POCI); } } out: return ret; }

Contributors

PersonTokensPropCommitsCommitProp
thomas petazzonithomas petazzoni43477.92%116.67%
wenyou yangwenyou yang8715.62%116.67%
nicolas ferrenicolas ferre305.39%116.67%
jingoo hanjingoo han30.54%116.67%
sergei shtylyovsergei shtylyov20.36%116.67%
laurent pinchartlaurent pinchart10.18%116.67%
Total557100.00%6100.00%

/*-------------------------------------------------------------------------*/
static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data) { struct platform_device *pdev = data; struct at91_usbh_data *pdata = dev_get_platdata(&pdev->dev); int val, port; /* From the GPIO notifying the over-current situation, find * out the corresponding port */ at91_for_each_port(port) { if (gpiod_to_irq(pdata->overcurrent_pin[port]) == irq) break; } if (port == AT91_MAX_USBH_PORTS) { dev_err(& pdev->dev, "overcurrent interrupt from unknown GPIO\n"); return IRQ_HANDLED; } val = gpiod_get_value(pdata->overcurrent_pin[port]); /* When notified of an over-current situation, disable power on the corresponding port, and mark this port in over-current. */ if (!val) { ohci_at91_usb_set_power(pdata, port, 0); pdata->overcurrent_status[port] = 1; pdata->overcurrent_changed[port] = 1; } dev_dbg(& pdev->dev, "overcurrent situation %s\n", val ? "exited" : "notified"); return IRQ_HANDLED; }

Contributors

PersonTokensPropCommitsCommitProp
thomas petazzonithomas petazzoni12786.39%116.67%
wenyou yangwenyou yang85.44%116.67%
nicolas ferrenicolas ferre64.08%233.33%
jingoo hanjingoo han42.72%116.67%
andrew victorandrew victor21.36%116.67%
Total147100.00%6100.00%

static const struct of_device_id at91_ohci_dt_ids[] = { { .compatible = "atmel,at91rm9200-ohci" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, at91_ohci_dt_ids); /*-------------------------------------------------------------------------*/
static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct at91_usbh_data *pdata; int i; int ret; int err; u32 ports; /* Right now device-tree probed devices don't get dma_mask set. * Since shared usb code relies on it, set it here for now. * Once we have dma capability bindings this can go away. */ ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) return ret; pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM; pdev->dev.platform_data = pdata; if (!of_property_read_u32(np, "num-ports", &ports)) pdata->ports = ports; at91_for_each_port(i) { if (i >= pdata->ports) break; pdata->vbus_pin[i] = devm_gpiod_get_index_optional(&pdev->dev, "atmel,vbus", i, GPIOD_OUT_HIGH); if (IS_ERR(pdata->vbus_pin[i])) { err = PTR_ERR(pdata->vbus_pin[i]); dev_err(&pdev->dev, "unable to claim gpio \"vbus\": %d\n", err); continue; } } at91_for_each_port(i) { if (i >= pdata->ports) break; pdata->overcurrent_pin[i] = devm_gpiod_get_index_optional(&pdev->dev, "atmel,oc", i, GPIOD_IN); if (IS_ERR(pdata->overcurrent_pin[i])) { err = PTR_ERR(pdata->overcurrent_pin[i]); dev_err(&pdev->dev, "unable to claim gpio \"overcurrent\": %d\n", err); continue; } ret = devm_request_irq(&pdev->dev, gpiod_to_irq(pdata->overcurrent_pin[i]), ohci_hcd_at91_overcurrent_irq, IRQF_SHARED, "ohci_overcurrent", pdev); if (ret) dev_info(&pdev->dev, "failed to request gpio \"overcurrent\" IRQ\n"); } device_init_wakeup(&pdev->dev, 1); return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev); }

Contributors

PersonTokensPropCommitsCommitProp
jean-christophe plagniol-villardjean-christophe plagniol-villard9228.13%211.76%
nicolas ferrenicolas ferre4513.76%317.65%
wenyou yangwenyou yang4012.23%15.88%
thomas petazzonithomas petazzoni3911.93%15.88%
alexandre bellonialexandre belloni3811.62%317.65%
david brownelldavid brownell267.95%211.76%
peter rosinpeter rosin185.50%15.88%
russell kingrussell king133.98%211.76%
andrew victorandrew victor92.75%15.88%
stephen warrenstephen warren72.14%15.88%
Total327100.00%17100.00%


static int ohci_hcd_at91_drv_remove(struct platform_device *pdev) { struct at91_usbh_data *pdata = dev_get_platdata(&pdev->dev); int i; if (pdata) { at91_for_each_port(i) ohci_at91_usb_set_power(pdata, i, 0); } device_init_wakeup(&pdev->dev, 0); usb_hcd_at91_remove(platform_get_drvdata(pdev), pdev); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
david brownelldavid brownell3144.93%225.00%
andrew victorandrew victor1826.09%112.50%
thomas petazzonithomas petazzoni913.04%112.50%
jingoo hanjingoo han45.80%112.50%
pete zaitcevpete zaitcev34.35%112.50%
nicolas ferrenicolas ferre22.90%112.50%
justin watersjustin waters22.90%112.50%
Total69100.00%8100.00%


static int __maybe_unused ohci_hcd_at91_drv_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct ohci_hcd *ohci = hcd_to_ohci(hcd); struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); int ret; /* * Disable wakeup if we are going to sleep with slow clock mode * enabled. */ ohci_at91->wakeup = device_may_wakeup(dev) && !at91_suspend_entering_slow_clock(); if (ohci_at91->wakeup) enable_irq_wake(hcd->irq); ohci_at91_port_suspend(ohci_at91->sfr_regmap, 1); ret = ohci_suspend(hcd, ohci_at91->wakeup); if (ret) { if (ohci_at91->wakeup) disable_irq_wake(hcd->irq); return ret; } /* * The integrated transceivers seem unable to notice disconnect, * reconnect, or wakeup without the 48 MHz clock active. so for * correctness, always discard connection state (using reset). * * REVISIT: some boards will be able to turn VBUS off... */ if (!ohci_at91->wakeup) { ohci->rh_state = OHCI_RH_HALTED; /* flush the writes */ (void) ohci_readl (ohci, &ohci->regs->control); at91_stop_clock(ohci_at91); } return ret; }

Contributors

PersonTokensPropCommitsCommitProp
sylvain rochetsylvain rochet4629.87%327.27%
david brownelldavid brownell3724.03%19.09%
majunath goudarmajunath goudar2717.53%19.09%
patrice vilchezpatrice vilchez1610.39%19.09%
andrew victorandrew victor127.79%218.18%
wenyou yangwenyou yang95.84%19.09%
manjunath goudarmanjunath goudar63.90%19.09%
arnd bergmannarnd bergmann10.65%19.09%
Total154100.00%11100.00%


static int __maybe_unused ohci_hcd_at91_drv_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); if (ohci_at91->wakeup) disable_irq_wake(hcd->irq); at91_start_clock(ohci_at91); ohci_resume(hcd, false); ohci_at91_port_suspend(ohci_at91->sfr_regmap, 0); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
sylvain rochetsylvain rochet2028.99%327.27%
marc pignatmarc pignat1826.09%19.09%
andrew victorandrew victor1318.84%218.18%
wenyou yangwenyou yang913.04%19.09%
alan sternalan stern45.80%19.09%
florian fainelliflorian fainelli34.35%19.09%
david brownelldavid brownell11.45%19.09%
arnd bergmannarnd bergmann11.45%19.09%
Total69100.00%11100.00%

static SIMPLE_DEV_PM_OPS(ohci_hcd_at91_pm_ops, ohci_hcd_at91_drv_suspend, ohci_hcd_at91_drv_resume); static struct platform_driver ohci_hcd_at91_driver = { .probe = ohci_hcd_at91_drv_probe, .remove = ohci_hcd_at91_drv_remove, .shutdown = usb_hcd_platform_shutdown, .driver = { .name = "at91_ohci", .pm = &ohci_hcd_at91_pm_ops, .of_match_table = at91_ohci_dt_ids, }, };
static int __init ohci_at91_init(void) { if (usb_disabled()) return -ENODEV; pr_info("%s: " DRIVER_DESC "\n", hcd_name); ohci_init_driver(&ohci_at91_hc_driver, &ohci_at91_drv_overrides); /* * The Atmel HW has some unusual quirks, which require Atmel-specific * workarounds. We override certain hc_driver functions here to * achieve that. We explicitly do not enhance ohci_driver_overrides to * allow this more easily, since this is an unusual case, and we don't * want to encourage others to override these functions by making it * too easy. */ ohci_at91_hc_driver.hub_status_data = ohci_at91_hub_status_data; ohci_at91_hc_driver.hub_control = ohci_at91_hub_control; return platform_driver_register(&ohci_hcd_at91_driver); }

Contributors

PersonTokensPropCommitsCommitProp
manjunath goudarmanjunath goudar5496.43%150.00%
sylvain rochetsylvain rochet23.57%150.00%
Total56100.00%2100.00%

module_init(ohci_at91_init);
static void __exit ohci_at91_cleanup(void) { platform_driver_unregister(&ohci_hcd_at91_driver); }

Contributors

PersonTokensPropCommitsCommitProp
manjunath goudarmanjunath goudar15100.00%1100.00%
Total15100.00%1100.00%

module_exit(ohci_at91_cleanup); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:at91_ohci");

Overall Contributors

PersonTokensPropCommitsCommitProp
thomas petazzonithomas petazzoni75328.49%11.82%
andrew victorandrew victor43216.35%23.64%
wenyou yangwenyou yang31311.84%35.45%
sylvain rochetsylvain rochet2238.44%35.45%
jean-christophe plagniol-villardjean-christophe plagniol-villard2047.72%610.91%
manjunath goudarmanjunath goudar1746.58%11.82%
nicolas ferrenicolas ferre1114.20%610.91%
david brownelldavid brownell1074.05%35.45%
alexandre bellonialexandre belloni772.91%47.27%
boris brezillonboris brezillon722.72%610.91%
majunath goudarmajunath goudar271.02%11.82%
varka bhadramvarka bhadram230.87%11.82%
peter rosinpeter rosin180.68%11.82%
marc pignatmarc pignat180.68%11.82%
patrice vilchezpatrice vilchez160.61%11.82%
russell kingrussell king130.49%23.64%
jingoo hanjingoo han110.42%11.82%
pete zaitcevpete zaitcev100.38%11.82%
peter chenpeter chen100.38%11.82%
stephen warrenstephen warren70.26%11.82%
aleksey gorelovaleksey gorelov50.19%11.82%
arnd bergmannarnd bergmann50.19%23.64%
alan sternalan stern40.15%11.82%
florian fainelliflorian fainelli30.11%11.82%
justin watersjustin waters20.08%11.82%
sergei shtylyovsergei shtylyov20.08%11.82%
laurent pinchartlaurent pinchart20.08%11.82%
wei yongjunwei yongjun10.04%11.82%
Total2643100.00%55100.00%
Directory: drivers/usb/host
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.