aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Angadi <aditya.angadi@arm.com>2020-11-04 12:57:38 +0530
committerThomas Abraham <thomas.abraham@arm.com>2020-11-28 01:48:28 +0530
commited73ffbd1916f3080318b32828807bac65458c85 (patch)
tree8899162caff6b004d23ea7bdc53f4bc689241d9b
parenta285f5a97a7180073b02b4060532464f8eed0fa4 (diff)
product/rdn2: add config data for bootloader module
The bootloader module is used to load the SCP RAM firmware from the NOR flash to SCP RAM. Provide the base address and size of the firmware image to be loaded from and the base address of the location to which the firmware is loaded to. Change-Id: Ia7be81442ef67225f7a85182a96a3feabcae3492 Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
-rw-r--r--product/rdn2/include/scp_mmap.h2
-rw-r--r--product/rdn2/include/scp_soc_mmap.h15
-rw-r--r--product/rdn2/include/scp_software_mmap.h19
-rw-r--r--product/rdn2/scp_romfw/config_bootloader.c24
4 files changed, 60 insertions, 0 deletions
diff --git a/product/rdn2/include/scp_mmap.h b/product/rdn2/include/scp_mmap.h
index 02ee6ef6..c5a05bb3 100644
--- a/product/rdn2/include/scp_mmap.h
+++ b/product/rdn2/include/scp_mmap.h
@@ -8,6 +8,8 @@
#ifndef SCP_MMAP_H
#define SCP_MMAP_H
+#define SCP_ITC_RAM_BASE 0x00800000
+#define SCP_SOC_EXPANSION1_BASE 0x01000000
#define SCP_PERIPHERAL_BASE 0x44000000
#define SCP_SYSTEM_ACCESS_PORT1_BASE 0xA0000000
diff --git a/product/rdn2/include/scp_soc_mmap.h b/product/rdn2/include/scp_soc_mmap.h
new file mode 100644
index 00000000..68265847
--- /dev/null
+++ b/product/rdn2/include/scp_soc_mmap.h
@@ -0,0 +1,15 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef SCP_SOC_MMAP_H
+#define SCP_SOC_MMAP_H
+
+#include "scp_mmap.h"
+
+#define SCP_NOR0_FLASH_BASE (SCP_SOC_EXPANSION1_BASE + 0x07000000)
+
+#endif /* SCP_SOC_MMAP_H */
diff --git a/product/rdn2/include/scp_software_mmap.h b/product/rdn2/include/scp_software_mmap.h
new file mode 100644
index 00000000..f66c317f
--- /dev/null
+++ b/product/rdn2/include/scp_software_mmap.h
@@ -0,0 +1,19 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef SCP_SOFTWARE_MMAP_H
+#define SCP_SOFTWARE_MMAP_H
+
+#include "scp_soc_mmap.h"
+
+#include <fwk_macros.h>
+
+/* SCP RAM firmware base and size on the flash */
+#define SCP_RAMFW_IMAGE_FLASH_BASE (SCP_NOR0_FLASH_BASE + 0x03D80000)
+#define SCP_RAMFW_IMAGE_FLASH_SIZE (256 * FWK_KIB)
+
+#endif /* SCP_SOFTWARE_MMAP_H */
diff --git a/product/rdn2/scp_romfw/config_bootloader.c b/product/rdn2/scp_romfw/config_bootloader.c
new file mode 100644
index 00000000..34d4ad0e
--- /dev/null
+++ b/product/rdn2/scp_romfw/config_bootloader.c
@@ -0,0 +1,24 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "scp_mmap.h"
+#include "scp_software_mmap.h"
+
+#include <mod_bootloader.h>
+
+#include <fwk_module.h>
+
+static const struct mod_bootloader_config bootloader_module_config = {
+ .source_base = SCP_RAMFW_IMAGE_FLASH_BASE,
+ .source_size = SCP_RAMFW_IMAGE_FLASH_SIZE,
+ .destination_base = SCP_ITC_RAM_BASE,
+ .destination_size = SCP_RAMFW_IMAGE_FLASH_SIZE,
+};
+
+struct fwk_module_config config_bootloader = {
+ .data = &bootloader_module_config,
+};