summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/acpi.c4
-rw-r--r--common/usb_port_power_dumb.c4
-rw-r--r--common/usb_port_power_smart.c6
-rw-r--r--include/usb_charge.h10
4 files changed, 10 insertions, 14 deletions
diff --git a/common/acpi.c b/common/acpi.c
index 87e9c4fd27..3413a44e81 100644
--- a/common/acpi.c
+++ b/common/acpi.c
@@ -50,10 +50,6 @@ static int current_dptf_profile = DPTF_PROFILE_DEFAULT;
#endif
-#ifdef CONFIG_USB_PORT_POWER_DUMB
-extern const int usb_port_enable[USB_PORT_COUNT];
-#endif
-
/*
* Keep a read cache of four bytes when burst mode is enabled, which is the
* size of the largest non-string memmap data type.
diff --git a/common/usb_port_power_dumb.c b/common/usb_port_power_dumb.c
index 5cdf6005a6..4275f2d90e 100644
--- a/common/usb_port_power_dumb.c
+++ b/common/usb_port_power_dumb.c
@@ -18,11 +18,7 @@
#define CPUTS(outstr) cputs(CC_USBCHARGE, outstr)
#define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args)
-#define USB_SYSJUMP_TAG 0x5550 /* "UP" - Usb Port */
-#define USB_HOOK_VERSION 1
-
static uint8_t charge_mode[USB_PORT_COUNT];
-extern const int usb_port_enable[USB_PORT_COUNT];
static void usb_port_set_enabled(int port_id, int en)
{
diff --git a/common/usb_port_power_smart.c b/common/usb_port_power_smart.c
index 59474ff7fe..170180cbab 100644
--- a/common/usb_port_power_smart.c
+++ b/common/usb_port_power_smart.c
@@ -18,9 +18,6 @@
#define CPUTS(outstr) cputs(CC_USBCHARGE, outstr)
#define CPRINTS(format, args...) cprints(CC_USBCHARGE, format, ## args)
-#define USB_SYSJUMP_TAG 0x5550 /* "UP" - Usb Port */
-#define USB_HOOK_VERSION 1
-
#ifndef CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE
#define CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE USB_CHARGE_MODE_SDP2
#endif
@@ -32,9 +29,6 @@ struct charge_mode_t {
static struct charge_mode_t charge_mode[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT];
-/* GPIOs to enable/disable USB ports. Board specific. */
-extern const int usb_port_enable[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT];
-
#ifdef CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY
/*
* If we only support CDP and SDP, the control signals are hard-wired so
diff --git a/include/usb_charge.h b/include/usb_charge.h
index 867a6e4ba6..7445e7b0ab 100644
--- a/include/usb_charge.h
+++ b/include/usb_charge.h
@@ -16,6 +16,16 @@
/* USB charger minimum current */
#define USB_CHARGER_MIN_CURR_MA 500
+#define USB_SYSJUMP_TAG 0x5550 /* "UP" - Usb Port */
+#define USB_HOOK_VERSION 1
+
+/* GPIOs to enable/disable USB ports. Board specific. */
+#ifdef CONFIG_USB_PORT_POWER_SMART
+extern const int usb_port_enable[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT];
+#elif defined(CONFIG_USB_PORT_POWER_DUMB)
+extern const int usb_port_enable[USB_PORT_COUNT];
+#endif
+
/**
* Set USB charge mode for the port.
*