Chin Liang See | 70fa4e7 | 2013-09-11 11:24:48 -0500 | [diff] [blame] | 1 | /* |
| 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 | |
| 11 | DECLARE_GLOBAL_DATA_PTR; |
| 12 | |
| 13 | /* |
| 14 | * Configure all the pin muxes |
| 15 | */ |
| 16 | void 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 | } |