apf27: add support of armadeus apf27
Subsystems (3)
v6 cover apf27: add support of armadeus apf27
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 (3):
mx27: add missing constant for mx27
apf27: add support for the armadeus APF27 board
apf27: add FPGA support for the apf27 board
MAINTAINERS | 5 + arch/arm/cpu/arm926ejs/mx27/asm-offsets.c | 5 + arch/arm/include/asm/arch-mx27/imx-regs.h | 6 +- board/armadeus/apf27/Makefile | 33 ++ board/armadeus/apf27/apf27.c | 263 ++++++++++++++++ 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 | 389 +++++++++++++++++++++++ 11 files changed, 1607 insertions(+), 1 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
PATCH v6 1/3 mx27: add missing constant for mx27
Add some missing constant (chip select, ...)
--- arch/arm/cpu/arm926ejs/mx27/asm-offsets.c | 5 +++++ arch/arm/include/asm/arch-mx27/imx-regs.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletions(-)
arch/arm/cpu/arm926ejs/mx27/asm-offsets.c +5 -0
@@ -38,5 +38,10 @@ int main(void)DEFINE (ESDCFG1_ROF , offsetof(struct esdramc_regs , esdcfg1));DEFINE (ESDMISC_ROF , offsetof(struct esdramc_regs , esdmisc)); +DEFINE (GPCR ,IMX_SYSTEM_CTL_BASE + + offsetof(struct system_control_regs , gpcr)); +DEFINE (FMCR ,IMX_SYSTEM_CTL_BASE + + offsetof(struct system_control_regs , fmcr)); +return 0 ; }
arch/arm/include/asm/arch-mx27/imx-regs.h +5 -1
@@ -169,7 +169,7 @@ struct iim_regs {struct fuse_bank {u32 fuse_regs[0x20 ];u32 fuse_rsvd[0xe0 ]; - } bank[1 ]; + } bank[2 ]; };struct fuse_bank0_regs {
@@ -209,9 +209,13 @@ struct fuse_bank0_regs {#define IIM_BASE_ADDR IMX_IIM_BASE#define IMX_FEC_BASE (0x2b000 + IMX_IO_BASE) +#define IMX_NFC_BASE (0xD8000000)#define IMX_ESD_BASE (0xD8001000)#define IMX_WEIM_BASE (0xD8002000) +#define NFC_BASE_ADDR IMX_NFC_BASE + +/* FMCR System Control bit definition*/ #define UART4_RXD_CTL (1 << 25)#define UART4_RTS_CTL (1 << 24)
Signature · 1 line
1.7.4.4
PATCH v6 1/3 mx27: add missing constant for mx27
Quoted 6 lines · Philippe Reynes
Add some missing constant (chip select, ...)
Signed-off-by Philippe Reynes <[email protected]>Signed-off-by Eric Jarrige <[email protected]>Acked-by Stefano Babic <[email protected]>---
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 =====================================================================
PATCH v6 2/3 apf27: add support for the armadeus APF27 board
In reply to Philippe Reynes--- MAINTAINERS | 5 + board/armadeus/apf27/Makefile | 30 ++ board/armadeus/apf27/apf27.c | 258 ++++++++++++++++++ board/armadeus/apf27/apf27.h | 489 ++++++++++++++++++++++++++++++++++ board/armadeus/apf27/lowlevel_init.S | 168 ++++++++++++ boards.cfg | 1 + include/configs/apf27.h | 375 ++++++++++++++++++++++++++ 7 files changed, 1326 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
@@ -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
@@ -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 +258 -0
258 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
@@ -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 +375 -0
375 lines not on this page · raw message
Signature · 1 line
1.7.4.4
PATCH v6 2/3 apf27: add support for the armadeus APF27 board
Hi Philippe,
Quoted 4 lines · Philippe Reynes
Signed-off-by Philippe Reynes <[email protected]>Signed-off-by Eric Jarrige <[email protected]>Signed-off-by Nicolas Colombain <[email protected]>---
By merging your patches I found some compiler warnings:
apf27.c: In function 'apf27_devices_init':
apf27.c:130:2: warning: implicit declaration of function 'bus_i2c_init' [-Wimplicit-function-declaration]
apf27.c:103:25: warning: unused variable 'regs' [-Wunused-variable] apf27.c: In function 'apf27_devices_init':
apf27.c:130:2: warning: implicit declaration of function 'bus_i2c_init' [-Wimplicit-function-declaration]
apf27.c:103:25: warning: unused variable 'regs' [-Wunused-variable]
Can you fix them and resubmit ? 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 =====================================================================
PATCH v6 3/3 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
@@ -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
@@ -19,6 +19,7 @@#include <asm/errno.h> #include "apf27.h" #include "crc.h" +#include "fpga.h" DECLARE_GLOBAL_DATA_PTR ;
@@ -181,6 +182,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
@@ -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
@@ -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 s */ +#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