Home
last modified time | relevance | path

Searched refs:ehci (Results 1 – 25 of 66) sorted by relevance

123

/linux-3.4.99/drivers/usb/host/
Dehci-hcd.c134 timer_action(struct ehci_hcd *ehci, enum ehci_timer_action action) in timer_action() argument
140 if (timer_pending(&ehci->watchdog) in timer_action()
142 & ehci->actions)) in timer_action()
145 if (!test_and_set_bit(action, &ehci->actions)) { in timer_action()
150 if (!ehci->need_io_watchdog) in timer_action()
162 mod_timer(&ehci->watchdog, t + jiffies); in timer_action()
185 static int handshake (struct ehci_hcd *ehci, void __iomem *ptr, in handshake() argument
191 result = ehci_readl(ehci, ptr); in handshake()
204 static int tdi_in_host_mode (struct ehci_hcd *ehci) in tdi_in_host_mode() argument
209 reg_ptr = (u32 __iomem *)(((u8 __iomem *)ehci->regs) + USBMODE); in tdi_in_host_mode()
[all …]
Dehci-hub.c48 static void ehci_handover_companion_ports(struct ehci_hcd *ehci) in ehci_handover_companion_ports() argument
54 struct usb_hcd *hcd = ehci_to_hcd(ehci); in ehci_handover_companion_ports()
56 if (!ehci->owned_ports) in ehci_handover_companion_ports()
62 port = HCS_N_PORTS(ehci->hcs_params); in ehci_handover_companion_ports()
64 if (test_bit(port, &ehci->owned_ports)) { in ehci_handover_companion_ports()
65 reg = &ehci->regs->port_status[port]; in ehci_handover_companion_ports()
66 status = ehci_readl(ehci, reg) & ~PORT_RWC_BITS; in ehci_handover_companion_ports()
70 clear_bit(port, &ehci->owned_ports); in ehci_handover_companion_ports()
71 else if (test_bit(port, &ehci->companion_ports)) in ehci_handover_companion_ports()
72 ehci_writel(ehci, status & ~PORT_PE, reg); in ehci_handover_companion_ports()
[all …]
Dehci-mem.c38 static inline void ehci_qtd_init(struct ehci_hcd *ehci, struct ehci_qtd *qtd, in ehci_qtd_init() argument
43 qtd->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); in ehci_qtd_init()
44 qtd->hw_next = EHCI_LIST_END(ehci); in ehci_qtd_init()
45 qtd->hw_alt_next = EHCI_LIST_END(ehci); in ehci_qtd_init()
49 static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, gfp_t flags) in ehci_qtd_alloc() argument
54 qtd = dma_pool_alloc (ehci->qtd_pool, flags, &dma); in ehci_qtd_alloc()
56 ehci_qtd_init(ehci, qtd, dma); in ehci_qtd_alloc()
61 static inline void ehci_qtd_free (struct ehci_hcd *ehci, struct ehci_qtd *qtd) in ehci_qtd_free() argument
63 dma_pool_free (ehci->qtd_pool, qtd, qtd->qtd_dma); in ehci_qtd_free()
69 struct ehci_hcd *ehci = qh->ehci; in qh_destroy() local
[all …]
Dehci-pci.c31 static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) in ehci_pci_reinit() argument
42 ehci_dbg(ehci, "MWI active\n"); in ehci_pci_reinit()
50 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_pci_setup() local
62 ehci->big_endian_mmio = 1; in ehci_pci_setup()
64 ehci_warn(ehci, in ehci_pci_setup()
71 ehci->caps = hcd->regs; in ehci_pci_setup()
72 ehci->regs = hcd->regs + in ehci_pci_setup()
73 HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in ehci_pci_setup()
75 dbg_hcs_params(ehci, "reset"); in ehci_pci_setup()
76 dbg_hcc_params(ehci, "reset"); in ehci_pci_setup()
[all …]
Dehci-sched.c41 static unsigned ehci_read_frame_index(struct ehci_hcd *ehci) in ehci_read_frame_index() argument
52 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_read_frame_index()
53 if (unlikely(ehci->frame_index_bug && ((uf & 7) == 0))) in ehci_read_frame_index()
54 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_read_frame_index()
68 periodic_next_shadow(struct ehci_hcd *ehci, union ehci_shadow *periodic, in periodic_next_shadow() argument
71 switch (hc32_to_cpu(ehci, tag)) { in periodic_next_shadow()
85 shadow_next_periodic(struct ehci_hcd *ehci, union ehci_shadow *periodic, in shadow_next_periodic() argument
88 switch (hc32_to_cpu(ehci, tag)) { in shadow_next_periodic()
99 static void periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr) in periodic_unlink() argument
101 union ehci_shadow *prev_p = &ehci->pshadow[frame]; in periodic_unlink()
[all …]
Dehci-fsl.c143 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in usb_hcd_fsl_probe() local
145 ehci->transceiver = usb_get_transceiver(); in usb_hcd_fsl_probe()
147 hcd, ehci, ehci->transceiver); in usb_hcd_fsl_probe()
149 if (ehci->transceiver) { in usb_hcd_fsl_probe()
150 retval = otg_set_host(ehci->transceiver->otg, in usb_hcd_fsl_probe()
151 &ehci_to_hcd(ehci)->self); in usb_hcd_fsl_probe()
153 if (ehci->transceiver) in usb_hcd_fsl_probe()
154 put_device(ehci->transceiver->dev); in usb_hcd_fsl_probe()
194 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in usb_hcd_fsl_remove() local
196 if (ehci->transceiver) { in usb_hcd_fsl_remove()
[all …]
Dehci-spear.c20 struct ehci_hcd ehci; member
26 static void spear_start_ehci(struct spear_ehci *ehci) in spear_start_ehci() argument
28 clk_enable(ehci->clk); in spear_start_ehci()
31 static void spear_stop_ehci(struct spear_ehci *ehci) in spear_stop_ehci() argument
33 clk_disable(ehci->clk); in spear_stop_ehci()
38 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_spear_setup() local
42 ehci->caps = hcd->regs; in ehci_spear_setup()
43 ehci->regs = hcd->regs + HC_LENGTH(ehci, ehci_readl(ehci, in ehci_spear_setup()
44 &ehci->caps->hc_capbase)); in ehci_spear_setup()
46 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); in ehci_spear_setup()
[all …]
Dehci-dbg.c21 #define ehci_dbg(ehci, fmt, args...) \ argument
22 dev_dbg (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
23 #define ehci_err(ehci, fmt, args...) \ argument
24 dev_err (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
25 #define ehci_info(ehci, fmt, args...) \ argument
26 dev_info (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
27 #define ehci_warn(ehci, fmt, args...) \ argument
28 dev_warn (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
33 static inline void ehci_vdbg(struct ehci_hcd *ehci, ...) {} in ehci_vdbg() argument
42 static void dbg_hcs_params (struct ehci_hcd *ehci, char *label) in dbg_hcs_params() argument
[all …]
Dehci-q.c46 qtd_fill(struct ehci_hcd *ehci, struct ehci_qtd *qtd, dma_addr_t buf, in qtd_fill() argument
53 qtd->hw_buf[0] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill()
54 qtd->hw_buf_hi[0] = cpu_to_hc32(ehci, (u32)(addr >> 32)); in qtd_fill()
65 qtd->hw_buf[i] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill()
66 qtd->hw_buf_hi[i] = cpu_to_hc32(ehci, in qtd_fill()
79 qtd->hw_token = cpu_to_hc32(ehci, (count << 16) | token); in qtd_fill()
88 qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd) in qh_update() argument
95 hw->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_update()
96 hw->hw_alt_next = EHCI_LIST_END(ehci); in qh_update()
103 if (!(hw->hw_info1 & cpu_to_hc32(ehci, 1 << 14))) { in qh_update()
[all …]
Dehci-au1xxx.c22 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in au1xxx_ehci_setup() local
25 ehci->need_io_watchdog = 0; in au1xxx_ehci_setup()
26 ehci_reset(ehci); in au1xxx_ehci_setup()
81 struct ehci_hcd *ehci; in ehci_hcd_au1xxx_drv_probe() local
119 ehci = hcd_to_ehci(hcd); in ehci_hcd_au1xxx_drv_probe()
120 ehci->caps = hcd->regs; in ehci_hcd_au1xxx_drv_probe()
121 ehci->regs = hcd->regs + in ehci_hcd_au1xxx_drv_probe()
122 HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); in ehci_hcd_au1xxx_drv_probe()
124 ehci->hcs_params = readl(&ehci->caps->hcs_params); in ehci_hcd_au1xxx_drv_probe()
161 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_hcd_au1xxx_drv_suspend() local
[all …]
Dehci-lpm.c20 static int __maybe_unused ehci_lpm_set_da(struct ehci_hcd *ehci, in ehci_lpm_set_da() argument
25 ehci_dbg(ehci, "set dev address %d for port %d\n", dev_addr, port_num); in ehci_lpm_set_da()
26 if (port_num > HCS_N_PORTS(ehci->hcs_params)) { in ehci_lpm_set_da()
27 ehci_dbg(ehci, "invalid port number %d\n", port_num); in ehci_lpm_set_da()
30 portsc = ehci_readl(ehci, &ehci->regs->port_status[port_num-1]); in ehci_lpm_set_da()
33 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_num-1]); in ehci_lpm_set_da()
41 static int __maybe_unused ehci_lpm_check(struct ehci_hcd *ehci, int port) in ehci_lpm_check() argument
47 portsc = &ehci->regs->port_status[port-1]; in ehci_lpm_check()
48 val32 = ehci_readl(ehci, portsc); in ehci_lpm_check()
50 ehci_dbg(ehci, "LPM: no device attached\n"); in ehci_lpm_check()
[all …]
Dehci-sysfs.c27 struct ehci_hcd *ehci; in show_companion() local
32 ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); in show_companion()
33 nports = HCS_N_PORTS(ehci->hcs_params); in show_companion()
36 if (test_bit(index, &ehci->companion_ports)) { in show_companion()
54 struct ehci_hcd *ehci; in store_companion() local
57 ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); in store_companion()
65 if (portnum <= 0 || portnum > HCS_N_PORTS(ehci->hcs_params)) in store_companion()
69 set_bit(portnum, &ehci->companion_ports); in store_companion()
71 clear_bit(portnum, &ehci->companion_ports); in store_companion()
72 set_owner(ehci, portnum, new_owner); in store_companion()
[all …]
Dehci.h189 static inline struct usb_hcd *ehci_to_hcd (struct ehci_hcd *ehci) in ehci_to_hcd() argument
191 return container_of ((void *) ehci, struct usb_hcd, hcd_priv); in ehci_to_hcd()
196 iaa_watchdog_start(struct ehci_hcd *ehci) in iaa_watchdog_start() argument
198 WARN_ON(timer_pending(&ehci->iaa_watchdog)); in iaa_watchdog_start()
199 mod_timer(&ehci->iaa_watchdog, in iaa_watchdog_start()
203 static inline void iaa_watchdog_done(struct ehci_hcd *ehci) in iaa_watchdog_done() argument
205 del_timer(&ehci->iaa_watchdog); in iaa_watchdog_done()
215 timer_action_done (struct ehci_hcd *ehci, enum ehci_timer_action action) in timer_action_done() argument
217 clear_bit (action, &ehci->actions); in timer_action_done()
220 static void free_cached_lists(struct ehci_hcd *ehci);
[all …]
Dehci-s5p.c71 struct ehci_hcd *ehci; in s5p_ehci_probe() local
135 ehci = hcd_to_ehci(hcd); in s5p_ehci_probe()
136 ehci->caps = hcd->regs; in s5p_ehci_probe()
137 ehci->regs = hcd->regs + in s5p_ehci_probe()
138 HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); in s5p_ehci_probe()
143 dbg_hcs_params(ehci, "reset"); in s5p_ehci_probe()
144 dbg_hcc_params(ehci, "reset"); in s5p_ehci_probe()
147 ehci->hcs_params = readl(&ehci->caps->hcs_params); in s5p_ehci_probe()
149 ehci_reset(ehci); in s5p_ehci_probe()
210 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in s5p_ehci_suspend() local
[all …]
Dehci-tegra.c35 struct ehci_hcd *ehci; member
66 struct ehci_hcd *ehci, in tegra_ehci_internal_port_reset() argument
76 spin_lock_irqsave(&ehci->lock, flags); in tegra_ehci_internal_port_reset()
77 saved_usbintr = ehci_readl(ehci, &ehci->regs->intr_enable); in tegra_ehci_internal_port_reset()
79 ehci_writel(ehci, 0, &ehci->regs->intr_enable); in tegra_ehci_internal_port_reset()
80 spin_unlock_irqrestore(&ehci->lock, flags); in tegra_ehci_internal_port_reset()
87 temp = ehci_readl(ehci, portsc_reg); in tegra_ehci_internal_port_reset()
89 ehci_writel(ehci, temp, portsc_reg); in tegra_ehci_internal_port_reset()
92 ehci_writel(ehci, temp, portsc_reg); in tegra_ehci_internal_port_reset()
103 temp = ehci_readl(ehci, portsc_reg); in tegra_ehci_internal_port_reset()
[all …]
Dehci-ppc-of.c23 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_ppc_of_setup() local
26 retval = ehci_halt(ehci); in ehci_ppc_of_setup()
34 ehci->sbrn = 0x20; in ehci_ppc_of_setup()
35 return ehci_reset(ehci); in ehci_ppc_of_setup()
112 struct ehci_hcd *ehci = NULL; in ehci_hcd_ppc_of_probe() local
155 ehci = hcd_to_ehci(hcd); in ehci_hcd_ppc_of_probe()
160 ehci->ohci_hcctrl_reg = ioremap(res.start + in ehci_hcd_ppc_of_probe()
164 if (!ehci->ohci_hcctrl_reg) { in ehci_hcd_ppc_of_probe()
167 ehci->has_amcc_usb23 = 1; in ehci_hcd_ppc_of_probe()
172 ehci->big_endian_mmio = 1; in ehci_hcd_ppc_of_probe()
[all …]
Dehci-pmcmsp.c43 static void usb_hcd_tdi_set_mode(struct ehci_hcd *ehci) in usb_hcd_tdi_set_mode() argument
49 struct ehci_regs *reg_base = ehci->regs; in usb_hcd_tdi_set_mode()
57 val = ehci_readl(ehci, (u32 *)base); in usb_hcd_tdi_set_mode()
58 ehci_writel(ehci, (val | USB_CTRL_MODE_STREAM_DISABLE), in usb_hcd_tdi_set_mode()
62 val = ehci_readl(ehci, (u32 *)statreg); in usb_hcd_tdi_set_mode()
64 ehci_writel(ehci, val, (u32 *)statreg); in usb_hcd_tdi_set_mode()
67 ehci_writel(ehci, USB_CTRL_FIFO_THRESH, (u32 *)fiforeg); in usb_hcd_tdi_set_mode()
79 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_msp_setup() local
81 ehci->big_endian_mmio = 1; in ehci_msp_setup()
82 ehci->big_endian_desc = 1; in ehci_msp_setup()
[all …]
Dehci-grlib.c40 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_grlib_setup() local
43 retval = ehci_halt(ehci); in ehci_grlib_setup()
51 ehci->sbrn = 0x20; in ehci_grlib_setup()
52 ehci_port_power(ehci, 1); in ehci_grlib_setup()
54 return ehci_reset(ehci); in ehci_grlib_setup()
110 struct ehci_hcd *ehci = NULL; in ehci_hcd_grlib_probe() local
155 ehci = hcd_to_ehci(hcd); in ehci_hcd_grlib_probe()
157 ehci->caps = hcd->regs; in ehci_hcd_grlib_probe()
160 hc_capbase = ehci_readl(ehci, &ehci->caps->hc_capbase); in ehci_hcd_grlib_probe()
161 if (HC_VERSION(ehci, hc_capbase) != GRUSBHC_HCIVERSION) { in ehci_hcd_grlib_probe()
[all …]
Dehci-w90x900.c25 struct ehci_hcd *ehci; in usb_w90x900_probe() local
57 ehci = hcd_to_ehci(hcd); in usb_w90x900_probe()
58 ehci->caps = hcd->regs; in usb_w90x900_probe()
59 ehci->regs = hcd->regs + in usb_w90x900_probe()
60 HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in usb_w90x900_probe()
66 val = __raw_readl(ehci->regs+PHY0_CTR); in usb_w90x900_probe()
68 __raw_writel(val, ehci->regs+PHY0_CTR); in usb_w90x900_probe()
70 val = __raw_readl(ehci->regs+PHY1_CTR); in usb_w90x900_probe()
72 __raw_writel(val, ehci->regs+PHY1_CTR); in usb_w90x900_probe()
74 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); in usb_w90x900_probe()
[all …]
Dehci-vt8500.c23 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_update_device() local
29 if (ehci->has_lpm && !udev->parent->parent) { in ehci_update_device()
30 rc = ehci_lpm_set_da(ehci, udev->devnum, udev->portnum); in ehci_update_device()
32 rc = ehci_lpm_check(ehci, udev->portnum); in ehci_update_device()
90 struct ehci_hcd *ehci; in vt8500_ehci_drv_probe() local
122 ehci = hcd_to_ehci(hcd); in vt8500_ehci_drv_probe()
123 ehci->caps = hcd->regs; in vt8500_ehci_drv_probe()
124 ehci->regs = hcd->regs + in vt8500_ehci_drv_probe()
125 HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); in vt8500_ehci_drv_probe()
127 dbg_hcs_params(ehci, "reset"); in vt8500_ehci_drv_probe()
[all …]
Dehci-xilinx-of.c42 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_xilinx_of_setup() local
45 retval = ehci_halt(ehci); in ehci_xilinx_of_setup()
53 ehci->sbrn = 0x20; in ehci_xilinx_of_setup()
55 return ehci_reset(ehci); in ehci_xilinx_of_setup()
156 struct ehci_hcd *ehci; in ehci_hcd_xilinx_of_probe() local
199 ehci = hcd_to_ehci(hcd); in ehci_hcd_xilinx_of_probe()
204 ehci->big_endian_mmio = 1; in ehci_hcd_xilinx_of_probe()
205 ehci->big_endian_desc = 1; in ehci_hcd_xilinx_of_probe()
211 ehci_dbg(ehci, "USB host controller supports FS devices\n"); in ehci_hcd_xilinx_of_probe()
214 ehci_dbg(ehci, in ehci_hcd_xilinx_of_probe()
[all …]
Dehci-xls.c18 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_xls_setup() local
20 ehci->caps = hcd->regs; in ehci_xls_setup()
21 ehci->regs = hcd->regs + in ehci_xls_setup()
22 HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in ehci_xls_setup()
23 dbg_hcs_params(ehci, "reset"); in ehci_xls_setup()
24 dbg_hcc_params(ehci, "reset"); in ehci_xls_setup()
27 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); in ehci_xls_setup()
29 retval = ehci_halt(ehci); in ehci_xls_setup()
38 ehci_reset(ehci); in ehci_xls_setup()
Dehci-ixp4xx.c18 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ixp4xx_ehci_init() local
21 ehci->big_endian_desc = 1; in ixp4xx_ehci_init()
22 ehci->big_endian_mmio = 1; in ixp4xx_ehci_init()
24 ehci->caps = hcd->regs + 0x100; in ixp4xx_ehci_init()
25 ehci->regs = hcd->regs + 0x100 in ixp4xx_ehci_init()
26 + HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in ixp4xx_ehci_init()
27 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); in ixp4xx_ehci_init()
30 ehci_reset(ehci); in ixp4xx_ehci_init()
36 ehci_port_power(ehci, 0); in ixp4xx_ehci_init()
Dehci-ps3.c24 static void ps3_ehci_setup_insnreg(struct ehci_hcd *ehci) in ps3_ehci_setup_insnreg() argument
43 writel_be(0x01000020, (void __iomem *)ehci->regs + in ps3_ehci_setup_insnreg()
48 writel_be(0x00000001, (void __iomem *)ehci->regs + in ps3_ehci_setup_insnreg()
55 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ps3_ehci_hc_reset() local
57 ehci->big_endian_mmio = 1; in ps3_ehci_hc_reset()
59 ehci->caps = hcd->regs; in ps3_ehci_hc_reset()
60 ehci->regs = hcd->regs + HC_LENGTH(ehci, ehci_readl(ehci, in ps3_ehci_hc_reset()
61 &ehci->caps->hc_capbase)); in ps3_ehci_hc_reset()
63 dbg_hcs_params(ehci, "reset"); in ps3_ehci_hc_reset()
64 dbg_hcc_params(ehci, "reset"); in ps3_ehci_hc_reset()
[all …]
Dehci-atmel.c55 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_atmel_setup() local
59 ehci->caps = hcd->regs; in ehci_atmel_setup()
60 ehci->regs = hcd->regs + in ehci_atmel_setup()
61 HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in ehci_atmel_setup()
62 dbg_hcs_params(ehci, "reset"); in ehci_atmel_setup()
63 dbg_hcc_params(ehci, "reset"); in ehci_atmel_setup()
66 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); in ehci_atmel_setup()
68 retval = ehci_halt(ehci); in ehci_atmel_setup()
77 ehci->sbrn = 0x20; in ehci_atmel_setup()
79 ehci_reset(ehci); in ehci_atmel_setup()
[all …]

123