summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2013-08-09 04:27:35 -0700
committerIsaac Christensen <isaac.christensen@se-eng.com>2014-08-05 18:44:08 +0200
commit1ee2c6dbdfe7e35ab5e25a6136eab824ed2fec8f (patch)
treefabae429ff872caed315281a0c243fa0bd753565 /payloads/libpayload/drivers/usb
parentb77431336e44ba9721f18220e2a7dedafe250528 (diff)
downloadcoreboot-1ee2c6dbdfe7e35ab5e25a6136eab824ed2fec8f.tar.xz
libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig.
When libpayload header files are included in the payload itself, it's possible that the payloads config settings will conflict with the ones in libpayload. It's also possible for the libpayload config settings to conflict with the payloads. To avoid that, the libpayload config settings have _LP_ (for libpayload) added to them. The symbols themselves as defined in the Config.in files are still the same, but the prefix added to them is now CONFIG_LP_ instead of just CONFIG_. Change-Id: Ib8a46d202e7880afdeac7924d69a949bfbcc5f97 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/65303 Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Gabe Black <gabeblack@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> (cherry picked from commit 23e866da20862cace0ed2a67d6fb74056bc9ea9a) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6427 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'payloads/libpayload/drivers/usb')
-rw-r--r--payloads/libpayload/drivers/usb/ehci.c2
-rw-r--r--payloads/libpayload/drivers/usb/ohci.c2
-rw-r--r--payloads/libpayload/drivers/usb/usb.c6
-rw-r--r--payloads/libpayload/drivers/usb/usbhid.c2
-rw-r--r--payloads/libpayload/drivers/usb/usbinit.c28
-rw-r--r--payloads/libpayload/drivers/usb/xhci.c6
-rw-r--r--payloads/libpayload/drivers/usb/xhci_private.h2
7 files changed, 24 insertions, 24 deletions
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c
index 82802a7f0d..b9837017e4 100644
--- a/payloads/libpayload/drivers/usb/ehci.c
+++ b/payloads/libpayload/drivers/usb/ehci.c
@@ -805,7 +805,7 @@ ehci_init (unsigned long physical_bar)
return controller;
}
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
hci_t *
ehci_pci_init (pcidev_t addr)
{
diff --git a/payloads/libpayload/drivers/usb/ohci.c b/payloads/libpayload/drivers/usb/ohci.c
index 9f15dd0930..0683de3c5d 100644
--- a/payloads/libpayload/drivers/usb/ohci.c
+++ b/payloads/libpayload/drivers/usb/ohci.c
@@ -251,7 +251,7 @@ ohci_init (unsigned long physical_bar)
return controller;
}
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
hci_t *
ohci_pci_init (pcidev_t addr)
{
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c
index 47f8eb6e3a..6b54dbbada 100644
--- a/payloads/libpayload/drivers/usb/usb.c
+++ b/payloads/libpayload/drivers/usb/usb.c
@@ -464,7 +464,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
break;
case hid_device:
usb_debug ("HID\n");
-#ifdef CONFIG_USB_HID
+#ifdef CONFIG_LP_USB_HID
controller->devices[adr]->init = usb_hid_init;
return adr;
#else
@@ -482,7 +482,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
break;
case msc_device:
usb_debug ("MSC\n");
-#ifdef CONFIG_USB_MSC
+#ifdef CONFIG_LP_USB_MSC
controller->devices[adr]->init = usb_msc_init;
return adr;
#else
@@ -491,7 +491,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
break;
case hub_device:
usb_debug ("hub\n");
-#ifdef CONFIG_USB_HUB
+#ifdef CONFIG_LP_USB_HUB
controller->devices[adr]->init = usb_hub_init;
return adr;
#else
diff --git a/payloads/libpayload/drivers/usb/usbhid.c b/payloads/libpayload/drivers/usb/usbhid.c
index b8c04f1d1a..51c3d46c25 100644
--- a/payloads/libpayload/drivers/usb/usbhid.c
+++ b/payloads/libpayload/drivers/usb/usbhid.c
@@ -138,7 +138,7 @@ struct layout_maps {
static const struct layout_maps *map;
static const struct layout_maps keyboard_layouts[] = {
-// #ifdef CONFIG_PC_KEYBOARD_LAYOUT_US
+// #ifdef CONFIG_LP_PC_KEYBOARD_LAYOUT_US
{ .country = "us", .map = {
{ /* No modifier */
-1, -1, -1, -1, 'a', 'b', 'c', 'd',
diff --git a/payloads/libpayload/drivers/usb/usbinit.c b/payloads/libpayload/drivers/usb/usbinit.c
index ca0bf76866..90c31d7ef5 100644
--- a/payloads/libpayload/drivers/usb/usbinit.c
+++ b/payloads/libpayload/drivers/usb/usbinit.c
@@ -36,7 +36,7 @@
#include "xhci.h"
#include <usb/usbdisk.h>
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
/**
* Initializes USB controller attached to PCI
*
@@ -71,7 +71,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
pciid >> 16, pciid & 0xFFFF, func);
switch (prog_if) {
case 0x00:
-#ifdef CONFIG_USB_UHCI
+#ifdef CONFIG_LP_USB_UHCI
usb_debug("UHCI controller\n");
uhci_pci_init (pci_device);
#else
@@ -80,7 +80,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
break;
case 0x10:
-#ifdef CONFIG_USB_OHCI
+#ifdef CONFIG_LP_USB_OHCI
usb_debug("OHCI controller\n");
ohci_pci_init(pci_device);
#else
@@ -89,7 +89,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
break;
case 0x20:
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_LP_USB_EHCI
usb_debug("EHCI controller\n");
ehci_pci_init(pci_device);
#else
@@ -98,7 +98,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
break;
case 0x30:
-#ifdef CONFIG_USB_XHCI
+#ifdef CONFIG_LP_USB_XHCI
usb_debug("xHCI controller\n");
xhci_pci_init(pci_device);
#else
@@ -156,17 +156,17 @@ static void usb_scan_pci_bus(int bus)
}
#endif
-#ifdef CONFIG_USB_MEMORY
+#ifdef CONFIG_LP_USB_MEMORY
static void usb_scan_memory(void)
{
-#ifdef CONFIG_USB_XHCI
- xhci_init(CONFIG_USB_XHCI_BASE_ADDRESS);
+#ifdef CONFIG_LP_USB_XHCI
+ xhci_init(CONFIG_LP_USB_XHCI_BASE_ADDRESS);
#endif
-#ifdef CONFIG_USB_EHCI
- ehci_init(CONFIG_USB_EHCI_BASE_ADDRESS);
+#ifdef CONFIG_LP_USB_EHCI
+ ehci_init(CONFIG_LP_USB_EHCI_BASE_ADDRESS);
#endif
-#ifdef CONFIG_USB_OHCI
- ohci_init(CONFIG_USB_OHCI_BASE_ADDRESS);
+#ifdef CONFIG_LP_USB_OHCI
+ ohci_init(CONFIG_LP_USB_OHCI_BASE_ADDRESS);
#endif
}
#endif
@@ -176,10 +176,10 @@ static void usb_scan_memory(void)
*/
int usb_initialize(void)
{
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
usb_scan_pci_bus(0);
#endif
-#ifdef CONFIG_USB_MEMORY
+#ifdef CONFIG_LP_USB_MEMORY
usb_scan_memory();
#endif
return 0;
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 0bd54c7d74..2e9dd3b912 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -297,7 +297,7 @@ _free_controller:
return NULL;
}
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
hci_t *
xhci_pci_init (pcidev_t addr)
{
@@ -344,8 +344,8 @@ xhci_reinit (hci_t *controller)
return;
/* Enable all available slots */
- xhci->opreg->config = xhci->capreg->MaxSlots & CONFIG_MASK_MaxSlotsEn;
- xhci->max_slots_en = xhci->capreg->MaxSlots & CONFIG_MASK_MaxSlotsEn;
+ xhci->opreg->config = xhci->capreg->MaxSlots & CONFIG_LP_MASK_MaxSlotsEn;
+ xhci->max_slots_en = xhci->capreg->MaxSlots & CONFIG_LP_MASK_MaxSlotsEn;
/* Set DCBAA */
xhci->opreg->dcbaap_lo = virt_to_phys(xhci->dcbaa);
diff --git a/payloads/libpayload/drivers/usb/xhci_private.h b/payloads/libpayload/drivers/usb/xhci_private.h
index 6f7893ee31..945c7f1982 100644
--- a/payloads/libpayload/drivers/usb/xhci_private.h
+++ b/payloads/libpayload/drivers/usb/xhci_private.h
@@ -389,7 +389,7 @@ typedef struct xhci {
u32 dcbaap_lo;
u32 dcbaap_hi;
u32 config;
-#define CONFIG_MASK_MaxSlotsEn 0xff
+#define CONFIG_LP_MASK_MaxSlotsEn 0xff
u8 res3[0x3ff-0x3c+1];
struct {
u32 portsc;