Skip to contentSkip to conversation

apf27: add support of armadeus apf27

PATCH New Philippe Reynes 2 participants 5 messages Sep 10, 2013 – Sep 11, 2013 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

v7 cover apf27: add support of armadeus apf27

Difference between v7 and v6:
- first patch "mx27: add missing constant for mx27" already accepted
- remove useless variables regs
- remove useless i2c initialization (already done in board_f.c)
- remove CONFIG_I2C_MULTI_BUS (not used)
- update u-boot filename in u-boot env
- fix a typo in a comment in apf27.h

Difference between v6 and v5:
- use generic board framework
- add fpga name

Difference between v5 and v4:
- use spl framework
- use script
- use SPDX-License-Identifier
- use u-boot-with-spl.bin (instead of u-boot-nand.bin)
- fix some comments format issue

Difference between v4 and v3:
- use standard start.S
- use part to know u-boot offset
- fix some comments format issue

Difference between v3 and v2:
- rebase on imx branch
- merge support and spl patch
- clean code of apf27_gpio_init
- clean code of start.S

Difference between v1 and v2:
- use spl instead of nand_spl
- use gpio api
- remove use of useless CONFIG_SYS
- remove use of config.mk
- remove dead code

Philippe Reynes (2):
apf27: add support for the armadeus APF27 board
apf27: add FPGA support for the apf27 board

 MAINTAINERS                          |    5 +
 board/armadeus/apf27/Makefile        |   33 +++
 board/armadeus/apf27/apf27.c         |  256 ++++++++++++++++++
 board/armadeus/apf27/apf27.h         |  489 ++++++++++++++++++++++++++++++++++
 board/armadeus/apf27/fpga.c          |  224 ++++++++++++++++
 board/armadeus/apf27/fpga.h          |   25 ++
 board/armadeus/apf27/lowlevel_init.S |  168 ++++++++++++
 boards.cfg                           |    1 +
 include/configs/apf27.h              |  388 +++++++++++++++++++++++++++
 9 files changed, 1589 insertions(+), 0 deletions(-)
 create mode 100644 board/armadeus/apf27/Makefile
 create mode 100644 board/armadeus/apf27/apf27.c
 create mode 100644 board/armadeus/apf27/apf27.h
 create mode 100644 board/armadeus/apf27/fpga.c
 create mode 100644 board/armadeus/apf27/fpga.h
 create mode 100644 board/armadeus/apf27/lowlevel_init.S
 create mode 100644 include/configs/apf27.h
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH v7 1/2 apf27: add support for the armadeus APF27 board

---
 MAINTAINERS                          |    5 +
 board/armadeus/apf27/Makefile        |   30 ++
 board/armadeus/apf27/apf27.c         |  251 +++++++++++++++++
 board/armadeus/apf27/apf27.h         |  489 ++++++++++++++++++++++++++++++++++
 board/armadeus/apf27/lowlevel_init.S |  168 ++++++++++++
 boards.cfg                           |    1 +
 include/configs/apf27.h              |  374 ++++++++++++++++++++++++++
 7 files changed, 1318 insertions(+), 0 deletions(-)
 create mode 100644 board/armadeus/apf27/Makefile
 create mode 100644 board/armadeus/apf27/apf27.c
 create mode 100644 board/armadeus/apf27/apf27.h
 create mode 100644 board/armadeus/apf27/lowlevel_init.S
 create mode 100644 include/configs/apf27.h
MAINTAINERS +5 -0
index 0a900dc..abf8380 100644
@@ -716,6 +716,11 @@ Ilko Iliev <[email protected]>
 	PM9263		AT91SAM9263
 	PM9G45		ARM926EJS (AT91SAM9G45 SoC)
 
+Eric Jarrige <[email protected]>
+Philippe Reynes <[email protected]>
+
+	apf27		ARM926EJS (i.MX27 SoC)
+
 Michael Jones <[email protected]>
 
 	omap3_mvblx	ARM ARMV7 (OMAP3xx SoC)
board/armadeus/apf27/Makefile new file +30 -0
new file mode 100644
index 0000000..ec0cb03
@@ -0,0 +1,30 @@
+#
+# (C) Copyright 2000-2004
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+# (C) Copyright 2012-2013
+# Eric Jarrige <[email protected]>
+#
+# SPDX-License-Identifier:    GPL-2.0+
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).o
+
+COBJS	:= apf27.o
+SOBJS	:= lowlevel_init.o
+
+SRCS	:= $(COBJS:.o=.c) $(SOBJS:.o=.S)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#########################################################################
+
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/armadeus/apf27/apf27.c new file +251 -0

251 lines not on this page · raw message

board/armadeus/apf27/apf27.h new file +489 -0

489 lines not on this page · raw message

board/armadeus/apf27/lowlevel_init.S new file +168 -0

168 lines not on this page · raw message

boards.cfg +1 -0
index 79d6cd8..d823fae 100644
@@ -195,6 +195,7 @@ jadecpu                      arm         arm926ejs   jadecpu             syteco
 mx25pdk                      arm         arm926ejs   mx25pdk             freescale      mx25		mx25pdk:IMX_CONFIG=board/freescale/mx25pdk/imximage.cfg
 tx25                         arm         arm926ejs   tx25                karo           mx25
 zmx25                        arm         arm926ejs   zmx25               syteco         mx25
+apf27                        arm         arm926ejs   apf27               armadeus       mx27
 imx27lite                    arm         arm926ejs   imx27lite           logicpd        mx27
 magnesium                    arm         arm926ejs   imx27lite           logicpd        mx27
 mx23_olinuxino               arm         arm926ejs   mx23_olinuxino      olimex         mxs		mx23_olinuxino
include/configs/apf27.h new file +374 -0

374 lines not on this page · raw message

Signature · 1 line
1.7.4.4
#2 lore raw

PATCH v7 1/2 apf27: add support for the armadeus APF27 board

Quoted 4 lines · Philippe Reynes

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH v7 2/2 apf27: add FPGA support for the apf27 board

In reply to Philippe Reynes
---
 board/armadeus/apf27/Makefile |    3 +
 board/armadeus/apf27/apf27.c  |    5 +
 board/armadeus/apf27/fpga.c   |  224 +++++++++++++++++++++++++++++++++++++++++
 board/armadeus/apf27/fpga.h   |   25 +++++
 include/configs/apf27.h       |   14 +++
 5 files changed, 271 insertions(+), 0 deletions(-)
 create mode 100644 board/armadeus/apf27/fpga.c
 create mode 100644 board/armadeus/apf27/fpga.h
board/armadeus/apf27/Makefile +3 -0
index ec0cb03..5fcda6e 100644
@@ -13,6 +13,9 @@ LIB	= $(obj)lib$(BOARD).o
 
 COBJS	:= apf27.o
 SOBJS	:= lowlevel_init.o
+ifdef CONFIG_FPGA
+COBJS	+= fpga.o
+endif
 
 SRCS	:= $(COBJS:.o=.c) $(SOBJS:.o=.S)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/armadeus/apf27/apf27.c +5 -0
index c0d9c41..30e720d 100644
@@ -19,6 +19,7 @@
 #include <asm/errno.h>
 #include "apf27.h"
 #include "crc.h"
+#include "fpga.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -174,6 +175,10 @@ int board_init(void)
 	apf27_setup_port();
 	apf27_iomux_init();
 	apf27_devices_init();
+#if defined(CONFIG_FPGA)
+	APF27_init_fpga();
+#endif
+
 
 	return 0;
 }
board/armadeus/apf27/fpga.c new file +224 -0

224 lines not on this page · raw message

board/armadeus/apf27/fpga.h new file +25 -0
new file mode 100644
index 0000000..84a5244
@@ -0,0 +1,25 @@
+/*
+ * (C) Copyright 2002-2013
+ * Eric Jarrige <[email protected]>
+ *
+ * based on the files by
+ * Rich Ireland, Enterasys Networks, rireland at enterasys.com
+ * and
+ * Keith Outwater, keith_outwater at mvis.com
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+extern void APF27_init_fpga(void);
+
+extern int fpga_pre_fn(int cookie);
+extern int fpga_pgm_fn(int assert_pgm, int flush, int cookie);
+extern int fpga_cs_fn(int assert_cs, int flush, int cookie);
+extern int fpga_init_fn(int cookie);
+extern int fpga_done_fn(int cookie);
+extern int fpga_clk_fn(int assert_clk, int flush, int cookie);
+extern int fpga_wr_fn(int assert_write, int flush, int cookie);
+extern int fpga_rdata_fn(unsigned char *data, int cookie);
+extern int fpga_wdata_fn(unsigned char data, int flush, int cookie);
+extern int fpga_abort_fn(int cookie);
+extern int fpga_post_fn(int cookie);
+extern int fpga_busy_fn(int cookie);
include/configs/apf27.h +14 -0
index 6fd4818..e7e258f 100644
@@ -293,6 +293,20 @@
 #define CONFIG_MII				/* MII PHY management	*/
 
 /*
+ * FPGA
+ */
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_FPGA
+#endif
+#define CONFIG_FPGA_COUNT		1
+#define CONFIG_FPGA_XILINX
+#define CONFIG_FPGA_SPARTAN3
+#define CONFIG_SYS_FPGA_WAIT		250 /* 250 ms */
+#define CONFIG_SYS_FPGA_PROG_FEEDBACK
+#define CONFIG_SYS_FPGA_CHECK_CTRLC
+#define CONFIG_SYS_FPGA_CHECK_ERROR
+
+/*
  * Fuses - IIM
  */
 #ifdef CONFIG_CMD_IMX_FUSE
Signature · 1 line
1.7.4.4
#4 lore raw

PATCH v7 2/2 apf27: add FPGA support for the apf27 board

Quoted 4 lines · Philippe Reynes

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================