Skip to contentSkip to conversation

Add initial support for Matrix Vision mvSMR board based on MPC5200B.

PATCH Superseded Andre Schwarz 2 participants 2 messages Mar 25, 2010 – Mar 30, 2010 Kbuild

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add initial support for Matrix Vision mvSMR board based on MPC5200B.

Add initial support for Matrix Vision mvSMR board based on MPC5200B.

---

Wolfgang,
I've made all changes requested by Detlev regarding v1.
Patch has been checked with checkpatch.pl from kernel tree showing no obvious errors. Additionally I strongly followed your explanations regarding git format-patch and git send-email that saved me from headache last time. Please let me know if anything regarding this patch is still in bad shape.

TIA,
Andre

 CREDITS                              |    2 +-
 MAINTAINERS                          |    1 +
 MAKEALL                              |    1 +
 Makefile                             |    5 +
 board/matrix_vision/mvsmr/Makefile   |   51 ++++++
 board/matrix_vision/mvsmr/autoscript |   42 +++++
 board/matrix_vision/mvsmr/config.mk  |   31 ++++
 board/matrix_vision/mvsmr/fpga.c     |  129 +++++++++++++++
 board/matrix_vision/mvsmr/fpga.h     |   32 ++++
 board/matrix_vision/mvsmr/mvsmr.c    |  273 +++++++++++++++++++++++++++++++
 board/matrix_vision/mvsmr/mvsmr.h    |   43 +++++
 board/matrix_vision/mvsmr/u-boot.lds |  138 ++++++++++++++++
 doc/README.mvsmr                     |   55 +++++++
 include/configs/MVSMR.h              |  296 ++++++++++++++++++++++++++++++++++
 14 files changed, 1098 insertions(+), 1 deletions(-)
 create mode 100644 board/matrix_vision/mvsmr/Makefile
 create mode 100644 board/matrix_vision/mvsmr/autoscript
 create mode 100644 board/matrix_vision/mvsmr/config.mk
 create mode 100644 board/matrix_vision/mvsmr/fpga.c
 create mode 100644 board/matrix_vision/mvsmr/fpga.h
 create mode 100644 board/matrix_vision/mvsmr/mvsmr.c
 create mode 100644 board/matrix_vision/mvsmr/mvsmr.h
 create mode 100644 board/matrix_vision/mvsmr/u-boot.lds
 create mode 100644 doc/README.mvsmr
 create mode 100644 include/configs/MVSMR.h
CREDITS +1 -1
index 2471029..cc96d87 100644
@@ -437,7 +437,7 @@ D: FADS823 configuration, MPC823 video support, I2C, wireless keyboard, lots mor
 
 N: Andre Schwarz
 E: andre.schwarz at matrix-vision.de
-D: Support for Matrix Vision boards (MVBLM7/MVBC_P)
+D: Support for Matrix Vision boards (MVBLM7/MVBC_P/MVSMR)
 
 N: Robert Schwebel
 E: r.schwebel at pengutronix.de
MAINTAINERS +1 -0
index 0340c19..a7d55f9 100644
@@ -424,6 +424,7 @@ Andre Schwarz <[email protected]>
 
 	mvbc_p		MPC5200
 	mvblm7		MPC8343
+	mvsmr		MPC5200
 
 Jon Smirl <[email protected]>
 
MAKEALL +1 -0
index 1949985..ce4fe66 100755
@@ -71,6 +71,7 @@ LIST_5xxx="		\
 	motionpro	\
 	munices		\
 	MVBC_P		\
+	MVSMR		\
 	o2dnt		\
 	pcm030		\
 	pf5200		\
Makefile +5 -0
index ce77e10..2d2d6d3 100644
@@ -676,6 +676,11 @@ MVBC_P_config: unconfig
 	{   	echo "#define CONFIG_MVBC_P" 	>>$(obj)include/config.h; }
 	@$(MKCONFIG) -n $@ -a MVBC_P ppc mpc5xxx mvbc_p matrix_vision
 
+MVSMR_config: unconfig
+	@mkdir -p $(obj)include
+	@mkdir -p $(obj)board/matrix_vision/mvsmr
+	@$(MKCONFIG) $(@:_config=) ppc mpc5xxx mvsmr matrix_vision
+
 o2dnt_config:	unconfig
 	@$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt
 
board/matrix_vision/mvsmr/Makefile new file +51 -0

51 lines not on this page · raw message

board/matrix_vision/mvsmr/autoscript new file +42 -0

42 lines not on this page · raw message

board/matrix_vision/mvsmr/config.mk new file +31 -0
new file mode 100644
index 0000000..b1da812
@@ -0,0 +1,31 @@
+#
+# (C) Copyright 2003
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# 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., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
+
+ifndef TEXT_BASE
+TEXT_BASE = 0xFF800000
+endif
+
+PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -I$(TOPDIR)/board
+LDSCRIPT := $(SRCTREE)/board/matrix_vision/mvsmr/u-boot.lds
board/matrix_vision/mvsmr/fpga.c new file +129 -0

129 lines not on this page · raw message

board/matrix_vision/mvsmr/fpga.h new file +32 -0
new file mode 100644
index 0000000..ee690e6
@@ -0,0 +1,32 @@
+/*
+ * (C) Copyright 2008
+ * Andre Schwarz, Matrix Vision GmbH, andre.schwarz at matrix-vision.de
+ *
+ * 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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+extern int mvsmr_init_fpga(void);
+
+extern int fpga_pgm_fn(int assert_pgm, int flush, int cookie);
+extern int fpga_init_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_done_fn(int cookie);
+extern int fpga_pre_config_fn(int cookie);
board/matrix_vision/mvsmr/mvsmr.c new file +273 -0

273 lines not on this page · raw message

board/matrix_vision/mvsmr/mvsmr.h new file +43 -0

43 lines not on this page · raw message

board/matrix_vision/mvsmr/u-boot.lds new file +138 -0

138 lines not on this page · raw message

doc/README.mvsmr new file +55 -0

55 lines not on this page · raw message

include/configs/MVSMR.h new file +296 -0

296 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#1 lore raw

PATCH v2 1/1 Add initial support for Matrix Vision mvSMR board based on MPC5200B.

Dear Andre Schwarz,

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

Add initial support for Matrix Vision mvSMR board based on MPC5200B.

...

board/matrix_vision/mvsmr/autoscript

Quoted 5 lines
board/matrix_vision/mvsmr/autoscript new file +0 -0
new file mode 100644
index 0000000..abc082b

The "autoscr" command has long been deprecated, so it makes little sense to call a file "autoscript".

board/matrix_vision/mvsmr/autoscript line 7

Quoted 4 lines
board/matrix_vision/mvsmr/autoscript new file +4 -0
+setenv boot24 bootm \${kernel_boot} \${mv_initrd_addr_ram}
+setenv ramkernel setenv kernel_boot \${loadaddr}
+setenv flashkernel setenv kernel_boot \${mv_kernel_addr}
+setenv cpird cp \${mv_initrd_addr} \${mv_initrd_addr_ram} \${mv_initrd_length}

You could write this like this:

setenv cpird 'cp ${mv_initrd_addr} ${mv_initrd_addr_ram} ${mv_initrd_length}'

which looks much cleaner to me.

Quoted 2 lines
board/matrix_vision/mvsmr/autoscript new file +2 -0
+int mvsmr_get_mac(void)
+{

...

board/matrix_vision/mvsmr/autoscript

Quoted 5 lines
board/matrix_vision/mvsmr/autoscript new file +5 -0
+	i2c_read(0x50, 0, 1, (unsigned char *)data, 6);
+
+	sprintf(mac, "%02x:%02x:%02x:%02x:%02x:%02x",
+		data[0], data[1], data[2], data[3], data[4], data[5]);
+	setenv("ethaddr", mac);

Please use eth_setenv_enetaddr() instead.

Quoted 4 lines
board/matrix_vision/mvsmr/autoscript new file +4 -0
+/*
+ * Supported commands
+ */
+#include <config_cmd_default.h>

board/matrix_vision/mvsmr/autoscript

Quoted 10 lines
board/matrix_vision/mvsmr/autoscript new file +10 -0
+
+#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_SDRAM
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_FPGA
+#define CONFIG_CMD_I2C

You might want to keep the list sorted.

Quoted 1 line

+#undef CONFIG_WATCHDOG

Don't undefine what is not defined anyway.

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
There's no sense in being precise  when  you  don't  even  know  what
you're talking about.                             -- John von Neumann