socfpga: Adding System Manager driver
PATCH v4 1/2 socfpga: Adding System Manager driver
Adding System Manager driver which will configure the pin mux for real hardware Cyclone V development kit (not Virtual Platform)
---
Changes for v2:
- Fixed the word wrap issue within patch
Changes for v3:
- Fixed the long subject of the patch
- Fixed the comment within the code
Changes for v4:
- Added change log for each revision change
arch/arm/cpu/armv7/socfpga/Makefile | 2 +- arch/arm/cpu/armv7/socfpga/spl.c | 6 +++ arch/arm/cpu/armv7/socfpga/system_manager.c | 41 ++++++++++++++++++++ .../include/asm/arch-socfpga/socfpga_base_addrs.h | 1 + arch/arm/include/asm/arch-socfpga/system_manager.h | 34 ++++++++++++++++ board/altera/socfpga_cyclone5/Makefile | 4 +- include/configs/socfpga_cyclone5.h | 1 + 7 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 arch/arm/cpu/armv7/socfpga/system_manager.c create mode 100644 arch/arm/include/asm/arch-socfpga/system_manager.h
arch/arm/cpu/armv7/socfpga/Makefile +1 -1
@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o SOBJS := lowlevel_init.o -COBJS-y := misc.o timer.o reset_manager.o +COBJS-y := misc.o timer.o reset_manager.o system_manager.o COBJS-$(CONFIG_SPL_BUILD) += spl.o COBJS := $(COBJS-y)
arch/arm/cpu/armv7/socfpga/spl.c +6 -0
@@ -23,6 +23,7 @@#include <image.h> #include <asm/arch/reset_manager.h> #include <spl.h> +#include <asm/arch/system_manager.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -36,6 +37,11 @@ u32 spl_boot_device(void)*/ void spl_board_init (void ) { +#ifndef CONFIG_SOCFPGA_VIRTUAL_TARGET +/* configure the pin muxing through system manager */ +sysmgr_pinmux_init (); +#endif /* CONFIG_SOCFPGA_VIRTUAL_TARGET */ +/* de-assert reset for peripherals and bridges based on handoff */ reset_deassert_peripherals_handoff ();
arch/arm/cpu/armv7/socfpga/system_manager.c new file +41 -0
41 lines not on this page · raw message
arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h +1 -0
@@ -23,5 +23,6 @@#define SOCFPGA_UART1_ADDRESS 0xffc03000#define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd00000#define SOCFPGA_RSTMGR_ADDRESS 0xffd05000 +#define SOCFPGA_SYSMGR_ADDRESS 0xffd08000#endif /* _SOCFPGA_BASE_ADDRS_H_ */
arch/arm/include/asm/arch-socfpga/system_manager.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright Altera Corporation (C) 2013. All rights reserved +* +* This program is free software; you can redistribute it +* and/or modify it under the terms and conditions of the +* GNU General Public License, version 2, as published by +* the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See the GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public +* License along with this program. If not, see +* <http://www.gnu.org/licenses/>. +*/ + +#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_ */
board/altera/socfpga_cyclone5/Makefile +3 -1
@@ -26,8 +26,10 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := socfpga_cyclone5.o +COBJS-y := socfpga_cyclone5.o +COBJS-$(CONFIG_SPL_BUILD) += pinmux_config.o +COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
include/configs/socfpga_cyclone5.h +1 -0
@@ -18,6 +18,7 @@#define __CONFIG_H#include <asm/arch/socfpga_base_addrs.h> +#include "../../board/altera/socfpga_cyclone5/pinmux_config.h" /* * High level configuration
Signature · 1 line
1.7.9.5
PATCH v4 1/2 socfpga: Adding System Manager driver
Dear Chin Liang See,
Quoted 3 lines · In message <[email protected]> you wrote:
Adding System Manager driver which will configure the pin mux for real hardware Cyclone V development kit (not Virtual Platform)
License clash:
Quoted 7 lines
+/*
+ * Copyright Altera Corporation (C) 2013. All rights reserved
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms and conditions of the
+ * GNU General Public License, version 2, as published by
+ * the Free Software Foundation.
Please remove the "All rights reserved", and add the " or (at your option) any later version" clause as documented at [1].
[1] http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign
Bullet # 3
Please fix globally for all your patches / code.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de This is an unauthorized cybernetic announcement.