socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
A message that is not in the archive (sent off-list or not yet received): 0BB3B561D7068A4E89FD8E9ABFB538BEB3B2E44095@PG-ITMSG03.altera.priv.altera.com
A message that is not in the archive (sent off-list or not yet received): CAEM3b1BQWGLNvM+m26-OJv_ikc6LPbakiBQjvc2c7Fc5taUmjg@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): 0BB3B561D7068A4E89FD8E9ABFB538BEB3B2E44332@PG-ITMSG03.altera.priv.altera.com
PATCH 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V development kit (not Virtual Platform)
--- arch/arm/cpu/armv7/socfpga/Makefile | 2 +- arch/arm/cpu/armv7/socfpga/spl.c | 6 + arch/arm/cpu/armv7/socfpga/system_manager.c | 40 ++++ .../include/asm/arch-socfpga/socfpga_base_addrs.h | 1 + arch/arm/include/asm/arch-socfpga/system_manager.h | 32 +++ board/altera/socfpga_cyclone5/Makefile | 4 +- board/altera/socfpga_cyclone5/pinmux_config.c | 213 ++++++++++++++++++++ board/altera/socfpga_cyclone5/pinmux_config.h | 53 +++++ include/configs/socfpga_cyclone5.h | 1 + 9 files changed, 350 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 create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.c create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.h
(quoted diff) +0 -0
b/arch/arm/cpu/armv7/socfpga/Makefile
index 518e67a..cf2829a 100644
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 ();
(quoted diff) +0 -0
b/arch/arm/cpu/armv7/socfpga/system_manager.c
new file mode 100644
index 0000000..f2707d8b
arch/arm/cpu/armv7/socfpga/system_manager.c new file +40 -0
@@ -0,0 +1,40 @@ +/* +* 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/>. +*/ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/system_manager.h> + +DECLARE_GLOBAL_DATA_PTR ; + +/* +* Configure all the pin mux +*/ +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 < ((sizeof (sys_mgr_init_table)) /sizeof (unsigned long )); + i++, offset +=sizeof (unsigned long )) {
+ writel(*pval++, (SOCFPGA_SYSMGR_ADDRESS + offset));
+ }
+}
+
+
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h index f353eb2..819c280 100644
arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h +0 -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_ */
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-socfpga/system_manager.h new file mode 100644
index 0000000..aec9be7
arch/arm/include/asm/arch-socfpga/system_manager.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* 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_ */
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/Makefile
index 43bbc37..3092387 100644
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))
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/pinmux_config.c
new file mode 100644
index 0000000..42e7c89
board/altera/socfpga_cyclone5/pinmux_config.c new file +213 -0
213 lines not on this page · raw message
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/pinmux_config.h
new file mode 100644
index 0000000..33628c8
board/altera/socfpga_cyclone5/pinmux_config.h new file +52 -0
52 lines not on this page · raw message
(quoted diff) +0 -0
b/include/configs/socfpga_cyclone5.h
index 86563b7..02c5448 100644
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
--
1.7.7.4
Confidentiality Notice.
This message may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution, or copying of this message, or any attachments, is strictly prohibited. If you have received this message in error, please advise the sender by reply e-mail, and delete the message and any attachments. Thank you.
PATCH 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
Hi!
Quoted 12 lines
socfpga: 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 <[email protected]>arch/arm/cpu/armv7/socfpga/system_manager.c new file +0
-0
arch/arm/cpu/armv7/socfpga/system_manager.c line 5
Quoted 5 lines
arch/arm/cpu/armv7/socfpga/system_manager.c new file +5
-0@@ -0,0 +1,40 @@ +/* +* Copyright Altera Corporation (C) 2013. All rights reserved +* +* This program is free software; you can redistribute it and/or +modify it
Word wrapped.
arch/arm/cpu/armv7/socfpga/system_manager.c line 30
Quoted 3 lines
arch/arm/cpu/armv7/socfpga/system_manager.c new file +3
-0+/* +* Configure all the pin mux +*/
"the pin muxes" ?
arch/arm/cpu/armv7/socfpga/system_manager.c line 39
Quoted 9 lines
arch/arm/cpu/armv7/socfpga/system_manager.c new file +9
-0+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 < ((sizeof(sys_mgr_init_table)) / sizeof(unsigned long));
There's nice ARRAY_SIZE() macro that can be used.
board/altera/socfpga_cyclone5/pinmux_config.c line 9
Quoted 12 lines
board/altera/socfpga_cyclone5/pinmux_config.c new file +9
-0@@ -0,0 +1,213 @@ + +#include "pinmux_config.h" + +/* pin mux configuration data */ +unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM ] = { +0 ,/* EMACIO0 - Unused */ +2 ,/* EMACIO1 - USB */ +2 ,/* EMACIO2 - USB */ +2 ,/* EMACIO3 - USB */
Is this table auto-generated somehow?
If so, comment about that would be nice.
If not, perhaps we could put more than one entry on line, to make it shorter?
Thanks,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
Hi Pavel,
Quoted 7 lines · ZY - pavel
Hi!
Quoted 4 lines
socfpga: 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 <[email protected]>
Quoted 14 lines
arch/arm/cpu/armv7/socfpga/system_manager.c line 5
Quoted 12 lines
arch/arm/cpu/armv7/socfpga/system_manager.c new file +5
-0@@ -0,0 +1,40 @@ +/* +* Copyright Altera Corporation (C) 2013. All rights reserved +* +* This program is free software; you can redistribute it and/or +modify it Word wrapped.
Will fix with new email client
Quoted 6 lines
arch/arm/cpu/armv7/socfpga/system_manager.c line 30
Quoted 4 lines
arch/arm/cpu/armv7/socfpga/system_manager.c new file +3
-0+/* +* Configure all the pin mux +*/ "the pin muxes" ?
Noted
Quoted 13 lines
arch/arm/cpu/armv7/socfpga/system_manager.c line 39
Quoted 10 lines
arch/arm/cpu/armv7/socfpga/system_manager.c new file +9
-0+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 < ((sizeof(sys_mgr_init_table)) / sizeof(unsigned long));There's nice
ARRAY_SIZE()macro that can be used.
Noted
Quoted 16 lines
board/altera/socfpga_cyclone5/pinmux_config.c line 9
Quoted 13 lines
board/altera/socfpga_cyclone5/pinmux_config.c new file +9
-0@@ -0,0 +1,213 @@ + +#include "pinmux_config.h" + +/* pin mux configuration data */ +unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM ] = { +0 ,/* EMACIO0 - Unused */ +2 ,/* EMACIO1 - USB */ +2 ,/* EMACIO2 - USB */ +2 ,/* EMACIO3 - USB */ Is this table auto-generated somehow?
Quoted 4 lines
If so, comment about that would be nice.
If not, perhaps we could put more than one entry on line, to make it shorter?
Yup, its auto generated by tools.
I will put comment to note this.
Thanks
Chin Liang
Quoted 3 lines
Thanks,
Pavel
PATCH 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
Hi!
Quoted 15 lines
Quoted 15 lines
board/altera/socfpga_cyclone5/pinmux_config.c line 9
Quoted 12 lines
board/altera/socfpga_cyclone5/pinmux_config.c new file +9
-0@@ -0,0 +1,213 @@ + +#include "pinmux_config.h" + +/* pin mux configuration data */ +unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM ] = { +0 ,/* EMACIO0 - Unused */ +2 ,/* EMACIO1 - USB */ +2 ,/* EMACIO2 - USB */ +2 ,/* EMACIO3 - USB */ Is this table auto-generated somehow?
Quoted 7 lines
Quoted 4 lines
If so, comment about that would be nice.
If not, perhaps we could put more than one entry on line, to make it shorter?
Yup, its auto generated by tools.
I will put comment to note this.
Thanks!
You can add Reviewed-by: Pavel Machek <[email protected]> on the next version.
In future, would it make sense to separate auto-generated and manual parts? It might be good to have something like pinmux_config.i file with just inner part of the table...
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
Hi Pavel,
Quoted 22 lines · ZY - pavel
Hi!
Quoted 20 lines
Quoted 19 lines
board/altera/socfpga_cyclone5/pinmux_config.c line 9
Quoted 12 lines
board/altera/socfpga_cyclone5/pinmux_config.c new file +9
-0@@ -0,0 +1,213 @@ + +#include "pinmux_config.h" + +/* pin mux configuration data */ +unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM ] = { +0 ,/* EMACIO0 - Unused */ +2 ,/* EMACIO1 - USB */ +2 ,/* EMACIO2 - USB */ +2 ,/* EMACIO3 - USB */ Is this table auto-generated somehow?
If so, comment about that would be nice.
If not, perhaps we could put more than one entry on line, to make it shorter?
Quoted 8 lines
Quoted 2 lines
Yup, its auto generated by tools.
I will put comment to note this.Thanks!
You can add Reviewed-by: Pavel Machek <[email protected]> on the next version.
Thanks
Quoted 4 lines
In future, would it make sense to separate auto-generated and manual parts? It might be good to have something like pinmux_config.i file with just inner part of the table...
Sure, I will split them into 2 patches on next version
Chin Liang
Quoted 1 line
Pavel
PATCH v2 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
In reply to Pavel Macheksocfpga: Adding System Manager driver which will
configure the pin mux for real hardware Cyclone V development kit (not Virtual Platform)
--- 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 +- board/altera/socfpga_cyclone5/pinmux_config.c | 214 ++++++++++++++++++++ board/altera/socfpga_cyclone5/pinmux_config.h | 54 +++++ include/configs/socfpga_cyclone5.h | 1 + 9 files changed, 355 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 create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.c create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.h
(quoted diff) +0 -0
b/arch/arm/cpu/armv7/socfpga/Makefile
index 518e67a..cf2829a 100644
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)
(quoted diff) +0 -0
b/arch/arm/cpu/armv7/socfpga/spl.c
index 84216eb..28d8c99 100644
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 ();
(quoted diff) +0 -0
b/arch/arm/cpu/armv7/socfpga/system_manager.c
new file mode 100644
index 0000000..ef5f49e
arch/arm/cpu/armv7/socfpga/system_manager.c new file +41 -0
41 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h index f353eb2..819c280 100644
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_ */
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-socfpga/system_manager.h new file mode 100644
index 0000000..ef9e464
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_ */
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/Makefile
index 43bbc37..3092387 100644
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))
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/pinmux_config.c
new file mode 100644
index 0000000..8b09005
board/altera/socfpga_cyclone5/pinmux_config.c new file +214 -0
214 lines not on this page · raw message
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/pinmux_config.h
new file mode 100644
index 0000000..f278f2b
board/altera/socfpga_cyclone5/pinmux_config.h new file +54 -0
54 lines not on this page · raw message
(quoted diff) +0 -0
b/include/configs/socfpga_cyclone5.h
index be3799b..dd6db9e 100644
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 v2 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
Dear Chin Liang See,
Quoted 3 lines · In message <[email protected]> you wrote:
socfpga: Adding System Manager driver which will
configure the pin mux for real hardware Cyclone V=20 development kit (not Virtual Platform)
Please fix all your patches: provide a short (max. 50 chars) Subject, and a useful commit message (_different_ drom the Subject).
Thanks.
Best regards,
Wolfgang Denk
Signature · 5 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 Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month. - Wernher von Braun
PATCH v2 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
In reply to Chin Liang Seearch/arm/cpu/armv7/socfpga/system_manager.c line 27
Quoted 12 lines · Chin Liang See
socfpga: 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 <[email protected]>arch/arm/cpu/armv7/socfpga/system_manager.c new file +5
-0+DECLARE_GLOBAL_DATA_PTR ; + +/* +* Configure all the pin mux +*/
As noted before, I'm not sure this is correct english. Otherwise, patch looks good to me.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH v2 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
Hi Pavel,
Quoted 8 lines · ZY - pavel
Quoted 5 lines · Chin Liang See
socfpga: 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 <[email protected]>
Quoted 9 lines
arch/arm/cpu/armv7/socfpga/system_manager.c line 27
Quoted 5 lines
arch/arm/cpu/armv7/socfpga/system_manager.c new file +5
-0+DECLARE_GLOBAL_DATA_PTR ; + +/* +* Configure all the pin mux +*/ As noted before, I'm not sure this is correct english. Otherwise, patch looks good to me.
Sorry as I thought I already done that.
Let me fix it on next revision.
Chin Liang
Quoted 3 lines
Reviewed-by Pavel Machek <[email protected]>Pavel
PATCH v2 1/1 socfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V
Quoted 21 lines · Chin Liang See
Hi Pavel,
Quoted 8 lines · ZY - pavel
Quoted 5 lines · Chin Liang See
socfpga: 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 <[email protected]>Quoted 9 lines
arch/arm/cpu/armv7/socfpga/system_manager.c line 27
Quoted 5 lines
arch/arm/cpu/armv7/socfpga/system_manager.c new file +5
-0+DECLARE_GLOBAL_DATA_PTR ; + +/* +* Configure all the pin mux +*/ As noted before, I'm not sure this is correct english. Otherwise, patch looks good to me.
Quoted 2 lines
Sorry as I thought I already done that.
Let me fix it on next revision.
Thanks!
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH v3 1/2 socfpga: Adding System Manager driver
In reply to Pavel Macheksocfpga: Adding System Manager driver which will configure the pin mux for real hardware Cyclone V development kit (not Virtual Platform)
--- 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
(quoted diff) +0 -0
b/arch/arm/cpu/armv7/socfpga/Makefile
index 518e67a..cf2829a 100644
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)
(quoted diff) +0 -0
b/arch/arm/cpu/armv7/socfpga/spl.c
index 84216eb..28d8c99 100644
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 ();
(quoted diff) +0 -0
b/arch/arm/cpu/armv7/socfpga/system_manager.c new file mode 100644
index 0000000..d893e97
arch/arm/cpu/armv7/socfpga/system_manager.c new file +41 -0
41 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h index f353eb2..819c280 100644
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_ */
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-socfpga/system_manager.h new file mode 100644
index 0000000..ef9e464
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_ */
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/Makefile
index 43bbc37..3092387 100644
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))
(quoted diff) +0 -0
b/include/configs/socfpga_cyclone5.h
index be3799b..dd6db9e 100644
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 v3 2/2 socfpga: Adding System Manager driver
socfpga: Adding the generated pin mux
configuration by Preloader Generator tool
--- board/altera/socfpga_cyclone5/pinmux_config.c | 214 +++++++++++++++++++++++++ board/altera/socfpga_cyclone5/pinmux_config.h | 54 +++++++ 2 files changed, 268 insertions(+) create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.c create mode 100644 board/altera/socfpga_cyclone5/pinmux_config.h
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/pinmux_config.c
new file mode 100644
index 0000000..8b09005
board/altera/socfpga_cyclone5/pinmux_config.c new file +214 -0
214 lines not on this page · raw message
(quoted diff) +0 -0
b/board/altera/socfpga_cyclone5/pinmux_config.h
new file mode 100644
index 0000000..f278f2b
board/altera/socfpga_cyclone5/pinmux_config.h new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.7.9.5