qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] sh4: r2d. Endian conversion for peripheral register initialization.
Date: Sat, 24 Jan 2009 19:20:53 +0100	[thread overview]
Message-ID: <20090124182053.GA14335@volta.aurel32.net> (raw)
In-Reply-To: <200812141752.mBEHqOKc018785@smtp11.dti.ne.jp>

On Mon, Dec 15, 2008 at 02:52:24AM +0900, takasi-y@ops.dti.ne.jp wrote:
> Add endian conversion to hw/r2d.c which lacks consideration of endian on
> setting BSC registers.
> 
> Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
> ---

Thanks, applied.

> Ah, thank you for pointed it out.
> > > +      cpu_physical_memory_write(SH7750_BCR1_A7,&bcr1,4);
> > > +      cpu_physical_memory_write(SH7750_BCR2_A7,&bcr2,2);
> > 
> > I pushed this patch but it looks like there may be an endianness problem here.
> I found what I wanted might be stl_phys/stw_phys.
> 
> This time I set up big endian target system, and tested both endian.
> But, I still in trouble setting up big endian host.
> Because I don't have real HW here, I tried qemu sparc, mipsel and ppc,
>  but none of them are successful, so far.
> Could someone tell me which arch is recommended for testing host ?
> 
> Cheers,
> /yoshii
> 
> ---
>  hw/r2d.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/r2d.c b/hw/r2d.c
> index 5d5eb1e..b3aa6e9 100644
> --- a/hw/r2d.c
> +++ b/hw/r2d.c
> @@ -238,10 +238,8 @@ static void r2d_init(ram_addr_t ram_size, int vga_ram_size,
>      {
>        int kernel_size;
>        /* initialization which should be done by firmware */
> -      uint32_t bcr1 = 1 << 3; /* cs3 SDRAM */
> -      uint16_t bcr2 = 3 << (3 * 2); /* cs3 32-bit */
> -      cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4);
> -      cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2);
> +      stl_phys(SH7750_BCR1, 1<<3); /* cs3 SDRAM */
> +      stw_phys(SH7750_BCR2, 3<<(3*2)); /* cs3 32bit */
>  
>        kernel_size = load_image(kernel_filename, phys_ram_base);
>  
> -- 
> 1.5.6.3
> 
> 
> 
> 

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

      reply	other threads:[~2009-01-24 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 16:23 [Qemu-devel] [PATCH] SH: r2d pci support takasi-y
2008-12-07 19:21 ` andrzej zaborowski
2008-12-14 17:52   ` [Qemu-devel] [PATCH] sh4: r2d. Endian conversion for peripheral register initialization takasi-y
2009-01-24 18:20     ` Aurelien Jarno [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=20090124182053.GA14335@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=takasi-y@ops.dti.ne.jp \
    /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).