add MPC8343 based board mvBlueLYNX-M7 aka mvblm7
PATCH 1/1 add MPC8343 based board mvBlueLYNX-M7 aka mvblm7
MPC8343 based stereo camera system with Cyclone-II FPGA and miniPCI Slot. CPU utilizes dual 10/100/1000 Ethernet using Vitesse VSC8601 RGMII Phys and USB over ULPI.
512MB Micron DDR-II memory, 8MB Flash on LocalBus, SD over SPU and 32MB NAND @ FPGA.
--
CREDITS +5 -0
@@ -424,6 +424,11 @@ N: Paolo Scaffardi E: arsenio at tin.it D: FADS823 configuration, MPC823 video support, I2C, wireless keyboard, lots more +N: Andre Schwarz +E: andre.schwarz at matrix-vision.de +D: Support for BlueLYNX and BlueCOUGAR series +W: www.matrix-vision.com + N: Robert Schwebel E: r.schwebel at pengutronix.de D: Support for csb226, logodl and innokom boards (PXA2xx)
MAKEALL +1 -0
@@ -327,6 +327,7 @@ LIST_83xx=" \ MPC8360ERDK_66 \ MPC837XEMDS \ MPC837XERDB \ + MVBLM7 \ sbc8349 \ TQM834x \ "
Makefile +3 -0
@@ -2084,6 +2084,9 @@ sbc8349_config: unconfig TQM834x_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc83xx tqm834x +MVBLM7_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc83xx mvblm7 + ######################################################################### ## MPC85xx Systems
board/mvblm7/Makefile new file +48 -0
48 lines not on this page · raw message
board/mvblm7/config.mk new file +29 -0
@@ -0,0 +1,29 @@ +# +# Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved. +# +# 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 +# + +# +# MPC8349E-mITX and MPC8349E-mITX-GP +# + +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +TEXT_BASE = 0xFFF00000
board/mvblm7/fpga.c new file +185 -0
185 lines not on this page · raw message
board/mvblm7/fpga.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2002 +* Rich Ireland, Enterasys Networks, rireland at enterasys.com. +* Keith Outwater, [email protected]. +* +* 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 mvblm7_init_fpga (void ); + +extern int fpga_pgm_fn (int assert_pgm,int flush,int cookie); +extern int fpga_status_fn (int cookie); +extern int fpga_config_fn (int assert,int flush,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 (void *buf,size_t len,int flush,int cookie); +extern int fpga_null_fn (int cookie);
board/mvblm7/mvblm7.c new file +128 -0
128 lines not on this page · raw message
board/mvblm7/mvblm7.h new file +20 -0
@@ -0,0 +1,20 @@ +#ifndef __MVBC_H__ +#define __MVBC_H__ + +#define MV_GPIO + +#define FPGA_DIN 0x20000000 +#define FPGA_CCLK 0x40000000 +#define FPGA_CONF_DONE 0x08000000 +#define FPGA_CONFIG 0x80000000 +#define FPGA_STATUS 0x10000000 + +#define MAN_RST 0x00100000 +#define WD_TS 0x00200000 +#define WD_WDI 0x00400000 + +#define MV_GPIO_DAT (WD_TS) +#define MV_GPIO_OUT (FPGA_DIN|FPGA_CCLK|WD_TS|WD_WDI) +#define MV_GPIO_ODE (FPGA_CONFIG|MAN_RST) + +#endif
board/mvblm7/mvblm7_autoscript new file +38 -0
@@ -0,0 +1,38 @@ +echo +echo "==== running autoscript ====" +echo +setenv bootdtb bootm \${kernel_boot} \${mv_initrd_addr_ram} \${mv_dtb_addr_ram} +setenv ramkernel setenv kernel_boot \${mv_kernel_addr_ram} +setenv flashkernel setenv kernel_boot \${mv_kernel_addr} +setenv cpinitrd cp \${mv_initrd_addr} \${mv_initrd_addr_ram} \${mv_initrd_length} +setenv bootfromflash run flashkernel cpinitrd ramparam +setenv getdtb tftp \${mv_dtb_addr_ram} \${dtb_name} +setenv cpdtb cp \${mv_dtb_addr} \${mv_dtb_addr_ram} 0x2000 +setenv rundtb fdt addr \${mv_dtb_addr_ram}\;fdt boardsetup\;fdt print +setenv bootfromnet tftp \${mv_initrd_addr_ram} \${initrd_name}\;run ramkernel +setenv addcons setenv bootargs \${bootargs} console=ttyS\${console_nr},\${baudrate}N8 +setenv set_static_ip setenv ipaddr \${static_ipaddr} +setenv set_static_nm setenv netmask \${static_netmask} +setenv set_static_gw setenv gatewayip \${static_gateway} +setenv set_ip setenv ip \${ipaddr}::\${gatewayip}:\${netmask} +setenv ramparam setenv bootargs root=/dev/ram ro rootfstype=squashfs +if test ${autoscr_boot} != no; +then + if test ${netboot} = yes; + then + bootp + if test $? = 0; + then + echo "=== bootp succeeded -> netboot ===" + run set_ip + run getdtb rundtb bootfromnet ramparam bootdtb + else + echo "=== netboot failed ===" + fi + fi + run set_static_ip set_static_nm set_static_gw set_ip + echo "=== bootfromflash ===" + run cpdtb rundtb bootfromflash +else + echo "=== boot stopped with autoscr_boot no ===" +fi
board/mvblm7/pci.c new file +264 -0
264 lines not on this page · raw message
include/configs/MVBLM7.h new file +467 -0
467 lines not on this page · raw message
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
PATCH 1/1 add MPC8343 based board mvBlueLYNX-M7 aka mvblm7
Quoted 8 lines · On Wed, 09 Apr 2008 16:16:28 +0200 Andre Schwarz…
MPC8343 based stereo camera system with Cyclone-II FPGA and miniPCI Slot. CPU utilizes dual 10/100/1000 Ethernet using Vitesse VSC8601 RGMII Phys and USB over ULPI.
512MB Micron DDR-II memory, 8MB Flash on LocalBus, SD over SPU and 32MB NAND @ FPGA.Signed-off-by Andre Schwarz <[email protected]>--
Wolfgang, I believe the window for new board support is closed; would you rather I maintain this on a "next" branch on mpc83xx, or are you willing to let this in for 1.3.3?
Andre, thanks for the new board contribution - please include diffstats in your patches.
Quoted 33 lines
CREDITS +5
-0@@ -424,6 +424,11 @@ N: Paolo Scaffardi E: arsenio at tin.it D: FADS823 configuration, MPC823 video support, I2C, wireless keyboard, lots more +N: Andre Schwarz +E: andre.schwarz at matrix-vision.de +D: Support for BlueLYNX and BlueCOUGAR series +W: www.matrix-vision.com + N: Robert Schwebel E: r.schwebel at pengutronix.de D: Support for csb226, logodl and innokom boards (PXA2xx)MAKEALL +1
-0@@ -327,6 +327,7 @@ LIST_83xx=" \ MPC8360ERDK_66 \ MPC837XEMDS \ MPC837XERDB \ + MVBLM7 \ sbc8349 \ TQM834x \ "Makefile +0
-0
Makefile sbc8349_config: unconfig · line 2089
Quoted 6 lines
Makefile +3
-0@@ -2084,6 +2084,9 @@ sbc8349_config: unconfig TQM834x_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc83xx tqm834x +MVBLM7_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc83xx mvblm7 +
I believe intra-family targets are kept in alpha order in the Makefile (as you did in MAKEALL).
please add a MAINTAINERS entry. A doc/README.mvblm7 would be nice.
<snip>
Quoted 5 lines
board/mvblm7/config.mk new file +0
-0
<snip>
board/mvblm7/config.mk line 25
Quoted 3 lines
board/mvblm7/config.mk new file +3
-0+# +# MPC8349E-mITX and MPC8349E-mITX-GP +#
I'd leave this out :)
Quoted 9 lines
board/mvblm7/config.mk new file +4
-0+ +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +TEXT_BASE = 0xFFF00000board/mvblm7/fpga.c new file +0
-0
<snip>
Quoted 1 line
+#if (
CONFIG_FPGA)
#if defined?
<snip>
Quoted 1 line
+int
mvblm7_init_fpga(void)
we don't put spaces between function name and open parenthesis, do we?
All your functions are like this.
board/mvblm7/fpga.c line 65
Quoted 2 lines
board/mvblm7/fpga.c new file +2
-0+{ +DECLARE_GLOBAL_DATA_PTR ;
this needs to be put somewhere global.
Quoted 9 lines
board/mvblm7/fpga.c new file +9
-0+ +fpga_debug ("%s:%d: Initialize FPGA interface (relocation offset = 0x%.8lx)\n" , + __FUNCTION__, __LINE__, gd->reloc_off); +fpga_init (gd->reloc_off); + +fpga_debug ("%s:%d: Adding fpga 0\n" , __FUNCTION__, __LINE__); +fpga_add (fpga_altera, &cyclone2); +return 1 ; +}
board/mvblm7/fpga.c line 84
Quoted 10 lines
board/mvblm7/fpga.c new file +10
-0+ +int fpga_null_fn (int cookie) +{ +return 0 ; +} + +int fpga_config_fn (int assert,int flush,int cookie) +{ +volatile immap_t *im = (volatile immap_t *)CFG_IMMR ; +volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0 ];
fix indentation; use tabs, not spaces.
board/mvblm7/fpga.c
Quoted 2 lines
board/mvblm7/fpga.c new file +2
-0+ +u32 dvo = gpio->dat;
keep declarations together, leave blank space between declarations and code - i.e, mv above blank line to before this line:
board/mvblm7/fpga.c line 88
Quoted 2 lines
board/mvblm7/fpga.c new file +2
-0+fpga_debug ("SET config : %s\n" , assert ?"low" :"high" ); +if ( assert )
no spaces around assert
board/mvblm7/fpga.c line 95
Quoted 7 lines
board/mvblm7/fpga.c new file +7
-0+ dvo |=FPGA_CONFIG ; + else + dvo &= ~FPGA_CONFIG; + +if ( flush ) + gpio->dat = dvo; +return assert;
can you also get in the habit of leaving blank lines before return statements? thanks.
<snipped more code that gets above comments also>
board/mvblm7/fpga.c line 156
Quoted 1 line
board/mvblm7/fpga.c new file +1
-0+for ( i=0 ; i<8 ; i++ ) {
please read CodingStyle! this should look like:
for (i = 0; i < 8; i++) {
<snip similar cases>
Quoted 1 line
board/mvblm7/mvblm7.c +0
-0
<snip>
board/mvblm7/mvblm7.c line 63
Quoted 2 lines
board/mvblm7/mvblm7.c +2
-0+ im->ddr.sdram_interval =CFG_DDR_INTERVAL ; + im->ddr.sdram_clk_cntl =CFG_DDR_CLK_CNTL ;
use tabs, not spaces.
<snip>
Quoted 1 line
+u8
*dhcp_vendorex_prep(u8 * e)
u8 *dhcp_vendorex_prep(u8 *e)
board/mvblm7/mvblm7.c line 98
Quoted 5 lines
board/mvblm7/mvblm7.c +5
-0+{ +char *ptr; + +/* DHCP vendor-class-identifier = 60 */ +if ((ptr =getenv ("dhcp_vendor-class-identifier" ))) {
fix indentation. Use tabs, not spaces.
board/mvblm7/mvblm7.c
Quoted 2 lines
board/mvblm7/mvblm7.c +2
-0+ *e++ =60 ; + *e++ =strlen (ptr);
strlen(ptr);
Quoted 5 lines
board/mvblm7/mvblm7.c +5
-0+while (*ptr) + *e++ = *ptr++; + } +/* DHCP_CLIENT_IDENTIFIER = 61 */ +if ((ptr =getenv ("dhcp_client_id" ))) {
..
<snip>
board/mvblm7/pci.c
Quoted 1 line
board/mvblm7/pci.c +0
-0
<sniiiiip>
board/mvblm7/pci.c line 264
Quoted 7 lines
board/mvblm7/pci.c +7
-0+ tmp[0 ] =cpu_to_be32 (gd->pci_clk); +do_fixup_by_path (blob, path,"clock-frequency" , + &tmp, sizeof(tmp[0]), 1); + } + } +} +#endif
please use generic 83xx pci code (cpu/mpc83xx/pci.c). See the mpc8313erdb board implementation for an example use-case.
Again, thanks for your contribution!
Kim
PATCH 1/1 add MPC8343 based board mvBlueLYNX-M7 aka mvblm7
Dear Kim,
Quoted 2 lines · in message <[email protected]> you wrote:
Wolfgang, I believe the window for new board support is closed; would
Correct.
Quoted 2 lines
you rather I maintain this on a "next" branch on mpc83xx, or are you willing to let this in for 1.3.3?
It's all new stuff, so it should go to "next".
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 "It is better to have tried and failed than to have failed to try, but the result's the same." - Mike Dennison
PATCH 1/1 add MPC8343 based board mvBlueLYNX-M7 aka mvblm7
Wolfgang,
that's absolutely fine since there are some open issues regarding docs and coding style.
I didn't dare to believe getting the board in in the first run anyway ;-)
Sometimes the rules are a bit annoying - but they are definitely necessary !
Cheers,
Andr?
Quoted 14 lines · Wolfgang Denk
Dear Kim,
Quoted 2 lines · in message <[email protected]> you wrote:
Wolfgang, I believe the window for new board support is closed; would
Correct.
Quoted 3 lines
you rather I maintain this on a "next" branch on mpc83xx, or are you willing to let this in for 1.3.3?
Quoted 9 lines
It's all new stuff, so it should go to "next".
Thanks.
Best regards,
Wolfgang Denk
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080410/6c3f7efb/attachment.htm
PATCH 1/1 add MPC8343 based board mvBlueLYNX-M7 aka mvblm7
In reply to Kim PhillipsKim,
I'll fix all your issues mentioned below in the next days. We're not in a hurry. Getting the board into 1.3.3 is absolutely fine.
Thanks,
Andr?
Quoted 246 lines · Kim Phillips
Quoted 9 lines · On Wed, 09 Apr 2008 16:16:28 +0200 Andre Schwarz…
MPC8343 based stereo camera system with Cyclone-II FPGA and miniPCI Slot. CPU utilizes dual 10/100/1000 Ethernet using Vitesse VSC8601 RGMII Phys and USB over ULPI.
512MB Micron DDR-II memory, 8MB Flash on LocalBus, SD over SPU and 32MB NAND @ FPGA.Signed-off-by Andre Schwarz <[email protected]>--
Wolfgang, I believe the window for new board support is closed; would you rather I maintain this on a "next" branch on mpc83xx, or are you willing to let this in for 1.3.3?
Andre, thanks for the new board contribution - please include diffstats in your patches.
Quoted 33 lines
CREDITS +5
-0@@ -424,6 +424,11 @@ N: Paolo Scaffardi E: arsenio at tin.it D: FADS823 configuration, MPC823 video support, I2C, wireless keyboard, lots more +N: Andre Schwarz +E: andre.schwarz at matrix-vision.de +D: Support for BlueLYNX and BlueCOUGAR series +W: www.matrix-vision.com + N: Robert Schwebel E: r.schwebel at pengutronix.de D: Support for csb226, logodl and innokom boards (PXA2xx)MAKEALL +1
-0@@ -327,6 +327,7 @@ LIST_83xx=" \ MPC8360ERDK_66 \ MPC837XEMDS \ MPC837XERDB \ + MVBLM7 \ sbc8349 \ TQM834x \ "Makefile +0
-0Makefile sbc8349_config: unconfig · line 2090
Quoted 7 lines
Makefile +3
-0@@ -2084,6 +2084,9 @@ sbc8349_config: unconfig TQM834x_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc83xx tqm834x +MVBLM7_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc83xx mvblm7 +I believe intra-family targets are kept in alpha order in the
Makefile(as you did in MAKEALL).please add a
MAINTAINERSentry. A doc/README.mvblm7 would be nice.<snip>
Quoted 6 lines
board/mvblm7/config.mk new file +0
-0<snip>
board/mvblm7/config.mk line 25
Quoted 4 lines
board/mvblm7/config.mk new file +3
-0+# +# MPC8349E-mITX and MPC8349E-mITX-GP +#I'd leave this out :)
Quoted 10 lines
board/mvblm7/config.mk new file +4
-0+ +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +TEXT_BASE = 0xFFF00000board/mvblm7/fpga.c new file +0
-0<snip>
Quoted 2 lines
+#if (
CONFIG_FPGA)#if defined?
<snip>
Quoted 2 lines
+int
mvblm7_init_fpga(void)we don't put spaces between function name and open parenthesis, do we?
All your functions are like this.
board/mvblm7/fpga.c line 65
Quoted 3 lines
board/mvblm7/fpga.c new file +2
-0+{ +DECLARE_GLOBAL_DATA_PTR ;this needs to be put somewhere global.
Quoted 10 lines
board/mvblm7/fpga.c new file +9
-0+ +fpga_debug ("%s:%d: Initialize FPGA interface (relocation offset = 0x%.8lx)\n" , + __FUNCTION__, __LINE__, gd->reloc_off); +fpga_init (gd->reloc_off); + +fpga_debug ("%s:%d: Adding fpga 0\n" , __FUNCTION__, __LINE__); +fpga_add (fpga_altera, &cyclone2); +return 1 ; +}board/mvblm7/fpga.c line 84
Quoted 10 lines
board/mvblm7/fpga.c new file +10
-0+ +int fpga_null_fn (int cookie) +{ +return 0 ; +} + +int fpga_config_fn (int assert,int flush,int cookie) +{ +volatile immap_t *im = (volatile immap_t *)CFG_IMMR ; +volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0 ];fix indentation; use tabs, not spaces.
board/mvblm7/fpga.c
Quoted 3 lines
board/mvblm7/fpga.c new file +2
-0+ +u32 dvo = gpio->dat;keep declarations together, leave blank space between declarations and code - i.e, mv above blank line to before this line:
board/mvblm7/fpga.c line 88
Quoted 3 lines
board/mvblm7/fpga.c new file +2
-0+fpga_debug ("SET config : %s\n" , assert ?"low" :"high" ); +if ( assert )no spaces around assert
board/mvblm7/fpga.c line 95
Quoted 8 lines
board/mvblm7/fpga.c new file +7
-0+ dvo |=FPGA_CONFIG ; + else + dvo &= ~FPGA_CONFIG; + +if ( flush ) + gpio->dat = dvo; +return assert;can you also get in the habit of leaving blank lines before return statements? thanks.
<snipped more code that gets above comments also>
board/mvblm7/fpga.c line 156
Quoted 2 lines
board/mvblm7/fpga.c new file +1
-0+for ( i=0 ; i<8 ; i++ ) {please read CodingStyle! this should look like:
for (i = 0; i < 8; i++) {
<snip similar cases>
Quoted 2 lines
board/mvblm7/mvblm7.c +0
-0<snip>
board/mvblm7/mvblm7.c line 63
Quoted 3 lines
board/mvblm7/mvblm7.c +2
-0+ im->ddr.sdram_interval =CFG_DDR_INTERVAL ; + im->ddr.sdram_clk_cntl =CFG_DDR_CLK_CNTL ;use tabs, not spaces.
<snip>
Quoted 2 lines
+u8
*dhcp_vendorex_prep(u8 * e)u8 *dhcp_vendorex_prep(u8 *e)
board/mvblm7/mvblm7.c line 98
Quoted 6 lines
board/mvblm7/mvblm7.c +5
-0+{ +char *ptr; + +/* DHCP vendor-class-identifier = 60 */ +if ((ptr =getenv ("dhcp_vendor-class-identifier" ))) {fix indentation. Use tabs, not spaces.
board/mvblm7/mvblm7.c
Quoted 3 lines
board/mvblm7/mvblm7.c +2
-0+ *e++ =60 ; + *e++ =strlen (ptr);strlen(ptr);
Quoted 6 lines
board/mvblm7/mvblm7.c +5
-0+while (*ptr) + *e++ = *ptr++; + } +/* DHCP_CLIENT_IDENTIFIER = 61 */ +if ((ptr =getenv ("dhcp_client_id" ))) {..
<snip>
board/mvblm7/pci.c
Quoted 2 lines
board/mvblm7/pci.c +0
-0<sniiiiip>
board/mvblm7/pci.c line 264
Quoted 8 lines
board/mvblm7/pci.c +7
-0+ tmp[0 ] =cpu_to_be32 (gd->pci_clk); +do_fixup_by_path (blob, path,"clock-frequency" , + &tmp, sizeof(tmp[0]), 1); + } + } +} +#endif please use generic 83xx pci code (
cpu/mpc83xx/pci.c). See the mpc8313erdb board implementation for an example use-case.
Quoted 4 lines
Again, thanks for your contribution!
Kim
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080410/8b954151/attachment.htm