summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/exynos5-common.h2
-rw-r--r--include/configs/exynos5-dt-common.h3
-rw-r--r--include/configs/mx6sxsabresd.h2
-rw-r--r--include/configs/odroid.h2
-rw-r--r--include/configs/peach-pi.h1
-rw-r--r--include/configs/peach-pit.h1
-rw-r--r--include/configs/sandbox.h4
-rw-r--r--include/configs/snow.h2
-rw-r--r--include/debug_uart.h139
-rw-r--r--include/dm/device-internal.h4
10 files changed, 145 insertions, 15 deletions
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index 0ba39a23dd..3ab8d559bf 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -126,6 +126,8 @@
#define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)
/* I2C */
+
+/* TODO(sjg@chromium.org): Move these two options to Kconfig */
#define CONFIG_DM_I2C
#define CONFIG_DM_I2C_COMPAT
#define CONFIG_CMD_I2C
diff --git a/include/configs/exynos5-dt-common.h b/include/configs/exynos5-dt-common.h
index 9cef0b0a38..b1b8e1ace7 100644
--- a/include/configs/exynos5-dt-common.h
+++ b/include/configs/exynos5-dt-common.h
@@ -24,9 +24,6 @@
#define CONFIG_POWER_TPS65090
/* Enable keyboard */
-#define CONFIG_CROS_EC /* CROS_EC protocol */
-#define CONFIG_CROS_EC_KEYB /* CROS_EC keyboard input */
-#define CONFIG_CMD_CROS_EC
#define CONFIG_KEYBOARD
#endif
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index 1005b9e6bc..a2901294a6 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -227,8 +227,6 @@
#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(2, 1)
#endif
-#define CONFIG_DM
-#define CONFIG_DM_THERMAL
#define CONFIG_IMX6_THERMAL
#define CONFIG_CMD_FUSE
diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 9d5dbdce36..8b47537614 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -177,8 +177,6 @@
/* I2C */
#define CONFIG_CMD_I2C
-#define CONFIG_DM_I2C
-#define CONFIG_DM_I2C_COMPAT
#define CONFIG_SYS_I2C_S3C24X0
#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000
#define CONFIG_SYS_I2C_S3C24X0_SLAVE 0
diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h
index f724164d89..f04f0613aa 100644
--- a/include/configs/peach-pi.h
+++ b/include/configs/peach-pi.h
@@ -43,7 +43,6 @@
#endif
#define CONFIG_POWER_TPS65090_EC
-#define CONFIG_CROS_EC_SPI /* Support CROS_EC over SPI */
#define CONFIG_USB_XHCI
#define CONFIG_USB_XHCI_EXYNOS
diff --git a/include/configs/peach-pit.h b/include/configs/peach-pit.h
index de12a9e1b1..b5efbdcaa6 100644
--- a/include/configs/peach-pit.h
+++ b/include/configs/peach-pit.h
@@ -43,7 +43,6 @@
#endif
#define CONFIG_POWER_TPS65090_EC
-#define CONFIG_CROS_EC_SPI /* Support CROS_EC over SPI */
#define CONFIG_USB_XHCI
#define CONFIG_USB_XHCI_EXYNOS
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 5c116508d0..febbfb69f6 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -141,9 +141,6 @@
#define CONFIG_BOOTARGS ""
-#define CONFIG_CROS_EC
-#define CONFIG_CMD_CROS_EC
-#define CONFIG_CROS_EC_SANDBOX
#define CONFIG_ARCH_EARLY_INIT_R
#define CONFIG_BOARD_LATE_INIT
@@ -166,7 +163,6 @@
#define LCD_BPP LCD_COLOR16
#define CONFIG_LCD_BMP_RLE8
-#define CONFIG_CROS_EC_KEYB
#define CONFIG_KEYBOARD
#define CONFIG_EXTRA_ENV_SETTINGS "stdin=serial,cros-ec-keyb\0" \
diff --git a/include/configs/snow.h b/include/configs/snow.h
index ce6676eae7..fe802f253c 100644
--- a/include/configs/snow.h
+++ b/include/configs/snow.h
@@ -20,9 +20,7 @@
#include <configs/exynos5-dt-common.h>
-#define CONFIG_CROS_EC_I2C /* Support CROS_EC over I2C */
#define CONFIG_POWER_TPS65090_I2C
-#define CONFIG_DM_CROS_EC
#define CONFIG_BOARD_COMMON
#define CONFIG_ARCH_EARLY_INIT_R
diff --git a/include/debug_uart.h b/include/debug_uart.h
new file mode 100644
index 0000000000..f56797b72f
--- /dev/null
+++ b/include/debug_uart.h
@@ -0,0 +1,139 @@
+/*
+ * Early debug UART support
+ *
+ * (C) Copyright 2014 Google, Inc
+ * Writte by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _DEBUG_UART_H
+#define _DEBUG_UART_H
+
+#include <linux/linkage.h>
+
+/*
+ * The debug UART is intended for use very early in U-Boot to debug problems
+ * when an ICE or other debug mechanism is not available.
+ *
+ * To use it you should:
+ * - Make sure your UART supports this interface
+ * - Enable CONFIG_DEBUG_UART
+ * - Enable the CONFIG for your UART to tell it to provide this interface
+ * (e.g. CONFIG_DEBUG_UART_NS16550)
+ * - Define the required settings as needed (see below)
+ * - Call debug_uart_init() before use
+ * - Call printch() to output a character
+ *
+ * Depending on your platform it may be possible to use this UART before a
+ * stack is available.
+ *
+ * If your UART does not support this interface you can probably add support
+ * quite easily. Remember that you cannot use driver model and it is preferred
+ * to use no stack.
+ *
+ * You must not use this UART once driver model is working and the serial
+ * drivers are up and running (done in serial_init()). Otherwise the drivers
+ * may conflict and you will get strange output.
+ *
+ *
+ * To enable the debug UART in your serial driver:
+ *
+ * - #include <debug_uart.h>
+ * - Define debug_uart_init(), trying to avoid using the stack
+ * - Define _debug_uart_putc() as static inline (avoiding stack usage)
+ * - Immediately afterwards, add DEBUG_UART_FUNCS to define the rest of the
+ * functionality (printch(), etc.)
+ */
+
+/**
+ * debug_uart_init() - Set up the debug UART ready for use
+ *
+ * This sets up the UART with the correct baud rate, etc.
+ *
+ * Available CONFIG is:
+ *
+ * - CONFIG_DEBUG_UART_BASE: Base address of UART
+ * - CONFIG_BAUDRATE: Requested baud rate
+ * - CONFIG_DEBUG_UART_CLOCK: Input clock for UART
+ */
+void debug_uart_init(void);
+
+/**
+ * printch() - Output a character to the debug UART
+ *
+ * @ch: Character to output
+ */
+asmlinkage void printch(int ch);
+
+/**
+ * printascii() - Output an ASCII string to the debug UART
+ *
+ * @str: String to output
+ */
+asmlinkage void printascii(const char *str);
+
+/**
+ * printhex2() - Output a 2-digit hex value
+ *
+ * @value: Value to output
+ */
+asmlinkage void printhex2(uint value);
+
+/**
+ * printhex4() - Output a 4-digit hex value
+ *
+ * @value: Value to output
+ */
+asmlinkage void printhex4(uint value);
+
+/**
+ * printhex8() - Output a 8-digit hex value
+ *
+ * @value: Value to output
+ */
+asmlinkage void printhex8(uint value);
+
+/*
+ * Now define some functions - this should be inserted into the serial driver
+ */
+#define DEBUG_UART_FUNCS \
+ asmlinkage void printch(int ch) \
+ { \
+ _debug_uart_putc(ch); \
+ } \
+\
+ asmlinkage void printascii(const char *str) \
+ { \
+ while (*str) \
+ _debug_uart_putc(*str++); \
+ } \
+\
+ static inline void printhex1(uint digit) \
+ { \
+ digit &= 0xf; \
+ _debug_uart_putc(digit > 9 ? digit - 10 + 'a' : digit + '0'); \
+ } \
+\
+ static inline void printhex(uint value, int digits) \
+ { \
+ while (digits-- > 0) \
+ printhex1(value >> (4 * digits)); \
+ } \
+\
+ asmlinkage void printhex2(uint value) \
+ { \
+ printhex(value, 2); \
+ } \
+\
+ asmlinkage void printhex4(uint value) \
+ { \
+ printhex(value, 4); \
+ } \
+\
+ asmlinkage void printhex8(uint value) \
+ { \
+ printhex(value, 8); \
+ }
+
+#endif
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index f0cc794750..e2418fedb9 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -101,7 +101,11 @@ static inline int device_remove(struct udevice *dev) { return 0; }
* @dev: Pointer to device to unbind
* @return 0 if OK, -ve on error
*/
+#ifdef CONFIG_DM_DEVICE_REMOVE
int device_unbind(struct udevice *dev);
+#else
+static inline int device_unbind(struct udevice *dev) { return 0; }
+#endif
#ifdef CONFIG_DM_DEVICE_REMOVE
void device_free(struct udevice *dev);
OpenPOWER on IntegriCloud