From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LxhGF-0008Iu-MC for qemu-devel@nongnu.org; Sat, 25 Apr 2009 08:45:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LxhGA-0008C3-Qb for qemu-devel@nongnu.org; Sat, 25 Apr 2009 08:45:38 -0400 Received: from [199.232.76.173] (port=52078 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LxhGA-0008Bl-Fp for qemu-devel@nongnu.org; Sat, 25 Apr 2009 08:45:34 -0400 Received: from 30.mail-out.ovh.net ([213.186.62.213]:52584) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LxhG9-0005Z9-UC for qemu-devel@nongnu.org; Sat, 25 Apr 2009 08:45:34 -0400 Date: Sat, 25 Apr 2009 14:44:31 +0200 From: Jean-Christophe PLAGNIOL-VILLARD Subject: Re: [Qemu-devel] [PATCH 16/16] Add two boards which use S3C2410 SOC Message-ID: <20090425124431.GB25381@game.jcrosoft.org> References: <20090423171503.GC4629@derik> <20090423181702.GS4629@derik> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090423181702.GS4629@derik> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincent Sanders Cc: qemu-devel@nongnu.org On 19:17 Thu 23 Apr , Vincent Sanders wrote: > Add bast and smdk2410 boards which use S3C2410 SOC > > Signed-off-by: Vincent Sanders > --- > Makefile.target | 1 > hw/bast.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++ > hw/boards.h | 6 + > hw/smdk2410.c | 120 ++++++++++++++++++++++++++++++++++ > target-arm/machine.c | 2 > 5 files changed, 305 insertions(+) > > diff -urN qemusvnclean/hw/bast.c qemusvnpatches/hw/bast.c > --- qemusvnclean/hw/bast.c 1970-01-01 01:00:00.000000000 +0100 > +++ qemusvnpatches/hw/bast.c 2009-04-23 17:45:53.000000000 +0100 > @@ -0,0 +1,176 @@ > +/* hw/bast.c > + * > + * System emulation for the Simtec Electronics BAST > + * > + * Copyright 2006, 2008 Daniel Silverstone and Vincent Sanders > + * > + * This file is under the terms of the GNU General Public > + * License Version 2. > + */ > + > +#include "hw.h" > +#include "sysemu.h" > +#include "arm-misc.h" > +#include "net.h" > +#include "smbus.h" > +#include "flash.h" > +#include "devices.h" > +#include "boards.h" > + > +#include "s3c2410x.h" > + > +#define BIOS_FILENAME "able.bin" > + > +typedef struct { > + S3CState *soc; > + unsigned char cpld_ctrl2; > + struct nand_flash_s *nand[4]; > +} STCBState; > + > +/* Bytes in a Kilobyte */ > +#define KILO 1024 > +/* Bytes in a megabyte */ > +#define MEGA 1024 * KILO > +/* Bytes */ > +#define BYTE 1 > +/* Bits in a byte */ > +#define BIT 8 > + > +/* Useful defines */ > +#define BAST_NOR_BASE CPU_S3C2410X_CS0 > +#define BAST_NOR_SIZE 16 * MEGA / BIT > +#define BAST_BOARD_ID 331 > + > + if (_ram_size > (256 * MEGA * BYTE)) > + _ram_size = 256 * MEGA * BYTE; > + ram_size = _ram_size; > + > + /* allocate storage for board state */ > + stcb = malloc(sizeof(STCBState)); > + > + /* initialise SOC */ > + stcb->soc = s3c2410x_init(ram_size); > + > + /* Register the NOR flash ROM */ > + cpu_register_physical_memory(BAST_NOR_BASE, > + BAST_NOR_SIZE, > + qemu_ram_alloc(BAST_NOR_SIZE) | IO_MEM_ROM); > + > + /* initialise board informations */ > + bast_binfo.ram_size = ram_size; > + bast_binfo.kernel_filename = kernel_filename; > + bast_binfo.kernel_cmdline = kernel_cmdline; > + bast_binfo.initrd_filename = initrd_filename; > + bast_binfo.nb_cpus = 1; > + bast_binfo.loader_start = BAST_NOR_BASE; > + > + if (kernel_filename == NULL) { > + /* No kernel given so try and aquire a bootloader */ it will be nice if you use the cfi flash support that will allow us to use the -pflash to specify the flash file and also use main u-boot without any update Best Regards, J.