aboutsummaryrefslogtreecommitdiff
path: root/product/n1sdp
diff options
context:
space:
mode:
authorManoj Kumar <manoj.kumar3@arm.com>2018-10-26 11:34:46 +0530
committerdavidcunado-arm <david.cunado@arm.com>2018-10-30 16:58:33 +0000
commit7dd378be0b8efbbe92d024b72ba17d08464c9fc9 (patch)
tree260affd7919f06cb0f22ce744c6885a9a37d8942 /product/n1sdp
parent29dd7b65049e418be19d8f11eb39257ef1913177 (diff)
n1sdp: scp_ramfw - add config file for log module
Change-Id: I753045477836f28148904b6f694b09bcb218df14 Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com>
Diffstat (limited to 'product/n1sdp')
-rw-r--r--product/n1sdp/scp_ramfw/config_log.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/product/n1sdp/scp_ramfw/config_log.c b/product/n1sdp/scp_ramfw/config_log.c
new file mode 100644
index 00000000..9e71cc7a
--- /dev/null
+++ b/product/n1sdp/scp_ramfw/config_log.c
@@ -0,0 +1,59 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2018, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <fwk_banner.h>
+#include <fwk_macros.h>
+#include <fwk_module.h>
+#include <fwk_module_idx.h>
+#include <mod_log.h>
+#include <mod_pl011.h>
+#include <n1sdp_scp_mmap.h>
+#include <n1sdp_system_clock.h>
+
+/*
+ * PL011 module
+ */
+static const struct fwk_element pl011_element_desc_table[] = {
+ [0] = {
+ .name = "SCP-UART",
+ .data = &((struct mod_pl011_device_config) {
+ .reg_base = SCP_UART_BASE,
+ .baud_rate_bps = 38400,
+ .clock_rate_hz = CLOCK_RATE_REFCLK,
+ .clock_id = FWK_ID_NONE_INIT,
+ }),
+ },
+ [1] = { 0 },
+};
+
+static const struct fwk_element *get_pl011_table(fwk_id_t module_id)
+{
+ return pl011_element_desc_table;
+}
+
+struct fwk_module_config config_pl011 = {
+ .get_element_table = get_pl011_table,
+};
+
+/*
+ * Log module
+ */
+static const struct mod_log_config log_data = {
+ .device_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PL011, 0),
+ .api_id = FWK_ID_API_INIT(FWK_MODULE_IDX_PL011, 0),
+ .log_groups = MOD_LOG_GROUP_ERROR |
+ MOD_LOG_GROUP_INFO |
+ MOD_LOG_GROUP_WARNING |
+ MOD_LOG_GROUP_DEBUG,
+ .banner = FWK_BANNER_SCP
+ FWK_BANNER_RAM_FIRMWARE
+ BUILD_VERSION_DESCRIBE_STRING "\n",
+};
+
+struct fwk_module_config config_log = {
+ .data = &log_data,
+};