arm: socfpga: sysmgr: Clean up system manager
Clean up the system manager register definition and add the missing register definitions in place. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <clsee@altera.com> Cc: Dinh Nguyen <dinguyen@altera.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Tom Rini <trini@ti.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Pavel Machek <pavel@denx.de> Acked-by: Pavel Machek <pavel@denx.de>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Altera Corporation <www.altera.com>
|
||||
* Copyright (C) 2013 Altera Corporation <www.altera.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
@@ -7,21 +7,23 @@
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/system_manager.h>
|
||||
#include <asm/arch/fpga_manager.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static struct socfpga_system_manager *sysmgr_regs =
|
||||
(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
|
||||
|
||||
/*
|
||||
* Configure all the pin muxes
|
||||
*/
|
||||
void sysmgr_pinmux_init(void)
|
||||
{
|
||||
unsigned long offset = CONFIG_SYSMGR_PINMUXGRP_OFFSET;
|
||||
uint32_t regs = (uint32_t)&sysmgr_regs->emacio[0];
|
||||
int i;
|
||||
|
||||
const unsigned long *pval = sys_mgr_init_table;
|
||||
unsigned long i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sys_mgr_init_table);
|
||||
i++, offset += sizeof(unsigned long)) {
|
||||
writel(*pval++, (SOCFPGA_SYSMGR_ADDRESS + offset));
|
||||
for (i = 0; i < ARRAY_SIZE(sys_mgr_init_table); i++) {
|
||||
writel(sys_mgr_init_table[i], regs);
|
||||
regs += sizeof(regs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user