]> git.sur5r.net Git - u-boot/blobdiff - include/iotrace.h
am57xx_hs: avb2.0: add support of AVB 2.0
[u-boot] / include / iotrace.h
index 9bd1f167abe5ea3c4a9d61df1338af7fb6f28b81..1efb117343ab0481c7040c9d35c2a046db154325 100644 (file)
@@ -1,7 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (c) 2014 Google, Inc.
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #ifndef __IOTRACE_H
 #define writew(val, addr)      iotrace_writew(val, (const void *)(addr))
 
 #undef readb
-#define readb(addr)    iotrace_readb((const void *)(addr))
+#define readb(addr)    iotrace_readb((const void *)(uintptr_t)addr)
 
 #undef writeb
-#define writeb(val, addr)      iotrace_writeb(val, (const void *)(addr))
+#define writeb(val, addr) \
+       iotrace_writeb(val, (const void *)(uintptr_t)addr)
 
 #endif
 
@@ -58,6 +58,30 @@ void iotrace_reset_checksum(void);
  */
 u32 iotrace_get_checksum(void);
 
+/**
+ * iotrace_set_region() - Set whether iotrace is limited to a specific
+ * io region.
+ *
+ * Defines the address and size of the limited region.
+ *
+ * @start: address of the beginning of the region
+ * @size: size of the region in bytes.
+ */
+void iotrace_set_region(ulong start, ulong size);
+
+/**
+ * iotrace_reset_region() - Reset the region limit
+ */
+void iotrace_reset_region(void);
+
+/**
+ * iotrace_get_region() - Get region information
+ *
+ * @start: Returns start address of region
+ * @size: Returns size of region in bytes
+ */
+void iotrace_get_region(ulong *start, ulong *size);
+
 /**
  * iotrace_set_enabled() - Set whether iotracing is enabled or not
  *