diff options
Diffstat (limited to 'arch/arm/mach-socfpga')
-rw-r--r-- | arch/arm/mach-socfpga/include/mach/system_manager.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-socfpga/system_manager.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-socfpga/include/mach/system_manager.h b/arch/arm/mach-socfpga/include/mach/system_manager.h index de05aaf..46af30b 100644 --- a/arch/arm/mach-socfpga/include/mach/system_manager.h +++ b/arch/arm/mach-socfpga/include/mach/system_manager.h @@ -12,9 +12,8 @@ void sysmgr_pinmux_init(void); void sysmgr_config_warmrstcfgio(int enable); -/* declaration for handoff table type */ -extern unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM]; - +void sysmgr_get_pinmux_table(const unsigned long **table, + unsigned int *table_len); #endif struct socfpga_system_manager { diff --git a/arch/arm/mach-socfpga/system_manager.c b/arch/arm/mach-socfpga/system_manager.c index 5ed47c3..744ec32 100644 --- a/arch/arm/mach-socfpga/system_manager.c +++ b/arch/arm/mach-socfpga/system_manager.c @@ -57,9 +57,13 @@ static void populate_sysmgr_fpgaintf_module(void) void sysmgr_pinmux_init(void) { uint32_t regs = (uint32_t)&sysmgr_regs->emacio[0]; + const unsigned long *sys_mgr_init_table; + unsigned int len; int i; - for (i = 0; i < ARRAY_SIZE(sys_mgr_init_table); i++) { + sysmgr_get_pinmux_table(&sys_mgr_init_table, &len); + + for (i = 0; i < len; i++) { writel(sys_mgr_init_table[i], regs); regs += sizeof(regs); } |