1 /*
2 * Arm SCP/MCP Software
3 * Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8 #include "mod_hsspi.h"
9 #include "synquacer_mmap.h"
10
11 #include <fwk_module.h>
12
13 #include <stddef.h>
14
15 /* Configuration of the HSSPI module. */
16 static struct fwk_element hsspi_dev_table[] = {
17 {
18 .name = "HSSPI0",
19 .sub_element_count = 1,
20 .data = &((struct mod_hsspi_dev_config){
21 .reg_base = HSSPI_REG_BASE,
22 .memory_base = HSSPI_MEM_BASE,
23 .clock_div = 4,
24 .clock_sel = HSSPI_CLOCK_SELECT_HSEL,
25 .deselect_time = HSSPI_DESELECT_TIME_16,
26 .memory_bank_size = HSSPI_MEMORY_BANK_SIZE_256M,
27 }),
28 },
29 { 0 }, /* Termination description. */
30 };
31
32 static const struct mod_hsspi_config hsspi_config = {
33 .bootctl_base = CONFIG_SOC_REG_ADDR_BOOT_CTL_TOP,
34 };
35
hsspi_get_element_table(fwk_id_t module_id)36 static const struct fwk_element *hsspi_get_element_table(fwk_id_t module_id)
37 {
38 return hsspi_dev_table;
39 }
40
41 const struct fwk_module_config config_hsspi = {
42 .data = (const struct mod_hsspi_config *)&hsspi_config,
43 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(hsspi_get_element_table),
44
45 };
46