summaryrefslogtreecommitdiff
path: root/src/soc/sifive/fu540/include
diff options
context:
space:
mode:
authorPhilipp Hug <philipp@hug.cx>2018-07-11 13:22:34 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-09-10 15:05:11 +0000
commitea81928e948a01dde897b90e8e7454a71d9c0788 (patch)
tree082c4b2fc86f3f60fd4b084742109525bf5becf5 /src/soc/sifive/fu540/include
parent3b8ef2b01d80124982155620dec283ecc91cb221 (diff)
downloadcoreboot-ea81928e948a01dde897b90e8e7454a71d9c0788.tar.xz
soc/sifive/fu540: Add driver for OTP memory
Provides minimal functionality to read the SOC s/n from the NeoFuse one time programmable memory. Change-Id: I14b010ad9958931e0a98a76f76090fd7c66f19a0 Signed-off-by: Philipp Hug <philipp@hug.cx> Reviewed-on: https://review.coreboot.org/27435 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Diffstat (limited to 'src/soc/sifive/fu540/include')
-rw-r--r--src/soc/sifive/fu540/include/soc/otp.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/soc/sifive/fu540/include/soc/otp.h b/src/soc/sifive/fu540/include/soc/otp.h
new file mode 100644
index 0000000000..a5b4ca8792
--- /dev/null
+++ b/src/soc/sifive/fu540/include/soc/otp.h
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Philipp Hug <philipp@hug.cx>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __SOC_SIFIVE_HIFIVE_U_OTP_H__
+#define __SOC_SIFIVE_HIFIVE_U_OTP_H__
+
+u32 otp_read_word(u16 idx);
+u32 otp_read_serial(void);
+
+#endif /* __SOC_SIFIVE_HIFIFE_U_OTP_H__ */