aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb/xhci.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-03-05 16:55:15 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-03-07 17:15:30 +0000
commiteab2a29c8bb0fafebd398cf60425dee37df27820 (patch)
tree419dab747e0148442c1a7ac7082fcfe37784ea27 /payloads/libpayload/drivers/usb/xhci.c
parentb431833c129e0d6402c6f7be8e6028e4b54e94fb (diff)
payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX)
This patch is a raw application of find payloads/ -type f | \ xargs sed -i -e 's/IS_ENABLED\s*(CONFIG_/CONFIG(/g' Change-Id: I883b03b189f59b5d998a09a2596b0391a2d5cf33 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31775 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/libpayload/drivers/usb/xhci.c')
-rw-r--r--payloads/libpayload/drivers/usb/xhci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 3f1064a405..0a69c5137b 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -88,7 +88,7 @@ xhci_init_cycle_ring(transfer_ring_t *const tr, const size_t ring_size)
}
/* On Panther Point: switch ports shared with EHCI to xHCI */
-#if IS_ENABLED(CONFIG_LP_USB_PCI)
+#if CONFIG(LP_USB_PCI)
static void
xhci_switch_ppt_ports(pcidev_t addr)
{
@@ -112,7 +112,7 @@ xhci_switch_ppt_ports(pcidev_t addr)
}
#endif
-#if IS_ENABLED(CONFIG_LP_USB_PCI)
+#if CONFIG(LP_USB_PCI)
/* On Panther Point: switch all ports back to EHCI */
static void
xhci_switchback_ppt_ports(pcidev_t addr)
@@ -297,7 +297,7 @@ _free_xhci:
return NULL;
}
-#if IS_ENABLED(CONFIG_LP_USB_PCI)
+#if CONFIG(LP_USB_PCI)
hci_t *
xhci_pci_init (pcidev_t addr)
{
@@ -336,7 +336,7 @@ xhci_reset(hci_t *const controller)
* Without this delay, the subsequent HC register access,
* may result in a system hang very rarely.
*/
- if (IS_ENABLED(CONFIG_LP_ARCH_X86))
+ if (CONFIG(LP_ARCH_X86))
mdelay(1);
xhci_debug("Resetting controller... ");
@@ -426,7 +426,7 @@ xhci_shutdown(hci_t *const controller)
xhci_t *const xhci = XHCI_INST(controller);
xhci_stop(controller);
-#if IS_ENABLED(CONFIG_LP_USB_PCI)
+#if CONFIG(LP_USB_PCI)
if (controller->pcidev)
xhci_switchback_ppt_ports(controller->pcidev);
#endif
@@ -563,7 +563,7 @@ xhci_enqueue_td(transfer_ring_t *const tr, const int ep, const size_t mps,
cur_length = length;
packets = 0;
length = 0;
- } else if (!IS_ENABLED(CONFIG_LP_USB_XHCI_MTK_QUIRK)) {
+ } else if (!CONFIG(LP_USB_XHCI_MTK_QUIRK)) {
packets -= (residue + cur_length) / mps;
residue = (residue + cur_length) % mps;
length -= cur_length;
@@ -576,7 +576,7 @@ xhci_enqueue_td(transfer_ring_t *const tr, const int ep, const size_t mps,
TRB_SET(TDS, trb, MIN(TRB_MAX_TD_SIZE, packets));
TRB_SET(CH, trb, 1);
- if (length && IS_ENABLED(CONFIG_LP_USB_XHCI_MTK_QUIRK)) {
+ if (length && CONFIG(LP_USB_XHCI_MTK_QUIRK)) {
/*
* For MTK's xHCI controller, TDS defines a number of
* packets that remain to be transferred for a TD after