All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: "Marek Vašut" <marek.vasut@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Add Palm Tungsten|C support
Date: Wed, 14 Jan 2009 17:02:05 +0100	[thread overview]
Message-ID: <20090114160205.GK26085@game.jcrosoft.org> (raw)
In-Reply-To: <5e26b58e0901140443k5a35224j8f589e100a79978d@mail.gmail.com>

On 16:20 Wed 14 Jan     , Marek Vašut wrote:
> Hi,
> 
> this patch adds Palm TC support. It's a PXA based handheld device (unlike
> PalmTE defined in palm.c which is OMAP) so I decided to separate these and
> create new palmpxa.c . Near future plan is to add basic support for other
> pxa-based palm models as well. Please consider applying.
> 
IIRC some hacker port u-boot on it maybe you could try it

and please update the doc too

Best Regards,
J.
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> 
> Thanks
> Marek

> Index: Makefile.target
> ===================================================================
> --- Makefile.target	(revision 6290)
> +++ Makefile.target	(working copy)
> @@ -716,6 +716,7 @@
>  OBJS+= tsc2005.o bt-hci-csr.o
>  OBJS+= mst_fpga.o mainstone.o
>  OBJS+= musicpal.o pflash_cfi02.o
> +OBJS+= palmpxa.o
>  CPPFLAGS += -DHAS_AUDIO
>  endif
>  ifeq ($(TARGET_BASE_ARCH), sh4)
> Index: hw/boards.h
> ===================================================================
> --- hw/boards.h	(revision 6290)
> +++ hw/boards.h	(working copy)
> @@ -95,6 +95,9 @@
>  /* palm.c */
>  extern QEMUMachine palmte_machine;
>  
> +/* palmpxa.c */
> +extern QEMUMachine palmtc_machine;
> +
>  /* nseries.c */
>  extern QEMUMachine n800_machine;
>  extern QEMUMachine n810_machine;
> Index: hw/palmpxa.c
> ===================================================================
> --- hw/palmpxa.c	(revision 0)
> +++ hw/palmpxa.c	(revision 0)
> @@ -0,0 +1,69 @@
> +/*
> + * Intel PXA2xx-based Palm PDA Platforms
> + *
> + * Copyright (c) 2009 by Marek Vasut <marek.vasut@gmail.com>
> + *
> + * Code based on spitz platform by Andrzej Zaborowski <balrog@zabor.org>
> + *
> + * This code is licensed under the GNU GPL v2.
> + */
> +
> +#include "hw.h"
> +#include "pxa.h"
> +#include "net.h"
> +#include "flash.h"
> +#include "sysemu.h"
> +#include "devices.h"
> +#include "boards.h"
> +
> +#define PALMTC_GPIO_nPOWER	9
> +
> +static const int sector_len = 128 * 1024;
> +
> +static void palmtc_init(ram_addr_t ram_size, int vga_ram_size,
> +                const char *boot_device, DisplayState *ds,
> +                const char *kernel_filename, const char *kernel_cmdline,
> +                const char *initrd_filename, const char *cpu_model)
> +{
> +	struct pxa2xx_state_s *cpu;
> +	int index;
> +
> +	uint32_t palmtc_rom = 0x01000000;	/* 16 Mb of ROM */
> +	uint32_t palmtc_ram = 0x04000000;	/* 64 Mb of RAM */
why not define macro of the size and use it in the ram_require
> +
> +	if (ram_size < (palmtc_ram + palmtc_rom + PXA2XX_INTERNAL_SIZE)) {
> +		fprintf(stderr, "This platform requires %i bytes of memory\n",
> +			palmtc_ram + palmtc_rom + PXA2XX_INTERNAL_SIZE);
> +		exit(1);
> +	}
no need will be check agoist the ram_require
> +
> +	/* CPU */
> +	cpu = pxa255_init(palmtc_ram, ds);
> +
> +	/* Onboard FlashROM */
> +	index = drive_get_index(IF_PFLASH, 0, 0);
> +	if (index == -1) {
> +		fprintf(stderr, "A flash image must be given with the "
> +			"'pflash' parameter\n");
> +		exit(1);
> +	}
> +
> +	if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(palmtc_rom),
> +		drives_table[index].bdrv, sector_len, palmtc_rom / sector_len,
> +		2, 0, 0, 0, 0)) {
> +		fprintf(stderr, "qemu: Error registering flash memory.\n");
> +		exit(1);
> +	}
could you specify which flash is used on the rela hard?
> +
> +	/* Deassert power button */
> +	qemu_set_irq(pxa2xx_gpio_in_get(cpu->gpio)[PALMTC_GPIO_nPOWER], 1);
> +
> +	cpu->env->regs[15] = 0x00000000;	/* Start from ROM */
why don't you have the -kernel option support?
Best Regards,
J.

  reply	other threads:[~2009-01-14 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 15:20 [Qemu-devel] [PATCH] Add Palm Tungsten|C support Marek Vašut
2009-01-14 16:02 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-01-14 16:23   ` Marek Vasut
2009-01-14 16:17     ` Jean-Christophe PLAGNIOL-VILLARD
2009-01-14 17:08       ` Marek Vasut
2009-01-14 17:26         ` Marek Vasut

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=20090114160205.GK26085@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=marek.vasut@gmail.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.