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>
This commit is contained in:
committed by
Patrick Georgi
parent
b431833c12
commit
eab2a29c8b
@@ -850,7 +850,7 @@ ehci_init (unsigned long physical_bar)
|
||||
return controller;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_LP_USB_PCI)
|
||||
#if CONFIG(LP_USB_PCI)
|
||||
hci_t *
|
||||
ehci_pci_init (pcidev_t addr)
|
||||
{
|
||||
|
@@ -102,7 +102,7 @@ ehci_rh_scanport (usbdev_t *dev, int port)
|
||||
/* device connected, handle */
|
||||
if (RH_INST(dev)->ports[port] & P_CURR_CONN_STATUS) {
|
||||
mdelay(100); // usb20 spec 9.1.2
|
||||
if (!IS_ENABLED(CONFIG_LP_USB_EHCI_HOSTPC_ROOT_HUB_TT) &&
|
||||
if (!CONFIG(LP_USB_EHCI_HOSTPC_ROOT_HUB_TT) &&
|
||||
(RH_INST(dev)->ports[port] & P_LINE_STATUS) ==
|
||||
P_LINE_STATUS_LOWSPEED) {
|
||||
ehci_rh_hand_over_port(dev, port);
|
||||
@@ -138,7 +138,7 @@ ehci_rh_scanport (usbdev_t *dev, int port)
|
||||
ehci_rh_hand_over_port(dev, port);
|
||||
return;
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_LP_USB_EHCI_HOSTPC_ROOT_HUB_TT)) {
|
||||
if (CONFIG(LP_USB_EHCI_HOSTPC_ROOT_HUB_TT)) {
|
||||
port_speed = (usb_speed)
|
||||
((EHCI_INST(dev->controller)->operation->hostpc
|
||||
>> 25) & 0x03);
|
||||
|
@@ -247,7 +247,7 @@ ohci_init (unsigned long physical_bar)
|
||||
return controller;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_LP_USB_PCI)
|
||||
#if CONFIG(LP_USB_PCI)
|
||||
hci_t *
|
||||
ohci_pci_init (pcidev_t addr)
|
||||
{
|
||||
|
@@ -563,7 +563,7 @@ set_address (hci_t *controller, usb_speed speed, int hubport, int hubaddr)
|
||||
break;
|
||||
case hid_device:
|
||||
usb_debug ("HID\n");
|
||||
#if IS_ENABLED(CONFIG_LP_USB_HID)
|
||||
#if CONFIG(LP_USB_HID)
|
||||
dev->init = usb_hid_init;
|
||||
return dev->address;
|
||||
#else
|
||||
@@ -581,7 +581,7 @@ set_address (hci_t *controller, usb_speed speed, int hubport, int hubaddr)
|
||||
break;
|
||||
case msc_device:
|
||||
usb_debug ("MSC\n");
|
||||
#if IS_ENABLED(CONFIG_LP_USB_MSC)
|
||||
#if CONFIG(LP_USB_MSC)
|
||||
dev->init = usb_msc_init;
|
||||
return dev->address;
|
||||
#else
|
||||
@@ -590,7 +590,7 @@ set_address (hci_t *controller, usb_speed speed, int hubport, int hubaddr)
|
||||
break;
|
||||
case hub_device:
|
||||
usb_debug ("hub\n");
|
||||
#if IS_ENABLED(CONFIG_LP_USB_HUB)
|
||||
#if CONFIG(LP_USB_HUB)
|
||||
dev->init = usb_hub_init;
|
||||
return dev->address;
|
||||
#else
|
||||
|
@@ -142,7 +142,7 @@ struct layout_maps {
|
||||
static const struct layout_maps *map;
|
||||
|
||||
static const struct layout_maps keyboard_layouts[] = {
|
||||
// #if IS_ENABLED(CONFIG_LP_PC_KEYBOARD_LAYOUT_US)
|
||||
// #if CONFIG(LP_PC_KEYBOARD_LAYOUT_US)
|
||||
{ .country = "us", .map = {
|
||||
{ /* No modifier */
|
||||
-1, -1, -1, -1, 'a', 'b', 'c', 'd',
|
||||
|
@@ -37,7 +37,7 @@
|
||||
#include "dwc2.h"
|
||||
#include <usb/usbdisk.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_LP_USB_PCI)
|
||||
#if CONFIG(LP_USB_PCI)
|
||||
/**
|
||||
* Initializes USB controller attached to PCI
|
||||
*
|
||||
@@ -72,7 +72,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
|
||||
pciid >> 16, pciid & 0xFFFF, func);
|
||||
switch (prog_if) {
|
||||
case 0x00:
|
||||
#if IS_ENABLED(CONFIG_LP_USB_UHCI)
|
||||
#if CONFIG(LP_USB_UHCI)
|
||||
usb_debug("UHCI controller\n");
|
||||
uhci_pci_init (pci_device);
|
||||
#else
|
||||
@@ -81,7 +81,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
|
||||
break;
|
||||
|
||||
case 0x10:
|
||||
#if IS_ENABLED(CONFIG_LP_USB_OHCI)
|
||||
#if CONFIG(LP_USB_OHCI)
|
||||
usb_debug("OHCI controller\n");
|
||||
ohci_pci_init(pci_device);
|
||||
#else
|
||||
@@ -90,7 +90,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
|
||||
break;
|
||||
|
||||
case 0x20:
|
||||
#if IS_ENABLED(CONFIG_LP_USB_EHCI)
|
||||
#if CONFIG(LP_USB_EHCI)
|
||||
usb_debug("EHCI controller\n");
|
||||
ehci_pci_init(pci_device);
|
||||
#else
|
||||
@@ -99,7 +99,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
|
||||
break;
|
||||
|
||||
case 0x30:
|
||||
#if IS_ENABLED(CONFIG_LP_USB_XHCI)
|
||||
#if CONFIG(LP_USB_XHCI)
|
||||
usb_debug("xHCI controller\n");
|
||||
xhci_pci_init(pci_device);
|
||||
#else
|
||||
@@ -166,7 +166,7 @@ static void usb_scan_pci_bus(int bus)
|
||||
*/
|
||||
int usb_initialize(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_LP_USB_PCI)
|
||||
#if CONFIG(LP_USB_PCI)
|
||||
usb_scan_pci_bus(0);
|
||||
#endif
|
||||
return 0;
|
||||
@@ -175,19 +175,19 @@ int usb_initialize(void)
|
||||
hci_t *usb_add_mmio_hc(hc_type type, void *bar)
|
||||
{
|
||||
switch (type) {
|
||||
#if IS_ENABLED(CONFIG_LP_USB_OHCI)
|
||||
#if CONFIG(LP_USB_OHCI)
|
||||
case OHCI:
|
||||
return ohci_init((unsigned long)bar);
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_LP_USB_EHCI)
|
||||
#if CONFIG(LP_USB_EHCI)
|
||||
case EHCI:
|
||||
return ehci_init((unsigned long)bar);
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_LP_USB_DWC2)
|
||||
#if CONFIG(LP_USB_DWC2)
|
||||
case DWC2:
|
||||
return dwc2_init(bar);
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_LP_USB_XHCI)
|
||||
#if CONFIG(LP_USB_XHCI)
|
||||
case XHCI:
|
||||
return xhci_init((unsigned long)bar);
|
||||
#endif
|
||||
|
@@ -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
|
||||
|
@@ -353,7 +353,7 @@ xhci_finish_ep_config(const endpoint_t *const ep, inputctx_t *const ic)
|
||||
EC_SET(AVRTRB, epctx, avrtrb);
|
||||
EC_SET(MXESIT, epctx, EC_GET(MPS, epctx) * EC_GET(MBS, epctx));
|
||||
|
||||
if (IS_ENABLED(CONFIG_LP_USB_XHCI_MTK_QUIRK)) {
|
||||
if (CONFIG(LP_USB_XHCI_MTK_QUIRK)) {
|
||||
/* The MTK xHCI defines some extra SW parameters which are
|
||||
* put into reserved DWs in Slot and Endpoint Contexts for
|
||||
* synchronous endpoints. But for non-isochronous transfers,
|
||||
|
@@ -122,7 +122,7 @@ xhci_rh_reset_port(usbdev_t *const dev, const int port)
|
||||
static int
|
||||
xhci_rh_enable_port(usbdev_t *const dev, int port)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_LP_USB_XHCI_MTK_QUIRK)) {
|
||||
if (CONFIG(LP_USB_XHCI_MTK_QUIRK)) {
|
||||
xhci_t *const xhci = XHCI_INST(dev->controller);
|
||||
volatile u32 *const portsc =
|
||||
&xhci->opreg->prs[port - 1].portsc;
|
||||
|
Reference in New Issue
Block a user