• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/usb/host/

Lines Matching defs:fhci

28 #include "fhci.h"
43 static void fhci_gpio_set_value(struct fhci_hcd *fhci, int gpio_nr, bool on)
45 int gpio = fhci->gpios[gpio_nr];
46 bool alow = fhci->alow_gpios[gpio_nr];
55 void fhci_config_transceiver(struct fhci_hcd *fhci,
58 fhci_dbg(fhci, "-> %s: %d\n", __func__, status);
62 fhci_gpio_set_value(fhci, GPIO_POWER, false);
66 fhci_gpio_set_value(fhci, GPIO_POWER, true);
69 fhci_gpio_set_value(fhci, GPIO_SPEED, false);
72 fhci_gpio_set_value(fhci, GPIO_SPEED, true);
79 fhci_dbg(fhci, "<- %s: %d\n", __func__, status);
83 void fhci_port_disable(struct fhci_hcd *fhci)
85 struct fhci_usb *usb = (struct fhci_usb *)fhci->usb_lld;
88 fhci_dbg(fhci, "-> %s\n", __func__);
90 fhci_stop_sof_timer(fhci);
94 fhci_usb_disable_interrupt((struct fhci_usb *)fhci->usb_lld);
100 out_be16(&usb->fhci->regs->usb_mask, usb->saved_msk);
104 fhci_device_connected_interrupt(fhci);
107 fhci_usb_enable_interrupt((struct fhci_usb *)fhci->usb_lld);
109 fhci_dbg(fhci, "<- %s\n", __func__);
116 struct fhci_hcd *fhci = usb->fhci;
118 fhci_dbg(fhci, "-> %s\n", __func__);
120 fhci_config_transceiver(fhci, usb->port_status);
124 fhci_start_sof_timer(fhci);
129 fhci_dbg(fhci, "<- %s\n", __func__);
132 void fhci_io_port_generate_reset(struct fhci_hcd *fhci)
134 fhci_dbg(fhci, "-> %s\n", __func__);
136 gpio_direction_output(fhci->gpios[GPIO_USBOE], 0);
137 gpio_direction_output(fhci->gpios[GPIO_USBTP], 0);
138 gpio_direction_output(fhci->gpios[GPIO_USBTN], 0);
142 qe_pin_set_dedicated(fhci->pins[PIN_USBOE]);
143 qe_pin_set_dedicated(fhci->pins[PIN_USBTP]);
144 qe_pin_set_dedicated(fhci->pins[PIN_USBTN]);
146 fhci_dbg(fhci, "<- %s\n", __func__);
153 struct fhci_hcd *fhci = usb->fhci;
157 fhci_dbg(fhci, "-> %s\n", __func__);
159 fhci_stop_sof_timer(fhci);
161 mode = in_8(&fhci->regs->usb_mod);
162 out_8(&fhci->regs->usb_mod, mode & (~USB_MODE_EN));
165 mask = in_be16(&fhci->regs->usb_mask);
166 out_be16(&fhci->regs->usb_mask, mask & (~USB_E_IDLE_MASK));
168 fhci_io_port_generate_reset(fhci);
171 out_be16(&fhci->regs->usb_mask, mask);
174 mode = in_8(&fhci->regs->usb_mod);
175 out_8(&fhci->regs->usb_mod, mode | USB_MODE_EN);
176 fhci_start_sof_timer(fhci);
178 fhci_dbg(fhci, "<- %s\n", __func__);
183 struct fhci_hcd *fhci = hcd_to_fhci(hcd);
187 fhci_dbg(fhci, "-> %s\n", __func__);
189 spin_lock_irqsave(&fhci->lock, flags);
191 if (fhci->vroot_hub->port.wPortChange & (USB_PORT_STAT_C_CONNECTION |
196 fhci_dbg(fhci, "-- %s\n", __func__);
199 spin_unlock_irqrestore(&fhci->lock, flags);
201 fhci_dbg(fhci, "<- %s\n", __func__);
209 struct fhci_hcd *fhci = hcd_to_fhci(hcd);
216 spin_lock_irqsave(&fhci->lock, flags);
218 fhci_dbg(fhci, "-> %s\n", __func__);
231 fhci->vroot_hub->feature &= (1 << wValue);
235 fhci->vroot_hub->port.wPortStatus &=
237 fhci_port_disable(fhci);
240 fhci->vroot_hub->port.wPortChange &=
244 fhci->vroot_hub->port.wPortStatus &=
246 fhci_stop_sof_timer(fhci);
249 fhci->vroot_hub->port.wPortChange &=
253 fhci->vroot_hub->port.wPortStatus &=
255 fhci_config_transceiver(fhci, FHCI_PORT_POWER_OFF);
258 fhci->vroot_hub->port.wPortChange &=
262 fhci->vroot_hub->port.wPortChange &=
266 fhci->vroot_hub->port.wPortChange &=
281 cpu_to_le16(fhci->vroot_hub->hub.wHubStatus);
283 cpu_to_le16(fhci->vroot_hub->hub.wHubChange);
289 cpu_to_le16(fhci->vroot_hub->port.wPortStatus);
291 cpu_to_le16(fhci->vroot_hub->port.wPortChange);
304 fhci->vroot_hub->feature |= (1 << wValue);
308 fhci->vroot_hub->port.wPortStatus |=
310 fhci_port_enable(fhci->usb_lld);
313 fhci->vroot_hub->port.wPortStatus |=
315 fhci_stop_sof_timer(fhci);
318 fhci->vroot_hub->port.wPortStatus |=
320 fhci_port_reset(fhci->usb_lld);
321 fhci->vroot_hub->port.wPortStatus |=
323 fhci->vroot_hub->port.wPortStatus &=
327 fhci->vroot_hub->port.wPortStatus |=
329 fhci_config_transceiver(fhci, FHCI_PORT_WAITING);
340 fhci_dbg(fhci, "<- %s\n", __func__);
342 spin_unlock_irqrestore(&fhci->lock, flags);