From ea81928e948a01dde897b90e8e7454a71d9c0788 Mon Sep 17 00:00:00 2001 From: Philipp Hug Date: Wed, 11 Jul 2018 13:22:34 +0200 Subject: soc/sifive/fu540: Add driver for OTP memory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provides minimal functionality to read the SOC s/n from the NeoFuse one time programmable memory. Change-Id: I14b010ad9958931e0a98a76f76090fd7c66f19a0 Signed-off-by: Philipp Hug Reviewed-on: https://review.coreboot.org/27435 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer --- src/soc/sifive/fu540/include/soc/otp.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/soc/sifive/fu540/include/soc/otp.h (limited to 'src/soc/sifive/fu540/include') 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 + * + * 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__ */ -- cgit v1.2.3