Skip to contentSkip to conversation

TI: tnetv107x patch series

PATCH Superseded Cyril Chemparathy 4 participants 12 messages Mar 29, 2010 – Apr 3, 2010

Subsystems (2)

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

cover TI: tnetv107x patch series

TNETV107X is a Texas Instruments SoC based on an ARM1176 core, and with a bunch on on-chip integrated peripherals. This patch series generalizes current ARM1176 code to allow for the addition of new ARM1176 SOCs. The remaining patches in this series add arch and board support.

The contents of this series are identical to the larger patch posted earlier. The only difference here is that these changes have been split up as per feedback from Sandeep.

Cyril Chemparathy (3):
ARM1176: Coexist with other ARM1176 platforms
ARM1176: TI: TNETV107X soc initial support
TI: TNETV107X EVM initial support

 MAKEALL                                    |    1 +
 Makefile                                   |    3 +
 board/ti/tnetv107xevm/Makefile             |   49 +++
 board/ti/tnetv107xevm/config.mk            |   20 +
 board/ti/tnetv107xevm/sdb_board.c          |   66 ++++
 board/ti/tnetv107xevm/u-boot.lds           |   48 +++
 cpu/arm1176/cpu.c                          |    1 -
 cpu/arm1176/start.S                        |   60 +++-
 cpu/arm1176/tnetv107x/Makefile             |   44 +++
 cpu/arm1176/tnetv107x/aemif.c              |  173 +++++++++
 cpu/arm1176/tnetv107x/clock.c              |  562 ++++++++++++++++++++++++++++
 cpu/arm1176/tnetv107x/init.c               |   41 ++
 cpu/arm1176/tnetv107x/lowlevel_init.S      |   25 ++
 cpu/arm1176/tnetv107x/mux.c                |  463 +++++++++++++++++++++++
 cpu/arm1176/tnetv107x/timer.c              |  125 ++++++
 cpu/arm1176/tnetv107x/wdt.c                |  172 +++++++++
 include/asm-arm/arch-tnetv107x/clock.h     |   43 +++
 include/asm-arm/arch-tnetv107x/emif_defs.h |    1 +
 include/asm-arm/arch-tnetv107x/hardware.h  |  184 +++++++++
 include/asm-arm/arch-tnetv107x/mux.h       |  307 +++++++++++++++
 include/asm-arm/arch-tnetv107x/nand_defs.h |   38 ++
 include/configs/smdk6400.h                 |    6 +
 include/configs/tnetv107x_evm.h            |  225 +++++++++++
 23 files changed, 2648 insertions(+), 9 deletions(-)
 create mode 100644 board/ti/tnetv107xevm/Makefile
 create mode 100644 board/ti/tnetv107xevm/config.mk
 create mode 100644 board/ti/tnetv107xevm/sdb_board.c
 create mode 100644 board/ti/tnetv107xevm/u-boot.lds
 create mode 100644 cpu/arm1176/tnetv107x/Makefile
 create mode 100644 cpu/arm1176/tnetv107x/aemif.c
 create mode 100644 cpu/arm1176/tnetv107x/clock.c
 create mode 100644 cpu/arm1176/tnetv107x/init.c
 create mode 100644 cpu/arm1176/tnetv107x/lowlevel_init.S
 create mode 100644 cpu/arm1176/tnetv107x/mux.c
 create mode 100644 cpu/arm1176/tnetv107x/timer.c
 create mode 100644 cpu/arm1176/tnetv107x/wdt.c
 create mode 100644 include/asm-arm/arch-tnetv107x/clock.h
 create mode 100644 include/asm-arm/arch-tnetv107x/emif_defs.h
 create mode 100644 include/asm-arm/arch-tnetv107x/hardware.h
 create mode 100644 include/asm-arm/arch-tnetv107x/mux.h
 create mode 100644 include/asm-arm/arch-tnetv107x/nand_defs.h
 create mode 100644 include/configs/tnetv107x_evm.h
#1 lore raw

PATCH 1/3 ARM1176: Coexist with other ARM1176 platforms

The current ARM1176 CPU specific code is too specific to the SMDK6400 architecture. The following changes were necessary prerequisites for the addition of other SoCs based on ARM1176.

Existing board's (SMDK6400) configuration has been modified to keep behavior unchanged despite these changes.

1. Peripheral port remap configurability
The earlier code had hardcoded remap values specific to s3c64xx in start.S. This change makes the peripheral port remap addresses and sizes configurable.

2. Skip low level initialization
Ability to skip low level initialization if necessary. Many other platforms have a similar capability, and this is quite useful during debug/bring-up.

3. U-Boot code relocation support
Most architectures allow u-boot code to run initially at a different address (possibly in NOR) and then get relocated to its final resting place in RAM. Added support for this capability in ARM1176 architecture.

4. Disable TCM if necessary
If a ROM based bootloader happened to have initialized TCM, we disable it here to keep things sane.

5. Remove unnecessary SoC specific includes
ARM1176 code does not really need this SoC specific include. The presence of this include prevents builds on other ARM1176 archs.

6. ARM926 style MMU disable when !CONFIG_ENABLE_MMU
The original MMU disable code masks out too many bits from the load address when it tries to figure out the physical address of the jump target label. Consequently, it ends up branching to the wrong address after disabling the MMU.

---
 cpu/arm1176/cpu.c          |    1 -
 cpu/arm1176/start.S        |   60 ++++++++++++++++++++++++++++++++++++++------
 include/configs/smdk6400.h |    6 ++++
 3 files changed, 58 insertions(+), 9 deletions(-)
cpu/arm1176/cpu.c +0 -1
index 2c0014f..c0fd114 100644
@@ -33,7 +33,6 @@
 
 #include <common.h>
 #include <command.h>
-#include <asm/arch/s3c6400.h>
 #include <asm/system.h>
 
 static void cache_flush (void);
cpu/arm1176/start.S +52 -8

118 lines not on this page · raw message

include/configs/smdk6400.h +6 -0
index f04feae..7b4501d 100644
@@ -40,6 +40,12 @@
 #define CONFIG_S3C64XX		1	/* in a SAMSUNG S3C64XX Family  */
 #define CONFIG_SMDK6400		1	/* on a SAMSUNG SMDK6400 Board  */
 
+#define CONFIG_SKIP_RELOCATE_UBOOT
+
+#define CONFIG_PERIPORT_REMAP
+#define CONFIG_PERIPORT_BASE	0x70000000
+#define CONFIG_PERIPORT_SIZE	0x13
+
 #define CONFIG_SYS_SDRAM_BASE	0x50000000
 
 /* input clock of PLL: SMDK6400 has 12MHz input clock */
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH 2/3 ARM1176: TI: TNETV107X soc initial support

TNETV107X is a Texas Instruments SoC based on an ARM1176 core, and with a bunch on on-chip integrated peripherals. This is an initial commit with basic functionality, more commits with drivers, etc. to follow.

---
 cpu/arm1176/tnetv107x/Makefile             |   44 +++
 cpu/arm1176/tnetv107x/aemif.c              |  173 +++++++++
 cpu/arm1176/tnetv107x/clock.c              |  562 ++++++++++++++++++++++++++++
 cpu/arm1176/tnetv107x/init.c               |   41 ++
 cpu/arm1176/tnetv107x/lowlevel_init.S      |   25 ++
 cpu/arm1176/tnetv107x/mux.c                |  463 +++++++++++++++++++++++
 cpu/arm1176/tnetv107x/timer.c              |  125 ++++++
 cpu/arm1176/tnetv107x/wdt.c                |  172 +++++++++
 include/asm-arm/arch-tnetv107x/clock.h     |   43 +++
 include/asm-arm/arch-tnetv107x/emif_defs.h |    1 +
 include/asm-arm/arch-tnetv107x/hardware.h  |  184 +++++++++
 include/asm-arm/arch-tnetv107x/mux.h       |  307 +++++++++++++++
 include/asm-arm/arch-tnetv107x/nand_defs.h |   38 ++
 13 files changed, 2178 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm1176/tnetv107x/Makefile
 create mode 100644 cpu/arm1176/tnetv107x/aemif.c
 create mode 100644 cpu/arm1176/tnetv107x/clock.c
 create mode 100644 cpu/arm1176/tnetv107x/init.c
 create mode 100644 cpu/arm1176/tnetv107x/lowlevel_init.S
 create mode 100644 cpu/arm1176/tnetv107x/mux.c
 create mode 100644 cpu/arm1176/tnetv107x/timer.c
 create mode 100644 cpu/arm1176/tnetv107x/wdt.c
 create mode 100644 include/asm-arm/arch-tnetv107x/clock.h
 create mode 100644 include/asm-arm/arch-tnetv107x/emif_defs.h
 create mode 100644 include/asm-arm/arch-tnetv107x/hardware.h
 create mode 100644 include/asm-arm/arch-tnetv107x/mux.h
 create mode 100644 include/asm-arm/arch-tnetv107x/nand_defs.h
cpu/arm1176/tnetv107x/Makefile new file +44 -0
new file mode 100644
index 0000000..fe9d8a0
@@ -0,0 +1,44 @@
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(SOC).a
+
+COBJS	+= aemif.o clock.o init.o mux.o timer.o wdt.o
+SOBJS	+= lowlevel_init.o
+
+SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+
+OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
+START	:= $(addprefix $(obj),$(START))
+
+all:	$(obj).depend $(LIB)
+
+$(LIB):	$(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
cpu/arm1176/tnetv107x/aemif.c new file +173 -0

173 lines not on this page · raw message

cpu/arm1176/tnetv107x/clock.c new file +562 -0

562 lines not on this page · raw message

cpu/arm1176/tnetv107x/init.c new file +41 -0

41 lines not on this page · raw message

cpu/arm1176/tnetv107x/lowlevel_init.S new file +25 -0
new file mode 100644
index 0000000..3ee32ef
@@ -0,0 +1,25 @@
+/*
+ * TNETV107X: Low-level pre-relocation initialization
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+.globl lowlevel_init
+lowlevel_init:
+	/* nothing for now, maybe needed for more exotic boot modes */
+	mov	pc, lr
cpu/arm1176/tnetv107x/mux.c new file +463 -0

463 lines not on this page · raw message

cpu/arm1176/tnetv107x/timer.c new file +125 -0

125 lines not on this page · raw message

cpu/arm1176/tnetv107x/wdt.c new file +172 -0

172 lines not on this page · raw message

include/asm-arm/arch-tnetv107x/clock.h new file +43 -0

43 lines not on this page · raw message

include/asm-arm/arch-tnetv107x/emif_defs.h new file +1 -0
new file mode 100644
index 0000000..9969a01
@@ -0,0 +1 @@
+#include <asm/arch-davinci/emif_defs.h>
include/asm-arm/arch-tnetv107x/hardware.h new file +184 -0

184 lines not on this page · raw message

include/asm-arm/arch-tnetv107x/mux.h new file +307 -0

307 lines not on this page · raw message

include/asm-arm/arch-tnetv107x/nand_defs.h new file +38 -0
new file mode 100644
index 0000000..961b710
@@ -0,0 +1,38 @@
+/*
+ * TNETV107X: NAND definitions
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef _NAND_DEFS_H_
+#define _NAND_DEFS_H_
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/emif_defs.h>
+
+#define DAVINCI_ASYNC_EMIF_CNTRL_BASE	TNETV107X_ASYNC_EMIF_CNTRL_BASE
+
+#define	MASK_CLE		0x4000
+#define	MASK_ALE		0x2000
+
+#define NAND_READ_START		0x00
+#define NAND_READ_END		0x30
+#define NAND_STATUS		0x70
+
+extern void davinci_nand_init(struct nand_chip *nand);
+
+#endif
Signature · 1 line
1.6.3.3
#3 lore raw

PATCH 3/3 TI: TNETV107X EVM initial support

TNETV107X is a Texas Instruments SoC based on an ARM1176 core, and with a bunch on on-chip integrated peripherals. This patch adds support for the TNETV107X EVM board.

---
 MAKEALL                           |    1 +
 Makefile                          |    3 +
 board/ti/tnetv107xevm/Makefile    |   49 ++++++++
 board/ti/tnetv107xevm/config.mk   |   20 ++++
 board/ti/tnetv107xevm/sdb_board.c |   66 +++++++++++
 board/ti/tnetv107xevm/u-boot.lds  |   48 ++++++++
 include/configs/tnetv107x_evm.h   |  225 +++++++++++++++++++++++++++++++++++++
 7 files changed, 412 insertions(+), 0 deletions(-)
 create mode 100644 board/ti/tnetv107xevm/Makefile
 create mode 100644 board/ti/tnetv107xevm/config.mk
 create mode 100644 board/ti/tnetv107xevm/sdb_board.c
 create mode 100644 board/ti/tnetv107xevm/u-boot.lds
 create mode 100644 include/configs/tnetv107x_evm.h
MAKEALL +1 -0
index a88c31e..63d8d16 100755
@@ -623,6 +623,7 @@ LIST_ARM11="			\
 	mx31pdk_nand		\
 	qong			\
 	smdk6400		\
+	tnetv107x_evm		\
 "
 
 #########################################################################
Makefile +3 -0
index c0e73de..e723e7c 100644
@@ -2936,6 +2936,9 @@ davinci_dm365evm_config :	unconfig
 davinci_dm6467evm_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs dm6467evm davinci davinci
 
+tnetv107x_evm_config: unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm1176 tnetv107xevm ti tnetv107x
+
 imx27lite_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27
 
board/ti/tnetv107xevm/Makefile new file +49 -0

49 lines not on this page · raw message

board/ti/tnetv107xevm/config.mk new file +20 -0
new file mode 100644
index 0000000..d24d49a
@@ -0,0 +1,20 @@
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+TEXT_BASE = 0x83FC0000
board/ti/tnetv107xevm/sdb_board.c new file +66 -0

66 lines not on this page · raw message

board/ti/tnetv107xevm/u-boot.lds new file +48 -0

48 lines not on this page · raw message

include/configs/tnetv107x_evm.h new file +225 -0

225 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#4 lore raw

PATCH 3/3 TI: TNETV107X EVM initial support

Dear Cyril Chemparathy,

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

TNETV107X is a Texas Instruments SoC based on an ARM1176 core, and with a bunch on on-chip integrated peripherals. This patch adds support for the TNETV107X EVM board.

Quoted 14 lines
---
 MAKEALL                           |    1 +
 Makefile                          |    3 +
 board/ti/tnetv107xevm/Makefile    |   49 ++++++++
 board/ti/tnetv107xevm/config.mk   |   20 ++++
 board/ti/tnetv107xevm/sdb_board.c |   66 +++++++++++
 board/ti/tnetv107xevm/u-boot.lds  |   48 ++++++++
 include/configs/tnetv107x_evm.h   |  225 +++++++++++++++++++++++++++++++++++++
 7 files changed, 412 insertions(+), 0 deletions(-)
 create mode 100644 board/ti/tnetv107xevm/Makefile
 create mode 100644 board/ti/tnetv107xevm/config.mk
 create mode 100644 board/ti/tnetv107xevm/sdb_board.c
 create mode 100644 board/ti/tnetv107xevm/u-boot.lds
 create mode 100644 include/configs/tnetv107x_evm.h

Entry to MAINTAINERS missing.

Makefile davinci_dm365evm_config : unconfig · line 2943

Quoted 13 lines
Makefile +3 -0
index c0e73de..e723e7c 100644
@@ -2936,6 +2936,9 @@ davinci_dm365evm_config :	unconfig
 davinci_dm6467evm_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs dm6467evm davinci davinci
 
+tnetv107x_evm_config: unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm1176 tnetv107xevm ti tnetv107x
+
 imx27lite_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27

Please keep lists sorted - board names, and architectures. arm1176 has no place among arm926ejs systems.

board/ti/tnetv107xevm/u-boot.lds

Quoted 5 lines
board/ti/tnetv107xevm/u-boot.lds new file +0 -0
new file mode 100644
index 0000000..3afa17f

Do you really need board specific linker scripts? Or would one common linker script for all (or at least for most of the) boards be sufficient?

Quoted 5 lines
include/configs/tnetv107x_evm.h new file +0 -0
new file mode 100644
index 0000000..795e3f1

...

include/configs/tnetv107x_evm.h line 33

Quoted 3 lines
include/configs/tnetv107x_evm.h new file +3 -0
+/****************************************************************/
+/* Architecture, CPU, etc.                                      */
+/****************************************************************/

Incorrect multiline comment styile. Please fix globally.

include/configs/tnetv107x_evm.h line 175

Quoted 6 lines
include/configs/tnetv107x_evm.h new file +6 -0
+#define MTDIDS_DEFAULT			"nand0=davinci_nand.0"
+#define MTDPARTS_DEFAULT		"mtdparts=davinci_nand.0:"	\
+						"1536k(uboot)ro,"	\
+						"128k(params)ro,"	\
+						"4m(kernel),"		\
+						"-(filesystem)"

Is "davinci" correct here?

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
I have a theory that it's impossible to prove anything, but  I  can't
prove it.
#5 lore raw

PATCH 3/3 TI: TNETV107X EVM initial support

Hi Wolfgang,

Thanks. Will send out a v2 with these changed.

[...]

Quoted 7 lines

include/configs/tnetv107x_evm.h line 175

Quoted 5 lines
include/configs/tnetv107x_evm.h new file +5 -0
+#define MTDPARTS_DEFAULT		"mtdparts=davinci_nand.0:"	\
+						"1536k(uboot)ro,"	\
+						"128k(params)ro,"	\
+						"4m(kernel),"		\
+						"-(filesystem)"

Is "davinci" correct here?

Yes, this SOC has the exact same controller as on Davinci, and therefore the NAND driver is reused.

Regards
Cyril.

#6 lore raw

PATCH 3/3 TI: TNETV107X EVM initial support

Dear "Chemparathy, Cyril",

Quoted 10 lines · In message <[email protected]> you…

[...]

Quoted 7 lines

include/configs/tnetv107x_evm.h line 175

Quoted 5 lines
include/configs/tnetv107x_evm.h new file +5 -0
+#define MTDPARTS_DEFAULT		"mtdparts=davinci_nand.0:"	\
+						"1536k(uboot)ro,"	\
+						"128k(params)ro,"	\
+						"4m(kernel),"		\
+						"-(filesystem)"

Is "davinci" correct here?

Quoted 2 lines

Yes, this SOC has the exact same controller as on Davinci, and therefore the NAND driver is reused.

But you don't call this a "Davinci"-Board, or do you?

Best regards,

Wolfgang Denk

Signature · 7 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
There are three ways to get something done:
        (1) Do it yourself.
        (2) Hire someone to do it for you.
        (3) Forbid your kids to do it.
#7 lore raw

PATCH 3/3 TI: TNETV107X EVM initial support

Wolfgang,

[...]

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Is "davinci" correct here?

Yes, this SOC has the exact same controller as on Davinci, and therefore the NAND driver is reused.

But you don't call this a "Davinci"-Board, or do you?

"Davinci NAND" is a bit of a misnomer since this particular EMIF block is commonly used across multiple TI devices. Unfortunately, this misnomer (amongst others) carries forward into the kernel too. Consequently, if we use a different device name here, the mtdparts variable won't be usable as a kernel command-line argument.

Regards
Cyril.

#8 lore raw

PATCH 3/3 TI: TNETV107X EVM initial support

Quoted 8 lines · Cyril

Wolfgang,

[...]

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

Is "davinci" correct here?

Yes, this SOC has the exact same controller as on Davinci, and therefore the NAND driver is reused.

But you don't call this a "Davinci"-Board, or do you?

Quoted 8 lines

"Davinci NAND" is a bit of a misnomer since this particular EMIF block is commonly used across multiple TI devices. Unfortunately, this misnomer (amongst others) carries forward into the kernel too. Consequently, if we use a different device name here, the mtdparts variable won't be usable as a kernel command-line argument.

Regards
Cyril.

Cyril,
This is a good reason, let us make sure it is propagated. Please add this explanation as a comment in the config file. Tom

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#9 lore raw

PATCH 2/3 ARM1176: TI: TNETV107X soc initial support

In reply to Cyril Chemparathy

Dear Cyril Chemparathy,

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

TNETV107X is a Texas Instruments SoC based on an ARM1176 core, and with a bunch on on-chip integrated peripherals. This is an initial commit with basic functionality, more commits with drivers, etc. to follow.

...

Quoted 2 lines
(quoted diff) +2 -0
+void configure_async_emif(int cs, struct async_emif_config *cfg)
+{

...

Quoted 30 lines
cpu/arm1176/tnetv107x/aemif.c new file +30 -0
+	if (cfg->select_strobe != -1) {
+		tmp &= ~CONFIG_SELECT_STROBE(MASK);
+		tmp |= CONFIG_SELECT_STROBE(cfg->select_strobe);
+	}
+	if (cfg->extend_wait != -1) {
+		tmp &= ~CONFIG_EXTEND_WAIT(MASK);
+		tmp |= CONFIG_EXTEND_WAIT(cfg->extend_wait);
+	}
+	if (cfg->wr_setup != -1) {
+		tmp &= ~CONFIG_WR_SETUP(MASK);
+		tmp |= CONFIG_WR_SETUP(cfg->wr_setup);
+	}
+	if (cfg->wr_strobe != -1) {
+		tmp &= ~CONFIG_WR_STROBE(MASK);
+		tmp |= CONFIG_WR_STROBE(cfg->wr_strobe);
+	}
+	if (cfg->wr_hold != -1) {
+		tmp &= ~CONFIG_WR_HOLD(MASK);
+		tmp |= CONFIG_WR_HOLD(cfg->wr_hold);
+	}
+	if (cfg->rd_setup != -1) {
+		tmp &= ~CONFIG_RD_SETUP(MASK);
+		tmp |= CONFIG_RD_SETUP(cfg->rd_setup);
+	}
+	if (cfg->rd_strobe != -1) {
+		tmp &= ~CONFIG_RD_STROBE(MASK);
+		tmp |= CONFIG_RD_STROBE(cfg->rd_strobe);
+	}
+	if (cfg->rd_hold != -1) {
+		tmp &= ~CONFIG_RD_HOLD(MASK);

cpu/arm1176/tnetv107x/aemif.c line 158

Quoted 10 lines
cpu/arm1176/tnetv107x/aemif.c new file +10 -0
+		tmp |= CONFIG_RD_HOLD(cfg->rd_hold);
+	}
+	if (cfg->turn_around != -1) {
+		tmp &= ~CONFIG_TURN_AROUND(MASK);
+		tmp |= CONFIG_TURN_AROUND(cfg->turn_around);
+	}
+	if (cfg->width != -1) {
+		tmp &= ~CONFIG_WIDTH(MASK);
+		tmp |= CONFIG_WIDTH(cfg->width);
+	}

You might want to define a macro to reduce the amount of repeated code here.

Quoted 9 lines
cpu/arm1176/tnetv107x/clock.c new file +9 -0
+void lpsc_control(unsigned int id, int state)
+{
+	__lpsc_control(1, -1, id, state);
+}
+
+int lpsc_status(unsigned int id)
+{
+	return psc_reg_read(PSC_MDSTAT(id)) & 0x1f;
+}

cpu/arm1176/tnetv107x/clock.c line 466

Quoted 10 lines
cpu/arm1176/tnetv107x/clock.c new file +10 -0
+
+void clk_enable(unsigned int id)
+{
+	lpsc_control(id, PSC_MDCTL_NEXT_ENABLE);
+}
+
+void clk_disable(unsigned int id)
+{
+	lpsc_control(id, PSC_MDCTL_NEXT_DISABLE);
+}

These should probably be inlined ?

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
Sometimes a feeling is all we humans have to go on.
	-- Kirk, "A Taste of Armageddon", stardate 3193.9
#10 lore raw

PATCH 2/3 ARM1176: TI: TNETV107X soc initial support

Hi Wolfgang,

Quoted 2 lines

You might want to define a macro to reduce the amount of repeated code here.

Will do in v2.

Quoted 13 lines
Quoted 13 lines
cpu/arm1176/tnetv107x/clock.c new file +13 -0
+void lpsc_control(unsigned int id, int state)
+{
+	__lpsc_control(1, -1, id, state);
+}
+
+int lpsc_status(unsigned int id)
+{
+	return psc_reg_read(PSC_MDSTAT(id)) & 0x1f;
+}
+
+void clk_enable(unsigned int id)
+{
+	lpsc_control(id, PSC_MDCTL_NEXT_ENABLE);
Quoted 8 lines

cpu/arm1176/tnetv107x/clock.c line 466

Quoted 6 lines
cpu/arm1176/tnetv107x/clock.c new file +6 -0
+}
+
+void clk_disable(unsigned int id)
+{
+	lpsc_control(id, PSC_MDCTL_NEXT_DISABLE);
+}

These should probably be inlined ?

Are you referring to lpsc_control(), or to clk_enable/clk_disable?
The former can be eliminated, I think.
The latter are used elsewhere. Are you recommending that I inline and move to a header?

Regards
Cyril.

#11 lore raw

PATCH 2/3 ARM1176: TI: TNETV107X soc initial support

Dear "Chemparathy, Cyril",

Quoted 23 lines · In message <[email protected]> you…
Quoted 14 lines
Quoted 14 lines
cpu/arm1176/tnetv107x/clock.c new file +13 -0
+void lpsc_control(unsigned int id, int state)
+{
+	__lpsc_control(1, -1, id, state);
+}
+
+int lpsc_status(unsigned int id)
+{
+	return psc_reg_read(PSC_MDSTAT(id)) & 0x1f;
+}
+
+void clk_enable(unsigned int id)
+{
+	lpsc_control(id, PSC_MDCTL_NEXT_ENABLE);
Quoted 8 lines

cpu/arm1176/tnetv107x/clock.c line 466

Quoted 6 lines
cpu/arm1176/tnetv107x/clock.c new file +6 -0
+}
+
+void clk_disable(unsigned int id)
+{
+	lpsc_control(id, PSC_MDCTL_NEXT_DISABLE);
+}

These should probably be inlined ?

Quoted 1 line

Are you referring to lpsc_control(), or to clk_enable/clk_disable?

Both of them.

Quoted 2 lines

The former can be eliminated, I think.
The latter are used elsewhere. Are you recommending that I inline and move to a header?

Yes. Assuming we really need sone one-line wrapper functions.

Best regards,

Wolfgang Denk

Signature · 6 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
Real computer scientists despise the idea of actual  hardware.  Hard-
ware has limitations, software doesn't. It's a real shame that Turing
machines are so poor at I/O.