Skip to contentSkip to conversation

MX35: added ESDC structure to imx-regs

PATCH New Stefano Babic 5 participants 29 messages Sep 16, 2011 – Oct 24, 2011 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/8 MX35: added ESDC structure to imx-regs

The structure and PLL defines are added to
the imx-regs.h file and dropped from board
header files.

---
 arch/arm/include/asm/arch-mx35/imx-regs.h |   30 +++++++++++++++++++++++++++++
 board/freescale/mx35pdk/mx35pdk.h         |   18 -----------------
 2 files changed, 30 insertions(+), 18 deletions(-)
arch/arm/include/asm/arch-mx35/imx-regs.h +30 -0
index e741fb0..08fd2d5 100644
@@ -147,6 +147,19 @@
 #define PLL_MFI(x)		(((x) & 0xf) << 10)
 #define PLL_MFN(x)		(((x) & 0x3ff) << 0)
 
+#define _PLL_BRM(x)	((x) << 31)
+#define _PLL_PD(x)	(((x) - 1) << 26)
+#define _PLL_MFD(x)	(((x) - 1) << 16)
+#define _PLL_MFI(x)	((x) << 10)
+#define _PLL_MFN(x)	(x)
+#define _PLL_SETTING(brm, pd, mfd, mfi, mfn) \
+	(_PLL_BRM(brm) | _PLL_PD(pd) | _PLL_MFD(mfd) | _PLL_MFI(mfi) |\
+	 _PLL_MFN(mfn))
+
+#define CCM_MPLL_532_HZ	_PLL_SETTING(1, 1, 12, 11, 1)
+#define CCM_MPLL_399_HZ _PLL_SETTING(0, 1, 16, 8, 5)
+#define CCM_PPLL_300_HZ _PLL_SETTING(0, 1, 4, 6, 1)
+
 #define CSCR_U(x)	(WEIM_CTRL_CS#x + 0)
 #define CSCR_L(x)	(WEIM_CTRL_CS#x + 4)
 #define CSCR_A(x)	(WEIM_CTRL_CS#x + 8)
@@ -286,6 +299,23 @@ struct wdog_regs {
 	u16 wmcr;	/* Misc Control */
 };
 
+struct esdc_regs {
+	u32	esdctl0;
+	u32	esdcfg0;
+	u32	esdctl1;
+	u32	esdcfg1;
+	u32	esdmisc;
+	u32	reserved[4];
+	u32	esdcdly[5];
+	u32	esdcdlyl;
+};
+
+#define ESDC_MISC_RST		(1 << 1)
+#define ESDC_MISC_MDDR_EN	(1 << 2)
+#define ESDC_MISC_MDDR_DL_RST	(1 << 3)
+#define ESDC_MISC_DDR_EN	(1 << 8)
+#define ESDC_MISC_DDR2_EN	(1 << 9)
+
 /*
  * NFMS bit in RCSR register for pagesize of nandflash
  */
board/freescale/mx35pdk/mx35pdk.h +0 -18
index 409aeb2..6aeb218 100644
@@ -59,24 +59,6 @@
 #define CCM_CCMR_CONFIG		0x003F4208
 #define CCM_PDR0_CONFIG		0x00801000
 
-#define PLL_BRM_OFFSET	31
-#define PLL_PD_OFFSET	26
-#define PLL_MFD_OFFSET	16
-#define PLL_MFI_OFFSET	10
-
-#define _PLL_BRM(x)	((x) << PLL_BRM_OFFSET)
-#define _PLL_PD(x)	(((x) - 1) << PLL_PD_OFFSET)
-#define _PLL_MFD(x)	(((x) - 1) << PLL_MFD_OFFSET)
-#define _PLL_MFI(x)	((x) << PLL_MFI_OFFSET)
-#define _PLL_MFN(x)	(x)
-#define _PLL_SETTING(brm, pd, mfd, mfi, mfn) \
-	(_PLL_BRM(brm) | _PLL_PD(pd) | _PLL_MFD(mfd) | _PLL_MFI(mfi) |\
-	 _PLL_MFN(mfn))
-
-#define CCM_MPLL_532_HZ	_PLL_SETTING(1, 1, 12, 11, 1)
-#define CCM_MPLL_399_HZ _PLL_SETTING(0, 1, 16, 8, 5)
-#define CCM_PPLL_300_HZ _PLL_SETTING(0, 1, 4, 6, 1)
-
 /* MEMORY SETTING */
 #define ESDCTL_0x92220000	0x92220000
 #define ESDCTL_0xA2220000	0xA2220000
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/8 MX35: add pins definition for UART3

---
 arch/arm/include/asm/arch-mx35/mx35_pins.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/include/asm/arch-mx35/mx35_pins.h +3 -0
index 14669ff..3676e33 100644
@@ -349,6 +349,9 @@ typedef enum iomux_pins {
 	MX35_PIN_FEC_TDATA2 = _MXC_BUILD_GPIO_PIN(2, 21, 0x31C, 0x780),
 	MX35_PIN_FEC_RDATA3 = _MXC_BUILD_GPIO_PIN(2, 22, 0x320, 0x784),
 	MX35_PIN_FEC_TDATA3 = _MXC_BUILD_GPIO_PIN(2, 23, 0x324, 0x788),
+
+	MX35_PIN_RTS2_UART3_RXD_MUX = _MXC_BUILD_NON_GPIO_PIN(0x1a0, 0x5e4),
+	MX35_PIN_CTS2_UART3_TXD_MUX = _MXC_BUILD_NON_GPIO_PIN(0x1a4, 0x5e8),
 } iomux_pin_name_t;
 
 #endif
Signature · 1 line
1.7.1
#2 lore raw

PATCH 3/8 MX35: add reset cause as provided by other i.MX

In reply to Stefano Babic
---
 arch/arm/cpu/arm1136/mx35/generic.c |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)
arch/arm/cpu/arm1136/mx35/generic.c +29 -2
index fcfaba5..951bccb 100644
@@ -422,12 +422,39 @@ U_BOOT_CMD(
 	""
 );
 
+static char *get_reset_cause(void)
+{
+	/* read RCSR register from CCM module */
+	struct ccm_regs *ccm =
+		(struct ccm_regs *)IMX_CCM_BASE;
+
+	u32 cause = readl(&ccm->rcsr) & 0x0F;
+
+	switch (cause) {
+	case 0x0000:
+		return "POR";
+	case 0x0002:
+		return "JTAG";
+	case 0x0004:
+		return "RST";
+	case 0x0008:
+		return "WDOG";
+	default:
+		return "unknown reset";
+	}
+}
+
 #if defined(CONFIG_DISPLAY_CPUINFO)
 int print_cpuinfo(void)
 {
-	printf("CPU:   Freescale i.MX35 at %d MHz\n",
+	u32 srev = get_cpu_rev();
+
+	printf("CPU:   Freescale i.MX35 rev %d.%d at %d MHz.\n",
+		(srev & 0xF0) >> 4, (srev & 0x0F),
 		get_mcu_main_clk() / 1000000);
-	/* mxc_dump_clocks(); */
+
+	printf("Reset cause: %s\n", get_reset_cause());
+
 	return 0;
 }
 #endif
Signature · 1 line
1.7.1
#3 lore raw

PATCH 4/8 MX35: factorize common assembly code

In reply to Stefano Babic
---
 arch/arm/include/asm/arch-mx35/lowlevel_macro.S |  140 +++++++++++++++++++++++
 1 files changed, 140 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx35/lowlevel_macro.S
arch/arm/include/asm/arch-mx35/lowlevel_macro.S new file +140 -0
new file mode 100644
index 0000000..05aa951
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2007, Guennadi Liakhovetski <[email protected]>
+ *
+ * (C) Copyright 2008-2010 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+/*
+ * AIPS setup - Only setup MPROTx registers.
+ * The PACR default values are good.
+ */
+.macro init_aips
+	/*
+	 * Set all MPROTx to be non-bufferable, trusted for R/W,
+	 * not forced to user-mode.
+	 */
+	ldr r0, =AIPS1_BASE_ADDR
+	ldr r1, =AIPS_MPR_CONFIG
+	str r1, [r0, #0x00]
+	str r1, [r0, #0x04]
+	ldr r0, =AIPS2_BASE_ADDR
+	str r1, [r0, #0x00]
+	str r1, [r0, #0x04]
+
+	/*
+	 * Clear the on and off peripheral modules Supervisor Protect bit
+	 * for SDMA to access them. Did not change the AIPS control registers
+	 * (offset 0x20) access type
+	 */
+	ldr r0, =AIPS1_BASE_ADDR
+	ldr r1, =AIPS_OPACR_CONFIG
+	str r1, [r0, #0x40]
+	str r1, [r0, #0x44]
+	str r1, [r0, #0x48]
+	str r1, [r0, #0x4C]
+	str r1, [r0, #0x50]
+	ldr r0, =AIPS2_BASE_ADDR
+	str r1, [r0, #0x40]
+	str r1, [r0, #0x44]
+	str r1, [r0, #0x48]
+	str r1, [r0, #0x4C]
+	str r1, [r0, #0x50]
+.endm
+
+/* MAX (Multi-Layer AHB Crossbar Switch) setup */
+.macro init_max
+	ldr r0, =MAX_BASE_ADDR
+	/* MPR - priority is M4 > M2 > M3 > M5 > M0 > M1 */
+	ldr r1, =MAX_MPR_CONFIG
+	str r1, [r0, #0x000]        /* for S0 */
+	str r1, [r0, #0x100]        /* for S1 */
+	str r1, [r0, #0x200]        /* for S2 */
+	str r1, [r0, #0x300]        /* for S3 */
+	str r1, [r0, #0x400]        /* for S4 */
+	/* SGPCR - always park on last master */
+	ldr r1, =MAX_SGPCR_CONFIG
+	str r1, [r0, #0x010]        /* for S0 */
+	str r1, [r0, #0x110]        /* for S1 */
+	str r1, [r0, #0x210]        /* for S2 */
+	str r1, [r0, #0x310]        /* for S3 */
+	str r1, [r0, #0x410]        /* for S4 */
+	/* MGPCR - restore default values */
+	ldr r1, =MAX_MGPCR_CONFIG
+	str r1, [r0, #0x800]        /* for M0 */
+	str r1, [r0, #0x900]        /* for M1 */
+	str r1, [r0, #0xA00]        /* for M2 */
+	str r1, [r0, #0xB00]        /* for M3 */
+	str r1, [r0, #0xC00]        /* for M4 */
+	str r1, [r0, #0xD00]        /* for M5 */
+.endm
+
+/* M3IF setup */
+.macro init_m3if
+	/* Configure M3IF registers */
+	ldr r1, =M3IF_BASE_ADDR
+	/*
+	* M3IF Control Register (M3IFCTL)
+	* MRRP[0] = L2CC0 not on priority list (0 << 0)	= 0x00000000
+	* MRRP[1] = L2CC1 not on priority list (0 << 0)	= 0x00000000
+	* MRRP[2] = MBX not on priority list (0 << 0)	= 0x00000000
+	* MRRP[3] = MAX1 not on priority list (0 << 0)	= 0x00000000
+	* MRRP[4] = SDMA not on priority list (0 << 0)	= 0x00000000
+	* MRRP[5] = MPEG4 not on priority list (0 << 0)	= 0x00000000
+	* MRRP[6] = IPU1 on priority list (1 << 6)	= 0x00000040
+	* MRRP[7] = IPU2 not on priority list (0 << 0)	= 0x00000000
+	*						------------
+	*						  0x00000040
+	*/
+	ldr r0, =M3IF_CONFIG
+	str r0, [r1]  /* M3IF control reg */
+.endm
+
+.macro core_init
+	mrc 15, 0, r1, c1, c0, 0
+
+	mrc 15, 0, r0, c1, c0, 1
+	orr r0, r0, #7
+	mcr 15, 0, r0, c1, c0, 1
+	orr r1, r1, #(1<<11)
+
+	/* Set unaligned access enable */
+	orr r1, r1, #(1<<22)
+
+	/* Set low int latency enable */
+	orr r1, r1, #(1<<21)
+
+	mcr 15, 0, r1, c1, c0, 0
+
+	mov r0, #0
+
+	/* Set branch prediction enable */
+	mcr 15, 0, r0, c15, c2, 4
+
+	mcr 15, 0, r0, c7, c7, 0        /* invalidate I cache and D cache */
+	mcr 15, 0, r0, c8, c7, 0        /* invalidate TLBs */
+	mcr 15, 0, r0, c7, c10, 4       /* Drain the write buffer */
+
+	/*
+	 * initializes very early AIPS
+	 * Then it also initializes Multi-Layer AHB Crossbar Switch,
+	 * M3IF
+	 * Also setup the Peripheral Port Remap register inside the core
+	 */
+	ldr r0, =0x40000015        /* start from AIPS 2GB region */
+	mcr p15, 0, r0, c15, c2, 4
+.endm
Signature · 1 line
1.7.1
#4 lore raw

PATCH 5/8 ARM: moved general function to arm/lib

In reply to Stefano Babic

Functions inside armv7/syslib can be used by other ARM architectures, too. The file is added as part of ARM library.

---
 arch/arm/cpu/armv7/Makefile |    2 -
 arch/arm/cpu/armv7/syslib.c |   69 -------------------------------------------
 arch/arm/lib/Makefile       |    2 +
 arch/arm/lib/syslib.c       |   69 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 71 insertions(+), 71 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/syslib.c
 create mode 100644 arch/arm/lib/syslib.c
arch/arm/cpu/armv7/Makefile +0 -2
index 92a5a96..5b7f1c7 100644
@@ -32,8 +32,6 @@ COBJS	+= cache_v7.o
 COBJS	+= cpu.o
 endif
 
-COBJS  += syslib.o
-
 SRCS	:= $(START:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 START	:= $(addprefix $(obj),$(START))
arch/arm/cpu/armv7/syslib.c deleted +0 -69

69 lines not on this page · raw message

arch/arm/lib/Makefile +2 -0
index 300c8fa..c966aa7 100644
@@ -48,6 +48,8 @@ SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
 SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
 endif
 
+COBJS-y	+= syslib.o
+
 SRCS	:= $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
 	   $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
arch/arm/lib/syslib.c new file +69 -0

69 lines not on this page · raw message

Signature · 1 line
1.7.1
#5 lore raw

PATCH 5/8 ARM: moved general function to arm/lib

Quoted 4 lines · Stefano Babic

Functions inside armv7/syslib can be used by other ARM architectures, too. The file is added as part of ARM library.

Hi Albert,

Quoted 3 lines

---

Any issue regarding this patch (code was not really changed, the files are only moved to be available for other SOCs) ? I have some other patches for i.MX that depend on this one.....

Thanks,
Stefano

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

PATCH 5/8 ARM: moved general function to arm/lib

In reply to Stefano Babic

Dear Stefano Babic,

Quoted 6 lines · In message <[email protected]> you wrote:

Functions inside armv7/syslib can be used by other ARM architectures, too. The file is added as part of ARM library.

Quoted 8 lines
---
 arch/arm/cpu/armv7/Makefile |    2 -
 arch/arm/cpu/armv7/syslib.c |   69 -------------------------------------------
 arch/arm/lib/Makefile       |    2 +
 arch/arm/lib/syslib.c       |   69 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 71 insertions(+), 71 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/syslib.c
 create mode 100644 arch/arm/lib/syslib.c

Checkpatch says:

total: 2 errors, 0 warnings, 85 lines checked

Please clean up and resubmit. 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
The optimum committee has no members.
                                                   - Norman Augustine
#7 lore raw

PATCH 5/8 ARM: moved general function to arm/lib

Am 06/10/2011 23:30, schrieb Wolfgang Denk:

Quoted 18 lines

Dear Stefano Babic,

Quoted 6 lines · In message <[email protected]> you wrote:

Functions inside armv7/syslib can be used by other ARM architectures, too. The file is added as part of ARM library.

Quoted 8 lines
---
 arch/arm/cpu/armv7/Makefile |    2 -
 arch/arm/cpu/armv7/syslib.c |   69 -------------------------------------------
 arch/arm/lib/Makefile       |    2 +
 arch/arm/lib/syslib.c       |   69 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 71 insertions(+), 71 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/syslib.c
 create mode 100644 arch/arm/lib/syslib.c
Quoted 5 lines

Checkpatch says:

total: 2 errors, 0 warnings, 85 lines checked

Please clean up and resubmit. Thanks.

mmhhh..I do not know if this is correct. The patch is really only a "git mv", an the original files are only moved. If I run checkpatch, I see:

ERROR: spaces required around that ':' (ctx:VxV)
#164: FILE: arch/arm/lib/syslib.c:37:
+ "bne 1b":"=r" (loops):"0"(loops));
^

ERROR: spaces required around that ':' (ctx:VxV)
#164: FILE: arch/arm/lib/syslib.c:37:
+ "bne 1b":"=r" (loops):"0"(loops));
^

total: 2 errors, 0 warnings, 85 lines checked

This is an assembly inline - are we sure we apply the same rules for C and assembly ?

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

PATCH 5/8 ARM: moved general function to arm/lib

Dear stefano babic,

Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 9 lines
Quoted 8 lines
 arch/arm/cpu/armv7/Makefile |    2 -
 arch/arm/cpu/armv7/syslib.c |   69 -------------------------------------------
 arch/arm/lib/Makefile       |    2 +
 arch/arm/lib/syslib.c       |   69 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 71 insertions(+), 71 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/syslib.c
 create mode 100644 arch/arm/lib/syslib.c
Quoted 8 lines
Quoted 5 lines

Checkpatch says:

total: 2 errors, 0 warnings, 85 lines checked

Please clean up and resubmit. Thanks.

mmhhh..I do not know if this is correct. The patch is really only a "git mv", an the original files are only moved. If I run checkpatch, I see:

No, it's NOT a mv, it's a remove + add. The patch was not correctly formatted. This should be fixed, then!

Quoted 10 lines

ERROR: spaces required around that ':' (ctx:VxV)
#164: FILE: arch/arm/lib/syslib.c:37:

(quoted diff) +1 -0
+			  "bne 1b":"=r" (loops):"0"(loops));
 			          ^

ERROR: spaces required around that ':' (ctx:VxV)
#164: FILE: arch/arm/lib/syslib.c:37:

(quoted diff) +1 -0
+			  "bne 1b":"=r" (loops):"0"(loops));
 			                       ^
Quoted 4 lines

total: 2 errors, 0 warnings, 85 lines checked

This is an assembly inline - are we sure we apply the same rules for C and assembly ?

Guess you are right here. Sorry.

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
Doubt is a pain too lonely to know that faith is his twin brother.
- Kahlil Gibran
#9 lore raw

PATCH 6/8 I2C: added I2C-2 and I2C-3 to MX35

In reply to Stefano Babic
---
 drivers/i2c/mxc_i2c.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/i2c/mxc_i2c.c +4 -0
index ebde3c5..25c33eb 100644
@@ -63,6 +63,10 @@
 #define I2C_BASE        I2C2_BASE_ADDR
 #elif defined(CONFIG_SYS_I2C_MX35_PORT1)
 #define I2C_BASE	I2C_BASE_ADDR
+#elif defined(CONFIG_SYS_I2C_MX35_PORT2)
+#define I2C_BASE	I2C2_BASE_ADDR
+#elif defined(CONFIG_SYS_I2C_MX35_PORT3)
+#define I2C_BASE	I2C3_BASE_ADDR
 #else
 #error "define CONFIG_SYS_I2C_MX<Processor>_PORTx to use the mx I2C driver"
 #endif
Signature · 1 line
1.7.1
#10 lore raw

PATCH 6/8 I2C: added I2C-2 and I2C-3 to MX35

Hello Stefano,

Quoted 5 lines · Stefano Babic
---
 drivers/i2c/mxc_i2c.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#11 lore raw

PATCH 7/8 MX35: Drop unnecessary prototypes from imx-regs.h

In reply to Stefano Babic
---
 arch/arm/include/asm/arch-mx35/imx-regs.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
arch/arm/include/asm/arch-mx35/imx-regs.h +0 -4
index 08fd2d5..038f0b6 100644
@@ -325,9 +325,5 @@ struct esdc_regs {
 
 #define CCM_RCSR_NF_16BIT_SEL	(1 << 14)
 
-extern unsigned int get_board_rev(void);
-extern int is_soc_rev(int rev);
-extern int sdhc_init(void);
-
 #endif
 #endif /* __ASM_ARCH_MX35_H */
Signature · 1 line
1.7.1
#12 lore raw

PATCH 8/8 MX35: add support for flea3 board

In reply to Stefano Babic

The flea3 board is a custom board used in automotive. Network (FEC), NOR, NAND and SPI are supported.

---
 board/flea3/Makefile        |   49 ++++++++
 board/flea3/flea3.c         |  254 +++++++++++++++++++++++++++++++++++++++
 board/flea3/lowlevel_init.S |   79 ++++++++++++
 boards.cfg                  |    1 +
 include/configs/flea3.h     |  280 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 663 insertions(+), 0 deletions(-)
 create mode 100644 board/flea3/Makefile
 create mode 100644 board/flea3/flea3.c
 create mode 100644 board/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h
board/flea3/Makefile new file +49 -0
new file mode 100644
index 0000000..f5ad494
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2007, Guennadi Liakhovetski <[email protected]>
+#
+# (C) Copyright 2008-2009 Freescale Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).o
+
+COBJS	:= flea3.o
+SOBJS	:= lowlevel_init.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/flea3/flea3.c new file +254 -0

254 lines not on this page · raw message

board/flea3/lowlevel_init.S new file +79 -0

79 lines not on this page · raw message

boards.cfg +1 -0
index d5fc5cb..4fc2051 100644
@@ -44,6 +44,7 @@ imx31_phycore_eet            arm         arm1136     imx31_phycore       -
 mx31pdk_nand                 arm         arm1136     mx31pdk             freescale      mx31         mx31pdk:NAND_U_BOOT
 mx31pdk                      arm         arm1136     -                   freescale      mx31         mx31pdk:SKIP_LOWLEVEL_INIT
 mx35pdk                      arm         arm1136     -                   freescale      mx35
+flea3                        arm         arm1136     -                   -              mx35
 omap2420h4                   arm         arm1136     -                   ti             omap24xx
 tnetv107x_evm                arm         arm1176     tnetv107xevm        ti             tnetv107x
 integratorap_cm720t          arm         arm720t     integrator          armltd         -           integratorap
include/configs/flea3.h new file +280 -0

280 lines not on this page · raw message

Signature · 1 line
1.7.1
reviewer
#13 lore raw

PATCH 8/8 MX35: add support for flea3 board

Hi Stefano,

On Fri, Sep 16, 2011 at 6:46 AM, Stefano Babic <[email protected]> wrote:
..

Review

Quoted 8 lines
(quoted diff) +8 -0
+void board_setup_sdram(void)
+{
+ ? ? ? u32 val;
+ ? ? ? struct esdc_regs *esdc = (struct esdc_regs *)ESDCTL_BASE_ADDR;
+
+ ? ? ? /* Initialize with default values both CSD0/1 */
+ ? ? ? writel(0x2000, &esdc->esdctl0);
+ ? ? ? writel(0x2000, &esdc->esdctl1);

On other boards we setup the SDRAM in lowlevel_init.S and here you do it on the board file.

Shouldn?t this be setup in lowlevel_init.S for consistency?

Regards,

Fabio Estevam

#14 lore raw

PATCH 8/8 MX35: add support for flea3 board

Quoted 2 lines · Fabio Estevam

Hi Stefano,

Hi Fabio,

Quoted 14 lines · Stefano Babic

..

board/flea3/flea3.c line 76

Quoted 8 lines
board/flea3/flea3.c new file +8 -0
+void board_setup_sdram(void)
+{
+       u32 val;
+       struct esdc_regs *esdc = (struct esdc_regs *)ESDCTL_BASE_ADDR;
+
+       /* Initialize with default values both CSD0/1 */
+       writel(0x2000, &esdc->esdctl0);
+       writel(0x2000, &esdc->esdctl1);

On other boards we setup the SDRAM in lowlevel_init.S and here you do it on the board file.

Quoted 1 line

Shouldn?t this be setup in lowlevel_init.S for consistency?

Really the idea is to get rid (as much as possible) of lowlevel_init.S and make the whole setup in C code.

This board can be then the first one (MX3) doing that, that makes the code much more readable - and I see in recent patches that this is pushed for other architectures, too (I mean Heiko's patches for davinci AM1808). And this is done since a lot of time for some PowerPC boards.

The question arises if the other boards (at least the mx35pdk..) should be updated in the same way...

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-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
reviewer
#15 lore raw

PATCH 8/8 MX35: add support for flea3 board

In reply to Stefano Babic

Hi Stefano,

Quoted 10 lines · Stefano Babic

The flea3 board is a custom board used in automotive. Network (FEC), NOR, NAND and SPI are supported.

---

?board/flea3/Makefile ? ? ? ?| ? 49 ++++++++
?board/flea3/flea3.c ? ? ? ? | ?254 +++++++++++++++++++++++++++++++++++++++
?board/flea3/lowlevel_init.S | ? 79 ++++++++++++
?boards.cfg ? ? ? ? ? ? ? ? ?| ? ?1 +
?include/configs/flea3.h ? ? | ?280 +++++++++++++++++++++++++++++++++++++++++++
Quoted 5 lines

?5 files changed, 663 insertions(+), 0 deletions(-) ?create mode 100644 board/flea3/Makefile ?create mode 100644 board/flea3/flea3.c ?create mode 100644 board/flea3/lowlevel_init.S ?create mode 100644 include/configs/flea3.h

You missed an entry in MAINTAINERS file.

Regards,

Fabio Estevam

#16 lore raw

PATCH 8/8 MX35: add support for flea3 board

Quoted 19 lines · Fabio Estevam

Hi Stefano,

Quoted 4 lines · Stefano Babic

The flea3 board is a custom board used in automotive. Network (FEC), NOR, NAND and SPI are supported.

Quoted 11 lines
---
 board/flea3/Makefile        |   49 ++++++++
 board/flea3/flea3.c         |  254 +++++++++++++++++++++++++++++++++++++++
 board/flea3/lowlevel_init.S |   79 ++++++++++++
 boards.cfg                  |    1 +
 include/configs/flea3.h     |  280 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 663 insertions(+), 0 deletions(-)
 create mode 100644 board/flea3/Makefile
 create mode 100644 board/flea3/flea3.c
 create mode 100644 board/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h
Quoted 1 line

You missed an entry in MAINTAINERS file.

Ok, thanks - fixed in V2.

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

PATCH v2 8/8 MX35: add support for flea3 board

In reply to Stefano Babic

The flea3 board is a custom board used in automotive. Network (FEC), NOR, NAND and SPI are supported.

---

Changes since V1:
- add missing entry in MAINTAINERS (F. Estevam)

 MAINTAINERS                 |    1 +
 board/flea3/Makefile        |   49 ++++++++
 board/flea3/flea3.c         |  254 +++++++++++++++++++++++++++++++++++++++
 board/flea3/lowlevel_init.S |   79 ++++++++++++
 boards.cfg                  |    1 +
 include/configs/flea3.h     |  280 +++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 664 insertions(+), 0 deletions(-)
 create mode 100644 board/flea3/Makefile
 create mode 100644 board/flea3/flea3.c
 create mode 100644 board/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h
MAINTAINERS +1 -0
index 2f60a60..af7de17 100644
@@ -565,6 +565,7 @@ Albert ARIBAUD <[email protected]>
 Stefano Babic <[email protected]>
 
 	ea20		davinci
+	flea3		i.MX35
 	mx35pdk		i.MX35
 	mx51evk		i.MX51
 	polaris		xscale/pxa
board/flea3/Makefile new file +49 -0

49 lines not on this page · raw message

board/flea3/flea3.c new file +254 -0

254 lines not on this page · raw message

board/flea3/lowlevel_init.S new file +79 -0

79 lines not on this page · raw message

boards.cfg +1 -0
index d5fc5cb..4fc2051 100644
@@ -44,6 +44,7 @@ imx31_phycore_eet            arm         arm1136     imx31_phycore       -
 mx31pdk_nand                 arm         arm1136     mx31pdk             freescale      mx31         mx31pdk:NAND_U_BOOT
 mx31pdk                      arm         arm1136     -                   freescale      mx31         mx31pdk:SKIP_LOWLEVEL_INIT
 mx35pdk                      arm         arm1136     -                   freescale      mx35
+flea3                        arm         arm1136     -                   -              mx35
 omap2420h4                   arm         arm1136     -                   ti             omap24xx
 tnetv107x_evm                arm         arm1176     tnetv107xevm        ti             tnetv107x
 integratorap_cm720t          arm         arm720t     integrator          armltd         -           integratorap
include/configs/flea3.h new file +280 -0

280 lines not on this page · raw message

Signature · 1 line
1.7.1
#18 lore raw

PATCH 8/8 MX35: add support for flea3 board

In reply to Stefano Babic

Dear Stefano Babic,

Quoted 4 lines · In message <[email protected]> you wrote:

The flea3 board is a custom board used in automotive. Network (FEC), NOR, NAND and SPI are supported.

Quoted 11 lines
---
 board/flea3/Makefile        |   49 ++++++++
 board/flea3/flea3.c         |  254 +++++++++++++++++++++++++++++++++++++++
 board/flea3/lowlevel_init.S |   79 ++++++++++++
 boards.cfg                  |    1 +
 include/configs/flea3.h     |  280 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 663 insertions(+), 0 deletions(-)
 create mode 100644 board/flea3/Makefile
 create mode 100644 board/flea3/flea3.c
 create mode 100644 board/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h

Checkpatch says:

total: 0 errors, 1 warnings, 669 lines checked

Please clean up and resubmit. 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
No one can guarantee the actions of another.
	-- Spock, "Day of the Dove", stardate unknown
#19 lore raw

PATCH v3 8/8 MX35: add support for flea3 board

In reply to Stefano Babic

The flea3 board is a custom board by CarMediaLab used in automotive.
Network (FEC), NOR, NAND and SPI are supported.

---

Changes since V2:
- put the board into manufacturer's directory (CarMediaLab)

Changes since V1:
- add missing entry in MAINTAINERS (F. Estevam)

 MAINTAINERS                             |    1 +
 board/CarMediaLab/flea3/Makefile        |   49 ++++++
 board/CarMediaLab/flea3/flea3.c         |  254 ++++++++++++++++++++++++++++
 board/CarMediaLab/flea3/lowlevel_init.S |   79 +++++++++
 boards.cfg                              |    1 +
 include/configs/flea3.h                 |  280 +++++++++++++++++++++++++++++++
 6 files changed, 664 insertions(+), 0 deletions(-)
 create mode 100644 board/CarMediaLab/flea3/Makefile
 create mode 100644 board/CarMediaLab/flea3/flea3.c
 create mode 100644 board/CarMediaLab/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h
MAINTAINERS +1 -0
index 2f60a60..af7de17 100644
@@ -565,6 +565,7 @@ Albert ARIBAUD <[email protected]>
 Stefano Babic <[email protected]>
 
 	ea20		davinci
+	flea3		i.MX35
 	mx35pdk		i.MX35
 	mx51evk		i.MX51
 	polaris		xscale/pxa
board/CarMediaLab/flea3/Makefile new file +49 -0

49 lines not on this page · raw message

board/CarMediaLab/flea3/flea3.c new file +254 -0

254 lines not on this page · raw message

board/CarMediaLab/flea3/lowlevel_init.S new file +79 -0

79 lines not on this page · raw message

boards.cfg +1 -0
index d5fc5cb..853a5e4 100644
@@ -43,6 +43,7 @@ imx31_phycore                arm         arm1136     -                   -
 imx31_phycore_eet            arm         arm1136     imx31_phycore       -              mx31         imx31_phycore:IMX31_PHYCORE_EET
 mx31pdk_nand                 arm         arm1136     mx31pdk             freescale      mx31         mx31pdk:NAND_U_BOOT
 mx31pdk                      arm         arm1136     -                   freescale      mx31         mx31pdk:SKIP_LOWLEVEL_INIT
+flea3                        arm         arm1136     -                   CarMediaLab    mx35
 mx35pdk                      arm         arm1136     -                   freescale      mx35
 omap2420h4                   arm         arm1136     -                   ti             omap24xx
 tnetv107x_evm                arm         arm1176     tnetv107xevm        ti             tnetv107x
include/configs/flea3.h new file +280 -0

280 lines not on this page · raw message

Signature · 1 line
1.7.1
#20 lore raw

PATCH v3 8/8 MX35: add support for flea3 board

Dear Stefano Babic,

Quoted 13 lines · In message <[email protected]> you wrote:

The flea3 board is a custom board by CarMediaLab used in automotive.
Network (FEC), NOR, NAND and SPI are supported.

---

Changes since V2:
- put the board into manufacturer's directory (CarMediaLab)

Changes since V1:
- add missing entry in MAINTAINERS (F. Estevam)

Quoted 11 lines
 MAINTAINERS                             |    1 +
 board/CarMediaLab/flea3/Makefile        |   49 ++++++
 board/CarMediaLab/flea3/flea3.c         |  254 ++++++++++++++++++++++++++++
 board/CarMediaLab/flea3/lowlevel_init.S |   79 +++++++++
 boards.cfg                              |    1 +
 include/configs/flea3.h                 |  280 +++++++++++++++++++++++++++++++
 6 files changed, 664 insertions(+), 0 deletions(-)
 create mode 100644 board/CarMediaLab/flea3/Makefile
 create mode 100644 board/CarMediaLab/flea3/flea3.c
 create mode 100644 board/CarMediaLab/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h

Checkpatch says:

total: 0 errors, 1 warnings, 676 lines checked

Please clean up and resubmit. 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
Hegel was right when he said that we learn from history that man  can
never learn anything from history.              - George Bernard Shaw
#21 lore raw

PATCH v3 8/8 MX35: add support for flea3 board

Am 06/10/2011 23:28, schrieb Wolfgang Denk:

Quoted 28 lines

Dear Stefano Babic,

Quoted 13 lines · In message <[email protected]> you wrote:

The flea3 board is a custom board by CarMediaLab used in automotive.
Network (FEC), NOR, NAND and SPI are supported.

---

Changes since V2:
- put the board into manufacturer's directory (CarMediaLab)

Changes since V1:
- add missing entry in MAINTAINERS (F. Estevam)

Quoted 11 lines
 MAINTAINERS                             |    1 +
 board/CarMediaLab/flea3/Makefile        |   49 ++++++
 board/CarMediaLab/flea3/flea3.c         |  254 ++++++++++++++++++++++++++++
 board/CarMediaLab/flea3/lowlevel_init.S |   79 +++++++++
 boards.cfg                              |    1 +
 include/configs/flea3.h                 |  280 +++++++++++++++++++++++++++++++
 6 files changed, 664 insertions(+), 0 deletions(-)
 create mode 100644 board/CarMediaLab/flea3/Makefile
 create mode 100644 board/CarMediaLab/flea3/flea3.c
 create mode 100644 board/CarMediaLab/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h
Quoted 4 lines

Checkpatch says:

total: 0 errors, 1 warnings, 676 lines checked

Thanks, it seems I forget to rerun checkpatch again - I fix it.

Best regards,
Stefanio 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-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#22 lore raw

PATCH v4 8/8 MX35: add support for flea3 board

In reply to Stefano Babic

The flea3 board is a custom board by CarMediaLab used in automotive.
Network (FEC), NOR, NAND and SPI are supported.

---
Changes since V3:
- fix checkpatch warnings (Wolfgang Denk)

Changes since V2:
- put the board into manufacturer's directory (CarMediaLab)

Changes since V1:
- add missing entry in MAINTAINERS (F. Estevam)

 MAINTAINERS                             |    1 +
 board/CarMediaLab/flea3/Makefile        |   49 ++++++
 board/CarMediaLab/flea3/flea3.c         |  254 ++++++++++++++++++++++++++++
 board/CarMediaLab/flea3/lowlevel_init.S |   79 +++++++++
 boards.cfg                              |    5 +
 include/configs/flea3.h                 |  281 +++++++++++++++++++++++++++++++
 6 files changed, 669 insertions(+), 0 deletions(-)
 create mode 100644 board/CarMediaLab/flea3/Makefile
 create mode 100644 board/CarMediaLab/flea3/flea3.c
 create mode 100644 board/CarMediaLab/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h
MAINTAINERS +1 -0
index c10996c..24adb03 100644
@@ -565,6 +565,7 @@ Albert ARIBAUD <[email protected]>
 Stefano Babic <[email protected]>
 
 	ea20		davinci
+	flea3		i.MX35
 	mx35pdk		i.MX35
 	mx51evk		i.MX51
 	polaris		xscale/pxa
board/CarMediaLab/flea3/Makefile new file +49 -0

49 lines not on this page · raw message

board/CarMediaLab/flea3/flea3.c new file +254 -0

254 lines not on this page · raw message

board/CarMediaLab/flea3/lowlevel_init.S new file +79 -0

79 lines not on this page · raw message

boards.cfg +5 -0
index c485cd7..a8e9431 100644
@@ -39,6 +39,11 @@ integratorcp_cm1136          arm         arm1136     integrator          armltd
 qong                         arm         arm1136     -                   davedenx       mx31
 mx31ads                      arm         arm1136     -                   freescale      mx31
 imx31_litekit                arm         arm1136     -                   logicpd        mx31
+imx31_phycore                arm         arm1136     -                   -              mx31
+imx31_phycore_eet            arm         arm1136     imx31_phycore       -              mx31         imx31_phycore:IMX31_PHYCORE_EET
+mx31pdk_nand                 arm         arm1136     mx31pdk             freescale      mx31         mx31pdk:NAND_U_BOOT
+mx31pdk                      arm         arm1136     -                   freescale      mx31         mx31pdk:SKIP_LOWLEVEL_INIT
+flea3                        arm         arm1136     -                   CarMediaLab    mx35
 mx35pdk                      arm         arm1136     -                   freescale      mx35
 omap2420h4                   arm         arm1136     -                   ti             omap24xx
 tnetv107x_evm                arm         arm1176     tnetv107xevm        ti             tnetv107x
include/configs/flea3.h new file +281 -0

281 lines not on this page · raw message

Signature · 1 line
1.7.1

A message that is not in the archive (sent off-list or not yet received): CAOMZO5DqqOiUfeCTKFQTy33_fTsUHAMhSQ59bU0PnuU1AZ8Ckg@mail.gmail.com

#24 lore raw

PATCH v4 8/8 MX35: add support for flea3 board

Quoted 4 lines · Fabio Estevam

Hi Stefano,

On Thu, Oct 6, 2011 at 7:38 PM, Stefano Babic <[email protected]> wrote:

Quoted 13 lines

boards.cfg integratorcp_cm1136 arm arm1136 integrator armltd · line 45

Quoted 10 lines
boards.cfg +4 -0
@@ -39,6 +39,11 @@ integratorcp_cm1136          arm         arm1136     integrator          armltd
 qong                         arm         arm1136     -                   davedenx       mx31
 mx31ads                      arm         arm1136     -                   freescale      mx31
 imx31_litekit                arm         arm1136     -                   logicpd        mx31
+imx31_phycore                arm         arm1136     -                   -              mx31
+imx31_phycore_eet            arm         arm1136     imx31_phycore       -              mx31         imx31_phycore:IMX31_PHYCORE_EET
+mx31pdk_nand                 arm         arm1136     mx31pdk             freescale      mx31         mx31pdk:NAND_U_BOOT
+mx31pdk                      arm         arm1136     -                   freescale      mx31         mx31pdk:SKIP_LOWLEVEL_INIT

These mx31 changes should be part of a separate patch as they don?t relate to flea3 board support.

Ooopsss...patch for these changes is already in mainline, they do not belong to this patchset. I drop them, 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-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#25 lore raw

PATCH v5 8/8 MX35: add support for flea3 board

In reply to Stefano Babic

The flea3 board is a custom board by CarMediaLab used in automotive.
Network (FEC), NOR, NAND and SPI are supported.

---

Changes since V4:
- boards.cfg maust have a new entry only for flea3 (Fabio Estevam)

Changes since V3:
- fix checkpatch warnings (Wolfgang Denk)

Changes since V2:
- put the board into manufacturer's directory (CarMediaLab)

Changes since V1:
- add missing entry in MAINTAINERS (F. Estevam)

 MAINTAINERS                             |    1 +
 board/CarMediaLab/flea3/Makefile        |   49 ++++++
 board/CarMediaLab/flea3/flea3.c         |  254 ++++++++++++++++++++++++++++
 board/CarMediaLab/flea3/lowlevel_init.S |   79 +++++++++
 boards.cfg                              |    1 +
 include/configs/flea3.h                 |  281 +++++++++++++++++++++++++++++++
 6 files changed, 665 insertions(+), 0 deletions(-)
 create mode 100644 board/CarMediaLab/flea3/Makefile
 create mode 100644 board/CarMediaLab/flea3/flea3.c
 create mode 100644 board/CarMediaLab/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h
MAINTAINERS +1 -0
index c10996c..24adb03 100644
@@ -565,6 +565,7 @@ Albert ARIBAUD <[email protected]>
 Stefano Babic <[email protected]>
 
 	ea20		davinci
+	flea3		i.MX35
 	mx35pdk		i.MX35
 	mx51evk		i.MX51
 	polaris		xscale/pxa
board/CarMediaLab/flea3/Makefile new file +49 -0

49 lines not on this page · raw message

board/CarMediaLab/flea3/flea3.c new file +254 -0

254 lines not on this page · raw message

board/CarMediaLab/flea3/lowlevel_init.S new file +79 -0

79 lines not on this page · raw message

boards.cfg +1 -0
index c485cd7..c466cf9 100644
@@ -39,6 +39,7 @@ integratorcp_cm1136          arm         arm1136     integrator          armltd
 qong                         arm         arm1136     -                   davedenx       mx31
 mx31ads                      arm         arm1136     -                   freescale      mx31
 imx31_litekit                arm         arm1136     -                   logicpd        mx31
+flea3                        arm         arm1136     -                   CarMediaLab    mx35
 mx35pdk                      arm         arm1136     -                   freescale      mx35
 omap2420h4                   arm         arm1136     -                   ti             omap24xx
 tnetv107x_evm                arm         arm1176     tnetv107xevm        ti             tnetv107x
include/configs/flea3.h new file +281 -0

281 lines not on this page · raw message

Signature · 1 line
1.7.1
#26 lore raw

PATCH v2 5/8 ARM: moved general function to arm/lib

In reply to Stefano Babic

Functions inside armv7/syslib can be used by other ARM architectures, too. The file is added as part of ARM library.

CC Albert ARIBAUD <[email protected]>
CC Wolfgang Denk <[email protected]>

---

Changes:

- use -C in git format-patch to detect renames

 arch/arm/cpu/armv7/Makefile          |    2 --
 arch/arm/lib/Makefile                |    2 ++
 arch/arm/{cpu/armv7 => lib}/syslib.c |    0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/{cpu/armv7 => lib}/syslib.c (100%)
arch/arm/cpu/armv7/Makefile +0 -2
index 92a5a96..5b7f1c7 100644
@@ -32,8 +32,6 @@ COBJS	+= cache_v7.o
 COBJS	+= cpu.o
 endif
 
-COBJS  += syslib.o
-
 SRCS	:= $(START:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 START	:= $(addprefix $(obj),$(START))
arch/arm/lib/Makefile +2 -0
index 300c8fa..c966aa7 100644
@@ -48,6 +48,8 @@ SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
 SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
 endif
 
+COBJS-y	+= syslib.o
+
 SRCS	:= $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
 	   $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
arch/arm/lib/syslib.c renamed from arch/arm/cpu/armv7/syslib.c +0 -0
similarity index 100%
rename from arch/arm/cpu/armv7/syslib.c
rename to arch/arm/lib/syslib.c
Signature · 1 line
1.7.1
#27 lore raw

PATCH v2 5/8 ARM: moved general function to arm/lib

Hi Stefano,

Le 15/10/2011 10:06, Stefano Babic a ?crit :

arch/arm/lib/syslib.c

Quoted 49 lines

Functions inside armv7/syslib can be used by other ARM architectures, too. The file is added as part of ARM library.

CC Albert ARIBAUD<[email protected]>
CC Wolfgang Denk<[email protected]>

---

Changes:

- use -C in git format-patch to detect renames

  arch/arm/cpu/armv7/Makefile          |    2 --
  arch/arm/lib/Makefile                |    2 ++
  arch/arm/{cpu/armv7 =>  lib}/syslib.c |    0
  3 files changed, 2 insertions(+), 2 deletions(-)

rename arch/arm/{cpu/armv7 => lib}/syslib.c (100%)

arch/arm/cpu/armv7/Makefile +0 -2
index 92a5a96..5b7f1c7 100644
@@ -32,8 +32,6 @@ COBJS	+= cache_v7.o
  COBJS	+= cpu.o
  endif
 
-COBJS  += syslib.o
-
  SRCS	:= $(START:.o=.S) $(COBJS:.o=.c)
  OBJS	:= $(addprefix $(obj),$(COBJS))
  START	:= $(addprefix $(obj),$(START))
arch/arm/lib/Makefile +2 -0
index 300c8fa..c966aa7 100644
@@ -48,6 +48,8 @@ SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
  SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
  endif
 
+COBJS-y	+= syslib.o
+
  SRCS	:= $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
  	   $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
  OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
arch/arm/lib/syslib.c renamed from arch/arm/cpu/armv7/syslib.c +0 -0
similarity index 100%
rename from arch/arm/cpu/armv7/syslib.c
rename to arch/arm/lib/syslib.c

I agree with Wofgang that sdelay() is redundant wrt udelay() and has weaker semantics.

I'll add that sr32() is kind of not ARM specific, so I fail to see why it should move to generic ARM, and besides, it is a half-baked solution to the general problem of setting a bitfield in a register -- half-baked in that it only applies to bits. Besides, There's been a long discussion on this list about similar-minded helper macros, and the conclusion was that keeping the operation explicitly as logical combinations of bitmasks was the best way to let the reader know what is going on without forcing them to look up a macro or function definition.

As for wait-on_value(), it is based on the same weak semantics as sdelay(), i.e. a number of loops, the duration of which depends on many factors and is thus undependable. Besides, if the field changes value but is not the one expected, it wastes cycles waiting for the expected one. This is inefficient especially of the field is of the form "one value for "ok", many others for various failure cases", where even once a failure is indicated, the code still loops waiting for an "ok" that will never come.

I conclude like Wolfgang that despite this code having gone through review unnoticed, it should not be promoted for wider use.

If some functionality of these three functions is desirable and cannot be met with other means, please submit new code for general ARM inclusion (and maybe consider adapting armv7 to this new code).

Amicalement,

Signature · 1 line
Albert.
#28 lore raw

PATCH v2 5/8 ARM: moved general function to arm/lib

Quoted 2 lines · Albert ARIBAUD

Hi Stefano,

Hi Albert,

Quoted 7 lines

I agree with Wofgang that sdelay() is redundant wrt udelay() and has weaker semantics.

I'll add that sr32() is kind of not ARM specific, so I fail to see why it should move to generic ARM, and besides, it is a half-baked solution to the general problem of setting a bitfield in a register

Right, it is.

Quoted 3 lines

I conclude like Wolfgang that despite this code having gone through review unnoticed, it should not be promoted for wider use.

Understood.

Quoted 4 lines

If some functionality of these three functions is desirable and cannot be met with other means, please submit new code for general ARM inclusion (and maybe consider adapting armv7 to this new code).

I understand your points - and I agree with you, thanks for clarification.

Stefano

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

PATCH v6 1/1 MX35: add support for flea3 board

In reply to Stefano Babic

The flea3 board is a custom board by CarMediaLab used in automotive.
Network (FEC), NOR, NAND and SPI are supported.

---

Changes since V5:
- drop sdelay after discussion on ML (W. Denk, A. Aribaud)
- modify dram initialization to work with both CSD0 and CSD1
- set GPIO3_1 to High due to hardware changes

Changes since V4:
- boards.cfg maust have a new entry only for flea3 (Fabio Estevam)

Changes since V3:
- fix checkpatch warnings (Wolfgang Denk)

Changes since V2:
- put the board into manufacturer's directory (CarMediaLab)

Changes since V1:
- add missing entry in MAINTAINERS (F. Estevam)

 MAINTAINERS                             |    1 +
 board/CarMediaLab/flea3/Makefile        |   49 ++++++
 board/CarMediaLab/flea3/flea3.c         |  289 +++++++++++++++++++++++++++++++
 board/CarMediaLab/flea3/lowlevel_init.S |   79 +++++++++
 boards.cfg                              |    1 +
 include/configs/flea3.h                 |  286 ++++++++++++++++++++++++++++++
 6 files changed, 705 insertions(+), 0 deletions(-)
 create mode 100644 board/CarMediaLab/flea3/Makefile
 create mode 100644 board/CarMediaLab/flea3/flea3.c
 create mode 100644 board/CarMediaLab/flea3/lowlevel_init.S
 create mode 100644 include/configs/flea3.h
MAINTAINERS +1 -0
index cd0dd91..804b899 100644
@@ -560,6 +560,7 @@ Albert ARIBAUD <[email protected]>
 Stefano Babic <[email protected]>
 
 	ea20		davinci
+	flea3		i.MX35
 	mx35pdk		i.MX35
 	mx51evk		i.MX51
 	polaris		xscale/pxa
board/CarMediaLab/flea3/Makefile new file +49 -0

49 lines not on this page · raw message

board/CarMediaLab/flea3/flea3.c new file +289 -0

289 lines not on this page · raw message

board/CarMediaLab/flea3/lowlevel_init.S new file +79 -0

79 lines not on this page · raw message

boards.cfg +1 -0
index da3c2a0..07865ad 100644
@@ -42,6 +42,7 @@ imx31_litekit                arm         arm1136     -                   logicpd
 imx31_phycore                arm         arm1136     -                   -              mx31
 imx31_phycore_eet            arm         arm1136     imx31_phycore       -              mx31         imx31_phycore:IMX31_PHYCORE_EET
 mx31pdk                      arm         arm1136     -                   freescale      mx31         mx31pdk:NAND_U_BOOT
+flea3                        arm         arm1136     -                   CarMediaLab    mx35
 mx35pdk                      arm         arm1136     -                   freescale      mx35
 mx35pdk_nand                 arm         arm1136     mx35pdk             freescale      mx35        mx35pdk:NAND_U_BOOT
 omap2420h4                   arm         arm1136     -                   ti             omap24xx
include/configs/flea3.h new file +286 -0

286 lines not on this page · raw message

Signature · 1 line
1.7.1