]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/armv7/socfpga/system_manager.c
arm: socfpga: fpga: Add SoCFPGA FPGA programming interface
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / socfpga / system_manager.c
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 #include <asm/arch/fpga_manager.h>
11
12 DECLARE_GLOBAL_DATA_PTR;
13
14 static struct socfpga_system_manager *sysmgr_regs =
15         (struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
16
17 /*
18  * Configure all the pin muxes
19  */
20 void sysmgr_pinmux_init(void)
21 {
22         uint32_t regs = (uint32_t)&sysmgr_regs->emacio[0];
23         int i;
24
25         for (i = 0; i < ARRAY_SIZE(sys_mgr_init_table); i++) {
26                 writel(sys_mgr_init_table[i], regs);
27                 regs += sizeof(regs);
28         }
29 }