fix broken matrix vision boards
PATCH 1/1 fix broken matrix vision boards
boards are currently broken due to missing common dir inside board dir.
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
PATCH 1/1 add Matrix Vision specific dir for common code.
--- board/matrix_vision/common/Makefile | 54 ++++++++++++++ board/matrix_vision/common/mv_common.c | 125 ++++++++++++++++++++++++++++++++ board/matrix_vision/common/mv_common.h | 25 +++++++ 3 files changed, 204 insertions(+), 0 deletions(-) create mode 100644 board/matrix_vision/common/Makefile create mode 100644 board/matrix_vision/common/mv_common.c create mode 100644 board/matrix_vision/common/mv_common.h
board/matrix_vision/common/Makefile new file +54 -0
@@ -0,0 +1,54 @@ +# +# (C) Copyright 2006 +# 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 +# + +include $(TOPDIR)/config.mk + +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)board/$(VENDOR)/common) +endif + +LIB = $(obj)lib$(VENDOR).a + +COBJS-y = mv_common.o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/matrix_vision/common/mv_common.c new file +125 -0
125 lines not on this page · raw message
board/matrix_vision/common/mv_common.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Copyright 2008 Matrix Vision GmbH +* +* 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 mv_load_fpga (void ); +extern void mv_reset_environment (void );
Signature · 6 lines
1.6.0.4 MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
PATCH 1/1 add Matrix Vision specific dir for common code.
Wolfgang, Kim,
ok - Signed-off-by is missing although my .gitconfig has "signoff = true" set in [format] section ... looks like I need -s arg at git format-patch. Any hints about this ?
I also couldn't figure out how to send a *single* mail for a single patch, i.e. without this initial stuff. IMHO this is only needed for a patch series.
Is there anything else you want me to fix for this patch before I resubmit it ?
Regards,
Andr?
Quoted 221 lines · Andre Schwarz
--- board/matrix_vision/common/Makefile | 54 ++++++++++++++ board/matrix_vision/common/mv_common.c | 125 ++++++++++++++++++++++++++++++++ board/matrix_vision/common/mv_common.h | 25 +++++++ 3 files changed, 204 insertions(+), 0 deletions(-) create mode 100644 board/matrix_vision/common/Makefile create mode 100644 board/matrix_vision/common/mv_common.c create mode 100644 board/matrix_vision/common/mv_common.hboard/matrix_vision/common/Makefile new file +54
-0@@ -0,0 +1,54 @@ +# +# (C) Copyright 2006 +# 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 +# + +include $(TOPDIR)/config.mk + +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)board/$(VENDOR)/common) +endif + +LIB = $(obj)lib$(VENDOR).a + +COBJS-y = mv_common.o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################board/matrix_vision/common/mv_common.c new file +125
-0@@ -0,0 +1,125 @@ +/* +* (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 +*/ + +#include <common.h> +#include <malloc.h> +#include <environment.h> +#include <asm/io.h> + +DECLARE_GLOBAL_DATA_PTR ; + +static char * entries_to_keep[] = { +"serial#" ,"ethaddr" ,"eth1addr" ,"model_info" ,"sensor_cnt" , +"fpgadatasize" ,"ddr_size" ,"use_dhcp" ,"use_static_ipaddr" , +"static_ipaddr" ,"static_netmask" ,"static_gateway" , +"syslog" ,"watchdog" ,"netboot" ,"evo8serialnumber" }; + +#define MV_MAX_ENV_ENTRY_LENGTH 64 +#define MV_KEEP_ENTRIES ARRAY_SIZE(entries_to_keep) + +void mv_reset_environment (void ) +{ +int i; +char *s[MV_KEEP_ENTRIES ]; +char entries[MV_KEEP_ENTRIES ][MV_MAX_ENV_ENTRY_LENGTH ]; + +printf ("\n*** RESET ENVIRONMENT ***\n" ); + +memset (entries,0 ,MV_KEEP_ENTRIES *MV_MAX_ENV_ENTRY_LENGTH ); +for (i =0 ; i <MV_KEEP_ENTRIES ; i++) { + s[i] =getenv (entries_to_keep[i]); +if (s[i]) { +printf ("save '%s' : %s\n" , entries_to_keep[i], s[i]); +strncpy (entries[i], s[i],MV_MAX_ENV_ENTRY_LENGTH ); + } + } + + gd->env_valid =0 ; +env_relocate (); + +for (i =0 ; i <MV_KEEP_ENTRIES ; i++) { +if (s[i]) { +printf ("restore '%s' : %s\n" , entries_to_keep[i], s[i]); +setenv (entries_to_keep[i], s[i]); + } + } + +saveenv (); +} + +int mv_load_fpga (void ) +{ +int result; +size_t data_size =0 ; +void *fpga_data =NULL ; +char *datastr =getenv ("fpgadata" ); +char *sizestr =getenv ("fpgadatasize" ); + +if (getenv ("skip_fpga" )) { +printf ("found 'skip_fpga' -> FPGA _not_ loaded !\n" ); +return -1 ; + } +printf ("loading FPGA\n" ); + +if (datastr) + fpga_data = (void *)simple_strtoul (datastr,NULL ,16 ); +if (sizestr) + data_size = (size_t )simple_strtoul (sizestr,NULL ,16 ); +if (!data_size) { +printf ("fpgadatasize invalid -> FPGA _not_ loaded !\n" ); +return -1 ; + } + + result =fpga_load (0 , fpga_data, data_size); +if (!result) +show_boot_progress (0 ); + +return result; +} + +u8 *dhcp_vendorex_prep (u8 *e) +{ +char *ptr; + +/* DHCP vendor-class-identifier = 60 */ +if ((ptr =getenv ("dhcp_vendor-class-identifier" ))) { + *e++ =60 ; + *e++ =strlen (ptr); +while (*ptr) + *e++ = *ptr++; + } +/* DHCP_CLIENT_IDENTIFIER = 61 */ +if ((ptr =getenv ("dhcp_client_id" ))) { + *e++ =61 ; + *e++ =strlen (ptr); +while (*ptr) + *e++ = *ptr++; + } + +return e; +} + +u8 *dhcp_vendorex_proc (u8 *popt) +{ +return NULL ; +}board/matrix_vision/common/mv_common.h new file +15
-0@@ -0,0 +1,25 @@ +/* +* Copyright 2008 Matrix Vision GmbH +* +* 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.
board/matrix_vision/common/mv_common.h line 25
Quoted 10 lines
board/matrix_vision/common/mv_common.h new file +10
-0+* +* 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 mv_load_fpga (void ); +extern void mv_reset_environment (void );
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
PATCH 1/1 add Matrix Vision specific dir for common code.
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 4 lines · In message <1251712526.4189.25.camel@swa-m460> you wrote:
ok - Signed-off-by is missing although my .gitconfig has "signoff = true" set in [format] section ... looks like I need -s arg at git format-patch. Any hints about this ?
The Signed-off-by: does not get added when exporting the commit as a patch, but when committing the changes, i. e. it is part of the commit message, not added later.
Quoted 3 lines
I also couldn't figure out how to send a *single* mail for a single patch, i.e. without this initial stuff. IMHO this is only needed for a patch series.
What do you mean by "initial stuff" ?
Quoted 2 lines
Is there anything else you want me to fix for this patch before I resubmit it ?
Please provide a usable commit message (if needed, use "git commit --amend", eventually as part of a "git rebase -i", to fix the commit message in your repository) and make sure it contains a Signed-off-by:
line.
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 all seemed, he thought, to be rather a lot of trouble to go to just sharpen a razor blade. - Terry Pratchett, _The Light Fantastic_
PATCH 1/1 add Matrix Vision specific dir for common code.
Wolfgang,
Quoted 11 lines · Wolfgang Denk
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 4 lines · In message <1251712526.4189.25.camel@swa-m460> you wrote:
ok - Signed-off-by is missing although my .gitconfig has "signoff = true" set in [format] section ... looks like I need -s arg at git format-patch. Any hints about this ?
The Signed-off-by: does not get added when exporting the commit as a patch, but when committing the changes, i. e. it is part of the commit message, not added later.
But giving "-s" to git format-patch actually adds the Singed-off-by: ...
Anyway ... I'll do as you suggest, i.e. add it to the commit message.
Quoted 6 lines
Quoted 4 lines
I also couldn't figure out how to send a *single* mail for a single patch, i.e. without this initial stuff. IMHO this is only needed for a patch series.
What do you mean by "initial stuff" ?
git send-mail always creates two or more mails. The first one is unnecessary for a single patch, i.e. not a patch series.
Quoted 8 lines
Quoted 3 lines
Is there anything else you want me to fix for this patch before I resubmit it ?
Please provide a usable commit message (if needed, use "git commit --amend", eventually as part of a "git rebase -i", to fix the commit message in your repository) and make sure it contains a Signed-off-by:
line.
ah - excellent. That's what I've been looking for. Thank you.
Regards,
Andr?
Quoted 6 lines
Best regards,
Wolfgang Denk
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
PATCH 1/1 add Matrix Vision specific dir for common code.
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 3 lines · In message <1251722510.4189.67.camel@swa-m460> you wrote:
git send-mail always creates two or more mails. The first one is unnecessary for a single patch, i.e. not a patch series.
It never did that for me. Are you sure you are generating the input for "git send-mail" using "git format-patch"? If yes, can you please send me a copy of this generated patch (directly, not on the ML; please wrap it into a tarball so it gets sent unmodified).
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 You've no idea of what a poor opinion I have of myself, and how little I deserve it. - W. S. Gilbert
PATCH 1/1 add Matrix Vision specific dir for common code.
Quoted 11 lines · Wolfgang Denk
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 3 lines · In message <1251722510.4189.67.camel@swa-m460> you wrote:
git send-mail always creates two or more mails. The first one is unnecessary for a single patch, i.e. not a patch series.
It never did that for me. Are you sure you are generating the input for "git send-mail" using "git format-patch"? If yes, can you please send me a copy of this generated patch (directly, not on the ML; please wrap it into a tarball so it gets sent unmodified).
After following your suggestion (git format-patch) with proper commit message and "Signed-off-by:" I could omit the "--compose" argument for git send-mail leading to a single mail, i.e. this is fixed now.
Thanks for your help,
Andr?
Quoted 6 lines
Best regards,
Wolfgang Denk
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
PATCH 1/1 add Matrix Vision specific dir for common code.
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 4 lines · In message <1251790163.4137.2.camel@swa-m460> you wrote:
After following your suggestion (git format-patch) with proper commit message and "Signed-off-by:" I could omit the "--compose" argument for git send-mail leading to a single mail, i.e. this is fixed now.
Hm... but the man page is pretty clear about the fact that --compose will result in an additional introductory message to be generated:
Use $GIT_EDITOR, core.editor, $VISUAL, or $EDITOR to edit an introductory message for the patch series.
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 "A child is a person who can't understand why someone would give away a perfectly good kitten." - Doug Larson
PATCH 1/1 add Matrix Vision specific dir for common code.
In reply to André SchwarzDear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 3 lines · In message <1251712526.4189.25.camel@swa-m460> you wrote:
Is there anything else you want me to fix for this patch before I resubmit it ?
And please fix the compiler warnings:
...
Configuring for MVBC_P board...mv_common.c: In function 'mv_load_fpga':
mv_common.c:93: warning: implicit declaration of function 'fpga_load'e1000.c: In function 'e1000_transmit':
e1000.c:5019: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
...
Configuring for MVBLM7 board...mv_common.c: In function 'mv_load_fpga':
mv_common.c:93: warning: implicit declaration of function 'fpga_load'mvblm7.c: In function 'misc_init_r':
mvblm7.c:108: warning: implicit declaration of function 'mv_reset_environment'
...
Best regards,
Wolfgang Denk
Signature · 4 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 If you hear an onion ring, answer it.
PATCH 1/1 add Matrix Vision specific dir for common code.
Wolfgang,
Quoted 7 lines · Wolfgang Denk
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 3 lines · In message <1251712526.4189.25.camel@swa-m460> you wrote:
Is there anything else you want me to fix for this patch before I resubmit it ?
Quoted 6 lines
And please fix the compiler warnings:
...
Configuring forMVBC_Pboard...mv_common.c: In function 'mv_load_fpga':
mv_common.c:93: warning: implicit declaration of function 'fpga_load'
ok - missed that.
Quoted 2 lines
e1000.c: In function 'e1000_transmit':
e1000.c:5019: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
That's e1000 driver. Looks like a recent change from Timur.
f81ecb5d drivers/net/e1000.c (Timur Tabi 2009-08-17 15:55:38
-0500 5019) txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdevr.
Quoted 6 lines
...
Configuring for MVBLM7 board...mv_common.c: In function 'mv_load_fpga':
mv_common.c:93: warning: implicit declaration of function 'fpga_load'mvblm7.c: In function 'misc_init_r':
mvblm7.c:108: warning: implicit declaration of function 'mv_reset_environment'
will fix.
Regards,
Andr?
Quoted 7 lines
...
Best regards,
Wolfgang Denk
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich