2013-09-11 16:24:48 +00:00
|
|
|
/*
|
2014-09-08 12:08:45 +00:00
|
|
|
* Copyright (C) 2013 Altera Corporation <www.altera.com>
|
2013-09-11 16:24:48 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
#include <asm/arch/system_manager.h>
|
2014-09-08 12:08:45 +00:00
|
|
|
#include <asm/arch/fpga_manager.h>
|
2013-09-11 16:24:48 +00:00
|
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2014-09-08 12:08:45 +00:00
|
|
|
static struct socfpga_system_manager *sysmgr_regs =
|
|
|
|
(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
|
|
|
|
|
2013-09-11 16:24:48 +00:00
|
|
|
/*
|
|
|
|
* Configure all the pin muxes
|
|
|
|
*/
|
|
|
|
void sysmgr_pinmux_init(void)
|
|
|
|
{
|
2014-09-08 12:08:45 +00:00
|
|
|
uint32_t regs = (uint32_t)&sysmgr_regs->emacio[0];
|
|
|
|
int i;
|
2013-09-11 16:24:48 +00:00
|
|
|
|
2014-09-08 12:08:45 +00:00
|
|
|
for (i = 0; i < ARRAY_SIZE(sys_mgr_init_table); i++) {
|
|
|
|
writel(sys_mgr_init_table[i], regs);
|
|
|
|
regs += sizeof(regs);
|
2013-09-11 16:24:48 +00:00
|
|
|
}
|
|
|
|
}
|