aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/fhci-hub.c
diff options
context:
space:
mode:
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>2012-06-23 20:24:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-26 22:42:11 -0400
commitcf61fdb944534ffa84a824bb8c31a3826cdc169d (patch)
tree004e5d2727ec34ade7bd2ac62f3cf6979de47049 /drivers/usb/host/fhci-hub.c
parent023b515e5b304122f3802abaa68d1da46fdf48b8 (diff)
USB: FHCI: Reusing QUICC Engine USB Controller registers from immap_qe.h
The struct fhci_regs (in drivers/usb/host/fhci.h) is basically a redefinition of the struct qe_usb_ctlr (in arch/powerpc/include/asm/immap_qe.h). The qe_usb_ctlr struct is preferrable once it uses accurately the registers' names found in the Freescale's QUICC Engine Block Reference Manuals (QEIWRM.pdf Rev.4.4 Chapter 19 for MPC836xE series and MPC8323ERM.pdf Rev.2 Chapter 36 for MPC832xE series), making easier to map the FHCI device driver to the hardware manual. Also, as the FHCI driver uses the USB Controller registers, the name qe_usb_ctlr is a more precise representation of the hardware than fhci_regs. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/fhci-hub.c')
-rw-r--r--drivers/usb/host/fhci-hub.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/host/fhci-hub.c b/drivers/usb/host/fhci-hub.c
index 348fe62e94f7..6af2512f8378 100644
--- a/drivers/usb/host/fhci-hub.c
+++ b/drivers/usb/host/fhci-hub.c
@@ -97,7 +97,7 @@ void fhci_port_disable(struct fhci_hcd *fhci)
97 97
98 /* Enable IDLE since we want to know if something comes along */ 98 /* Enable IDLE since we want to know if something comes along */
99 usb->saved_msk |= USB_E_IDLE_MASK; 99 usb->saved_msk |= USB_E_IDLE_MASK;
100 out_be16(&usb->fhci->regs->usb_mask, usb->saved_msk); 100 out_be16(&usb->fhci->regs->usb_usbmr, usb->saved_msk);
101 101
102 /* check if during the disconnection process attached new device */ 102 /* check if during the disconnection process attached new device */
103 if (port_status == FHCI_PORT_WAITING) 103 if (port_status == FHCI_PORT_WAITING)
@@ -158,21 +158,21 @@ void fhci_port_reset(void *lld)
158 158
159 fhci_stop_sof_timer(fhci); 159 fhci_stop_sof_timer(fhci);
160 /* disable the USB controller */ 160 /* disable the USB controller */
161 mode = in_8(&fhci->regs->usb_mod); 161 mode = in_8(&fhci->regs->usb_usmod);
162 out_8(&fhci->regs->usb_mod, mode & (~USB_MODE_EN)); 162 out_8(&fhci->regs->usb_usmod, mode & (~USB_MODE_EN));
163 163
164 /* disable idle interrupts */ 164 /* disable idle interrupts */
165 mask = in_be16(&fhci->regs->usb_mask); 165 mask = in_be16(&fhci->regs->usb_usbmr);
166 out_be16(&fhci->regs->usb_mask, mask & (~USB_E_IDLE_MASK)); 166 out_be16(&fhci->regs->usb_usbmr, mask & (~USB_E_IDLE_MASK));
167 167
168 fhci_io_port_generate_reset(fhci); 168 fhci_io_port_generate_reset(fhci);
169 169
170 /* enable interrupt on this endpoint */ 170 /* enable interrupt on this endpoint */
171 out_be16(&fhci->regs->usb_mask, mask); 171 out_be16(&fhci->regs->usb_usbmr, mask);
172 172
173 /* enable the USB controller */ 173 /* enable the USB controller */
174 mode = in_8(&fhci->regs->usb_mod); 174 mode = in_8(&fhci->regs->usb_usmod);
175 out_8(&fhci->regs->usb_mod, mode | USB_MODE_EN); 175 out_8(&fhci->regs->usb_usmod, mode | USB_MODE_EN);
176 fhci_start_sof_timer(fhci); 176 fhci_start_sof_timer(fhci);
177 177
178 fhci_dbg(fhci, "<- %s\n", __func__); 178 fhci_dbg(fhci, "<- %s\n", __func__);