// SPDX-License-Identifier: GPL-2.0+ /* * c67x00-hcd.c: Cypress C67X00 USB Host Controller Driver * * Copyright (C) 2006-2008 Barco N.V. * Derived from the Cypress cy7c67200/300 ezusb linux driver and * based on multiple host controller drivers inside the linux kernel.
*/
case SetHubFeature: /* We don't implement these */ case ClearHubFeature: switch (wValue) { case C_HUB_OVER_CURRENT: case C_HUB_LOCAL_POWER:
len = 0; break;
default: return -EPIPE;
} break;
case SetPortFeature: if (wIndex > C67X00_PORTS) return -EPIPE;
switch (wValue) { case USB_PORT_FEAT_SUSPEND:
dev_dbg(c67x00_hcd_dev(c67x00), "SetPortFeature %d (SUSPEND)\n", port);
len = 0; break;
case USB_PORT_FEAT_RESET:
c67x00_hub_reset_host_port(sie, port);
len = 0; break;
case USB_PORT_FEAT_POWER: /* Power always enabled */
len = 0; break;
case ClearPortFeature: if (wIndex > C67X00_PORTS) return -EPIPE;
switch (wValue) { case USB_PORT_FEAT_ENABLE: /* Reset the port so that the c67x00 also notices the
* disconnect */
c67x00_hub_reset_host_port(sie, port);
len = 0; break;
case USB_PORT_FEAT_C_ENABLE:
dev_dbg(c67x00_hcd_dev(c67x00), "ClearPortFeature (%d): C_ENABLE\n", port);
len = 0; break;
case USB_PORT_FEAT_SUSPEND:
dev_dbg(c67x00_hcd_dev(c67x00), "ClearPortFeature (%d): SUSPEND\n", port);
len = 0; break;
case USB_PORT_FEAT_C_SUSPEND:
dev_dbg(c67x00_hcd_dev(c67x00), "ClearPortFeature (%d): C_SUSPEND\n", port);
len = 0; break;
case USB_PORT_FEAT_POWER:
dev_dbg(c67x00_hcd_dev(c67x00), "ClearPortFeature (%d): POWER\n", port); return -EPIPE;
case USB_PORT_FEAT_C_CONNECTION:
c67x00_ll_usb_clear_status(sie,
PORT_CONNECT_CHANGE(port));
len = 0; break;
case USB_PORT_FEAT_C_OVER_CURRENT:
dev_dbg(c67x00_hcd_dev(c67x00), "ClearPortFeature (%d): OVER_CURRENT\n", port);
len = 0; break;
case USB_PORT_FEAT_C_RESET:
dev_dbg(c67x00_hcd_dev(c67x00), "ClearPortFeature (%d): C_RESET\n", port);
len = 0; break;
/* --------------------------------------------------------------------- * Main part of host controller driver
*/
/* * c67x00_hcd_irq * * This function is called from the interrupt handler in c67x00-drv.c
*/ staticvoid c67x00_hcd_irq(struct c67x00_sie *sie, u16 int_status, u16 msg)
{ struct c67x00_hcd *c67x00 = sie->private_data; struct usb_hcd *hcd = c67x00_hcd_to_hcd(c67x00);
/* Handle sie message flags */ if (msg) { if (msg & HUSB_TDListDone)
c67x00_sched_kick(c67x00); else
dev_warn(c67x00_hcd_dev(c67x00), "Unknown SIE msg flag(s): 0x%04x\n", msg);
}
if (unlikely(hcd->state == HC_STATE_HALT)) return;
if (!HCD_HW_ACCESSIBLE(hcd)) return;
/* Handle Start of frame events */ if (int_status & SOFEOP_FLG(sie->sie_num)) {
c67x00_ll_usb_clear_status(sie, SOF_EOP_IRQ_FLG);
c67x00_sched_kick(c67x00);
}
}
/* may be called with controller, bus, and devices active */ void c67x00_hcd_remove(struct c67x00_sie *sie)
{ struct c67x00_hcd *c67x00 = sie->private_data; struct usb_hcd *hcd = c67x00_hcd_to_hcd(c67x00);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.