summaryrefslogtreecommitdiff
path: root/src/soc/marvell/mvmap2315/include
diff options
context:
space:
mode:
authorHakim Giydan <hgiydan@marvell.com>2016-09-08 10:55:44 -0700
committerMartin Roth <martinroth@google.com>2016-09-13 16:58:36 +0200
commit78785e7c413ad18c96260c7a3cf5acc20103bbd2 (patch)
tree55f7d7155f22ad35e2b5a1837b16047996bbbe69 /src/soc/marvell/mvmap2315/include
parent1bf8c4d443af091c2a0f4779091588d11f5d2f5e (diff)
soc/marvell/mvmap2315: Add NVM driver
This driver uses BootROM callback to read and write to the nvm using I2C. Testing: booted successfully. Change-Id: I8639af3e004f6631d7e596507c106159835f979f Signed-off-by: Hakim Giydan <hgiydan@marvell.com> Reviewed-on: https://review.coreboot.org/16161 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/marvell/mvmap2315/include')
-rw-r--r--src/soc/marvell/mvmap2315/include/soc/nvm.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/soc/marvell/mvmap2315/include/soc/nvm.h b/src/soc/marvell/mvmap2315/include/soc/nvm.h
new file mode 100644
index 0000000000..b79c5f683b
--- /dev/null
+++ b/src/soc/marvell/mvmap2315/include/soc/nvm.h
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Marvell, Inc.
+ *
+ * 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_MARVELL_MVMAP2315_NVM_H__
+#define __SOC_MARVELL_MVMAP2315_NVM_H__
+
+#include <stdint.h>
+
+#define MVMAP2315_NVM_LOCKDOWN_FLAG BIT(0)
+
+u32 nvm_init(void);
+u32 nvm_read(u32 offset, u32 *buffer, u32 size);
+u32 nvm_write(u32 offset, u32 *buffer, u32 size);
+void nvm_lockdown(void);
+
+#endif /* __SOC_MARVELL_MVMAP2315_NVM_H__ */