]> git.sur5r.net Git - u-boot/blobdiff - include/debug_uart.h
Merge branch 'master' of git://git.denx.de/u-boot-spi
[u-boot] / include / debug_uart.h
index 2980ae6200f25949c75a32e834b0329ae3020471..34e8b2fc810170ec54cb7176cb2155b696f3d144 100644 (file)
@@ -1,10 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * 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
@@ -111,6 +110,17 @@ void printhex8(uint value);
 #define _DEBUG_UART_ANNOUNCE
 #endif
 
+#define serial_dout(reg, value)        \
+       serial_out_shift((char *)com_port + \
+               ((char *)reg - (char *)com_port) * \
+                       (1 << CONFIG_DEBUG_UART_SHIFT), \
+               CONFIG_DEBUG_UART_SHIFT, value)
+#define serial_din(reg) \
+       serial_in_shift((char *)com_port + \
+               ((char *)reg - (char *)com_port) * \
+                       (1 << CONFIG_DEBUG_UART_SHIFT), \
+               CONFIG_DEBUG_UART_SHIFT)
+
 /*
  * Now define some functions - this should be inserted into the serial driver
  */