From: Wolfgang Denk Date: Fri, 09 Apr 2010 23:50:05 +0200 Subject: [U-Boot] [PATCH 2/2] add support of arm/pxa270 board made by voipac In-Reply-To: <20100329162420.40f5433b@laska.campus-ws.pu.ru> References: <20100329162420.40f5433b@laska.campus-ws.pu.ru> Message-ID: <20100409215005.942231E173@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mikhail Kshevetskiy, In message <20100329162420.40f5433b@laska.campus-ws.pu.ru> you wrote: > This patch is based on custom u-boot-1.1.2 version produced by voipac > (http://www.voipac.com) and board/trizepsiv files from current u-boot. > > Up to now only PXA270 DIMM module with NOR flash is tested. > > Signed-off-by: Mikhail Kshevetskiy > --- > Makefile | 3 + > board/vpac270/Makefile | 51 +++ > board/vpac270/config.mk | 3 + > board/vpac270/lowlevel_init.S | 740 +++++++++++++++++++++++++++++++++++++++++ > board/vpac270/vpac270.c | 101 ++++++ > include/configs/vpac270.h | 329 ++++++++++++++++++ > 6 files changed, 1227 insertions(+), 0 deletions(-) > create mode 100644 board/vpac270/Makefile > create mode 100644 board/vpac270/config.mk > create mode 100644 board/vpac270/lowlevel_init.S > create mode 100644 board/vpac270/vpac270.c > create mode 100644 include/configs/vpac270.h Entries to MAKEALL and MAINTAINERS missing. > --- /dev/null > +++ b/board/vpac270/config.mk > @@ -0,0 +1,3 @@ > +TEXT_BASE xa1f00000 > +# 0xa1700000 > +#TEXT_BASE 0 Please do not adde dead code. Please fix globally. > diff --git a/board/vpac270/lowlevel_init.S b/board/vpac270/lowlevel_init.S > new file mode 100644 > index 0000000..1df381c > --- /dev/null > +++ b/board/vpac270/lowlevel_init.S > @@ -0,0 +1,740 @@ > +/* > + * This was originally from the Lubbock u-boot port. > + * > + * Most of this taken from Redboot hal_platform_setup.h with cleanup > + * > + * NOTE: I haven't clean this up considerably, just enough to get it > + * running. See hal_platform_setup.h for the source. See > + * board/cradle/lowlevel_init.S for another PXA250 setup that is > + * much cleaner. > + * > + * 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 > +#include > +#include > + > +/* wait for coprocessor write complete */ > + .macro CPWAIT reg > + mrc p15,0,\reg,c2,c0,0 > + mov \reg,\reg > + sub pc,pc,#4 > + .endm Indentation by TAB only. Please fix globally. > + /* Set up GPIO pins first ----------------------------------------- */ > + > + ldr r0, GPSR0 > + ldr r1, ONFIG_SYS_GPSR0_VAL > + str r1, [r0] One TAB should be enough to separate insn and args. > +#ifdef NODEBUG Please don't add dead code, not even like this. > + /*Disable software and data breakpoints */ > + mov r0,#0 > + mcr p15,0,r0,c14,c8,0 /* ibcr0 */ > + mcr p15,0,r0,c14,c9,0 /* ibcr1 */ > + mcr p15,0,r0,c14,c4,0 /* dbcon */ > + > + /*Enable all debug functionality */ > + mov r0,#0x80000000 > + mcr p14,0,r0,c10,c0,0 /* dcsr */ > +#endif > +/* ------------------------------------------------------------------------- */ > + > +/* > + * Miscelaneous platform dependent initialisations > + */ Typos. s/l/ll/, s/sat/zat/ > +int board_init (void) > +{ > + /* memory and cpu-speed are setup before relocation */ > + /* so we do _nothing_ here */ incorrect multiline comment style. > +int board_late_init(void) > +{ > +#if defined(CONFIG_SERIAL_MULTI) > + char *consolegetenv("boot_console"); > + > + if (console NULL) console BOOT_CONSOLE; Incorrect indentation. What the heck is "console BOOT_CONSOLE" ??? > +++ b/include/configs/vpac270.h > @@ -0,0 +1,329 @@ > +/* > + * (C) Copyright 2005 > + * Detlef Vollmann, Toradex AG, > + * > + * (C) Copyright 2004 > + * Robert Whaley, Applied Data Systems, Inc. rwhaley at applieddata.net > + * > + * (C) Copyright 2002 > + * Kyle Harris, Nexus Technologies, Inc. kharris at nexus-tech.net > + * > + * (C) Copyright 2002 > + * Sysgo Real-Time Solutions, GmbH > + * Marius Groeger Is it really true that all these people have contributed significant parts to that file, and at the given dates? > +#ifndef __CONFIG_H > +#define __CONFIG_H > + > +//#define DEBUG 15 No C++ comments. Please fix globally. > +/* > + * Size of malloc() pool > + */ > +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SECT_SIZE + 128*1024) > +#define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ Line too long. Please fix globally. > +#define CONFIG_PXA_SERIAL > +#define CONFIG_SERIAL_MULTI > +#define CONFIG_FFUART 1 /* we use FFUART on Colibri */ > +#define CONFIG_BTUART 1 /* we use BTUART on Colibri */ > +#define CONFIG_STUART 1 /* we use STUART on Colibri */ On colibri? Is the comment really correct? > +/* allow to overwrite serial and ethaddr */ > +#define CONFIG_ENV_OVERWRITE > + > +#define CONFIG_SERVERIP 192.168.1.1 > +#define CONFIG_IPADDR 192.168.1.48 > +#define CONFIG_NETMASK 255.255.255.0 > +#define CONFIG_ETHADDR 00:01:02:03:04:05 NAK. Remove this stuff, it makes no sense. Especially not with a stolen MAC address (00:01:02 belongs to the 3COM CORPORATION). Best regards, Wolfgang Denk -- 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 An armed society is a polite society.