summaryrefslogtreecommitdiff
path: root/include/mach/rockchip/bootrom.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mach/rockchip/bootrom.h')
-rw-r--r--include/mach/rockchip/bootrom.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/mach/rockchip/bootrom.h b/include/mach/rockchip/bootrom.h
new file mode 100644
index 0000000000..96eb147ae4
--- /dev/null
+++ b/include/mach/rockchip/bootrom.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __MACH_ROCKCHIP_BOOTROM_H
+#define __MACH_ROCKCHIP_BOOTROM_H
+
+#include <linux/compiler.h>
+#include <linux/string.h>
+#include <asm/barebox-arm.h>
+
+struct rockchip_scratch_space {
+ u32 irom[16];
+};
+
+static inline void rockchip_store_bootrom_iram(ulong membase,
+ ulong memsize,
+ const void *iram)
+{
+ void *dst = (void *)__arm_mem_scratch(membase + memsize);
+ memcpy(dst, iram, sizeof(struct rockchip_scratch_space));
+}
+
+static inline const struct rockchip_scratch_space *rockchip_scratch_space(void)
+{
+ return arm_mem_scratch_get();
+}
+
+void rockchip_parse_bootrom_iram(const void *iram);
+
+int rockchip_bootsource_get_active_slot(void);
+
+
+#endif