summaryrefslogtreecommitdiff
path: root/src/soc/intel/quark/include
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2016-04-29 16:36:02 -0700
committerLeroy P Leahy <leroy.p.leahy@intel.com>2016-05-05 17:55:26 +0200
commit4c3f5dc03ce5fa19cd087a62430239df6d86e54d (patch)
tree01b50f70a4f78bc26f3776923d4d72bbe39bf9b2 /src/soc/intel/quark/include
parent63e3dff02f5b66b32b32fd1497f820532af25a07 (diff)
downloadcoreboot-4c3f5dc03ce5fa19cd087a62430239df6d86e54d.tar.xz
soc/intel/quark: Add script time delay support
Add time delay support to the scripts. TEST=Build and run on Galileo Gen2 Change-Id: I2c87977e2a2547e00769e59e1ee81fbbb5dff33f Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/14555 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/intel/quark/include')
-rw-r--r--src/soc/intel/quark/include/soc/reg_access.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/intel/quark/include/soc/reg_access.h b/src/soc/intel/quark/include/soc/reg_access.h
index ddca6682cd..c6b786a36b 100644
--- a/src/soc/intel/quark/include/soc/reg_access.h
+++ b/src/soc/intel/quark/include/soc/reg_access.h
@@ -16,6 +16,7 @@
#ifndef _QUARK_REG_ACCESS_H_
#define _QUARK_REG_ACCESS_H_
+#include <delay.h>
#include <fsp/util.h>
#include <reg_script.h>
#include <soc/IntelQNCConfig.h>
@@ -25,6 +26,7 @@ enum {
USB_PHY_REGS = 1,
SOC_UNIT_REGS,
RMU_TEMP_REGS,
+ MICROSECOND_DELAY,
};
enum {
@@ -78,6 +80,10 @@ enum {
#define REG_SOC_UNIT_XOR(reg_, value_) \
REG_SOC_UNIT_RXW(reg_, 0xffffffff, value_)
+/* Time delays */
+#define TIME_DELAY_USEC(value_) \
+ SOC_ACCESS(WRITE, 0, REG_SCRIPT_SIZE_32, 0, value_, 0, MICROSECOND_DELAY)
+
/* USB register access macros */
#define REG_USB_ACCESS(cmd_, reg_, mask_, value_, timeout_) \
SOC_ACCESS(cmd_, reg_, REG_SCRIPT_SIZE_32, mask_, value_, timeout_, \