qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 16/16] Add two boards which use S3C2410 SOC


From: Jean-Christophe PLAGNIOL-VILLARD
Subject: Re: [Qemu-devel] [PATCH 16/16] Add two boards which use S3C2410 SOC
Date: Sat, 25 Apr 2009 14:44:31 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On 19:17 Thu 23 Apr     , Vincent Sanders wrote:
> Add bast and smdk2410 boards which use S3C2410 SOC 
> 
> Signed-off-by: Vincent Sanders <address@hidden>
> ---
>  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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]