Adding System Manager driver which will configure the pin mux for real hardware Cyclone V development kit (not Virtual Platform) Signed-off-by: Chin Liang See <clsee@altera.com> Reviewed-by: Pavel Machek <pavel@denx.de> Acked-by: Dinh Nguyen <dinguyen@altera.com> Cc: Wolfgang Denk <wd@denx.de> CC: Pavel Machek <pavel@denx.de> Cc: Dinh Nguyen <dinguyen@altera.com> Cc: Tom Rini <trini@ti.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net>master
parent
0610a16cf2
commit
5d649d2b08
@ -0,0 +1,27 @@ |
||||
/*
|
||||
* Copyright (C) 2013 Altera Corporation <www.altera.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <asm/io.h> |
||||
#include <asm/arch/system_manager.h> |
||||
|
||||
DECLARE_GLOBAL_DATA_PTR; |
||||
|
||||
/*
|
||||
* Configure all the pin muxes |
||||
*/ |
||||
void sysmgr_pinmux_init(void) |
||||
{ |
||||
unsigned long offset = CONFIG_SYSMGR_PINMUXGRP_OFFSET; |
||||
|
||||
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)); |
||||
} |
||||
} |
@ -0,0 +1,22 @@ |
||||
/*
|
||||
* Copyright (C) 2013 Altera Corporation <www.altera.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0+ |
||||
*/ |
||||
|
||||
#ifndef _SYSTEM_MANAGER_H_ |
||||
#define _SYSTEM_MANAGER_H_ |
||||
|
||||
#ifndef __ASSEMBLY__ |
||||
|
||||
void sysmgr_pinmux_init(void); |
||||
|
||||
/* declaration for handoff table type */ |
||||
extern unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM]; |
||||
|
||||
#endif |
||||
|
||||
|
||||
#define CONFIG_SYSMGR_PINMUXGRP_OFFSET (0x400) |
||||
|
||||
#endif /* _SYSTEM_MANAGER_H_ */ |
Loading…
Reference in new issue