blob: d96521ba0381ae9ba00b4a9e9eb40d3e2872a29b [file] [log] [blame]
Chin Liang See70fa4e72013-09-11 11:24:48 -05001/*
2 * Copyright (C) 2013 Altera Corporation <www.altera.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <asm/io.h>
9#include <asm/arch/system_manager.h>
10
11DECLARE_GLOBAL_DATA_PTR;
12
13/*
14 * Configure all the pin muxes
15 */
16void sysmgr_pinmux_init(void)
17{
18 unsigned long offset = CONFIG_SYSMGR_PINMUXGRP_OFFSET;
19
20 const unsigned long *pval = sys_mgr_init_table;
21 unsigned long i;
22
23 for (i = 0; i < ARRAY_SIZE(sys_mgr_init_table);
24 i++, offset += sizeof(unsigned long)) {
25 writel(*pval++, (SOCFPGA_SYSMGR_ADDRESS + offset));
26 }
27}