diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2013-05-23 10:14:29 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2013-06-05 19:47:21 -0400 |
commit | b6e76371c888f5cb677f190a28444ac8875359ad (patch) | |
tree | 99112834cb69e1c6c7d0e933fb19a7235d029d2c /drivers/usb/host/xhci.c | |
parent | b630d4b9d05ba2e66878ca4614946d0f950d4111 (diff) |
usb: xhci: define port register names and use them instead of magic numbers
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index df5e881e3bc5..31ce422af00a 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -3911,7 +3911,7 @@ static int xhci_usb2_software_lpm_test(struct usb_hcd *hcd, | |||
3911 | * Check device's USB 2.0 extension descriptor to determine whether | 3911 | * Check device's USB 2.0 extension descriptor to determine whether |
3912 | * HIRD or BESL shoule be used. See USB2.0 LPM errata. | 3912 | * HIRD or BESL shoule be used. See USB2.0 LPM errata. |
3913 | */ | 3913 | */ |
3914 | pm_addr = port_array[port_num] + 1; | 3914 | pm_addr = port_array[port_num] + PORTPMSC; |
3915 | hird = xhci_calculate_hird_besl(xhci, udev); | 3915 | hird = xhci_calculate_hird_besl(xhci, udev); |
3916 | temp = PORT_L1DS(udev->slot_id) | PORT_HIRD(hird); | 3916 | temp = PORT_L1DS(udev->slot_id) | PORT_HIRD(hird); |
3917 | xhci_writel(xhci, temp, pm_addr); | 3917 | xhci_writel(xhci, temp, pm_addr); |
@@ -4009,7 +4009,7 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, | |||
4009 | 4009 | ||
4010 | port_array = xhci->usb2_ports; | 4010 | port_array = xhci->usb2_ports; |
4011 | port_num = udev->portnum - 1; | 4011 | port_num = udev->portnum - 1; |
4012 | pm_addr = port_array[port_num] + 1; | 4012 | pm_addr = port_array[port_num] + PORTPMSC; |
4013 | temp = xhci_readl(xhci, pm_addr); | 4013 | temp = xhci_readl(xhci, pm_addr); |
4014 | 4014 | ||
4015 | xhci_dbg(xhci, "%s port %d USB2 hardware LPM\n", | 4015 | xhci_dbg(xhci, "%s port %d USB2 hardware LPM\n", |