From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Vincent Sanders <vince@kyllikki.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 16/16] Add two boards which use S3C2410 SOC
Date: Sat, 25 Apr 2009 14:44:31 +0200 [thread overview]
Message-ID: <20090425124431.GB25381@game.jcrosoft.org> (raw)
In-Reply-To: <20090423181702.GS4629@derik>
On 19:17 Thu 23 Apr , Vincent Sanders wrote:
> Add bast and smdk2410 boards which use S3C2410 SOC
>
> Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
> ---
> 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.
prev parent reply other threads:[~2009-04-25 12:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 17:15 [Qemu-devel] [PATCH 0/16] ARM Add S3C SOC core, drivers and boards Vincent Sanders
2009-04-23 17:45 ` [Qemu-devel] [PATCH 1/16] ARM Add ARM 920T identifiers Vincent Sanders
2009-04-30 16:08 ` Paul Brook
2009-05-23 16:50 ` Vincent Sanders
2009-05-24 18:31 ` Paul Brook
2009-05-26 9:39 ` Vincent Sanders
2009-05-26 9:42 ` Laurent Desnogues
2009-05-26 9:56 ` Jamie Lokier
2009-05-26 10:08 ` Laurent Desnogues
2009-05-26 11:29 ` Jamie Lokier
2009-05-26 11:46 ` Laurent Desnogues
2009-05-26 10:16 ` Paul Brook
2009-05-26 11:18 ` Vincent Sanders
2009-04-23 17:48 ` [Qemu-devel] [PATCH 2/16] Add s3c SOC header Vincent Sanders
2009-04-23 17:50 ` [Qemu-devel] [PATCH 3/16] S3C SDRAM memory controller Peripheral Vincent Sanders
2009-04-23 17:52 ` [Qemu-devel] [PATCH 4/16] S3C irq controller Vincent Sanders
2009-04-23 17:58 ` [Qemu-devel] [PATCH 05/16] S3C Clock controller peripheral Vincent Sanders
2009-04-23 18:00 ` [Qemu-devel] [PATCH 7/16] S3C serial peripheral Vincent Sanders
2009-04-23 18:02 ` [Qemu-devel] [PATCH 6/16] S3C Timers Vincent Sanders
2009-04-23 18:04 ` [Qemu-devel] [PATCH 8/16] S3C Real Time Clock Vincent Sanders
2009-04-23 18:05 ` [Qemu-devel] [PATCH 9/16] S3C General Purpose IO Vincent Sanders
2009-04-23 18:07 ` [Qemu-devel] [PATCH 10/16] S3C I2C peripheral Vincent Sanders
2009-04-23 18:08 ` [Qemu-devel] [PATCH 11/16] S3C LCD display Vincent Sanders
2009-04-23 18:09 ` [Qemu-devel] [PATCH 12/16] S3C NAND controller Vincent Sanders
2009-04-23 18:11 ` [Qemu-devel] [PATCH 13/16] S3C2410 SOC implementation Vincent Sanders
2009-04-23 18:14 ` [Qemu-devel] [PATCH 14/16] S3C2440 SOC impementation Vincent Sanders
2009-04-23 18:15 ` [Qemu-devel] [PATCH 15/16] Add S3C SOC files to Makefile Vincent Sanders
2009-04-23 18:17 ` [Qemu-devel] [PATCH 16/16] Add two boards which use S3C2410 SOC Vincent Sanders
2009-04-25 12:44 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090425124431.GB25381@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=qemu-devel@nongnu.org \
--cc=vince@kyllikki.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).