From: "andrzej zaborowski" <balrogg@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] sh4: mmio based CF support on r2d board.
Date: Mon, 27 Oct 2008 03:29:26 +0200 [thread overview]
Message-ID: <fb249edb0810261829g7b5aac5fw80ddbaf2ddb72bcf@mail.gmail.com> (raw)
In-Reply-To: <f43fc5580810260854q41264525xdaf9199686d9dcb8@mail.gmail.com>
2008/10/26 Blue Swirl <blauwirbel@gmail.com>:
> On 10/26/08, takasi-y@ops.dti.ne.jp <takasi-y@ops.dti.ne.jp> wrote:
>> This patch adds emulation for a CompactFlash on sh4/r2d board.
>> The device is CF, but wired to be worked as True-IDE mode, and connected
>> directly to SH bus.
The CF-ATA code (IBM microdrive) in ide.c should expose a qemu_irq
that toggles between CF and True-IDE mode so that it can be used as
both... but it can be done another time. I hadn't done it originally
because the pin is wired to CF mode in zaurus.
>
> + if(addr & 7)
>
> I'd add a space between if and (.
>
> +static uint32_t mmio_ide_status_read (void *opaque,target_phys_addr_t addr)
>
> Please add a space between the comma after opaque and target_phys_addr_t.
>
>> +void mmio_ide_init (int *mmio, BlockDriverState *hd0, BlockDriverState *hd1,
>> + qemu_irq irq, int shift)
>> +{
>> + MMIOState *s = qemu_mallocz(sizeof(MMIOState));
>> + IDEState *ide = qemu_mallocz(sizeof(IDEState) * 2);
>> + int *io;
>> +
>> + ide_init2(ide, hd0, hd1, irq);
>> +
>> + s->dev = ide;
>> + s->shift = shift;
>> +
>> + mmio[0] = cpu_register_io_memory(0, mmio_ide_reads, mmio_ide_writes, s);
>> + mmio[1] = cpu_register_io_memory(0, mmio_ide_status, mmio_ide_cmd, s);
>> +}
>
> It would be better to make the init function take instead of mmio
> pointer, two target_phys_addr_t parameters and do the physical memory
> registration there.
Why would it be better? This implementation seems more flexible.
Cheers
next prev parent reply other threads:[~2008-10-27 1:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 16:31 [Qemu-devel] [PATCH] sh4: mmio based CF support on r2d board yoshii.takashi
2008-09-22 19:00 ` takasi-y
2008-09-23 8:55 ` Paul Mundt
2008-10-08 15:20 ` pmac kernel & disk image wanted (was Re: [Qemu-devel] [PATCH] sh4: mmio based CF support on r2d board.) Shin-ichiro KAWASAKI
2008-10-26 15:35 ` Andreas Färber
2008-10-26 15:17 ` [Qemu-devel] [PATCH 1/3] sh4: mmio based CF support on r2d board takasi-y
2008-10-26 15:54 ` Blue Swirl
2008-10-27 1:29 ` andrzej zaborowski [this message]
2008-10-27 17:10 ` Blue Swirl
2008-10-29 14:22 ` andrzej zaborowski
2008-10-29 18:37 ` Blue Swirl
2008-10-27 18:57 ` takasi-y
2008-10-27 19:12 ` Blue Swirl
2008-10-28 20:58 ` [Qemu-devel] [PATCH 1/3] take3 " takasi-y
2008-10-26 15:17 ` [Qemu-devel] [PATCH 0/3] take 2. " takasi-y
2008-10-26 15:17 ` [Qemu-devel] [PATCH 2/3] sh4: Add IRL(4bit encoded interrupt input) support takasi-y
2008-10-26 16:09 ` Blue Swirl
2008-10-28 20:58 ` [Qemu-devel] [PATCH 2/3] take3 " takasi-y
2008-10-29 18:09 ` [Qemu-devel] " Blue Swirl
2008-10-30 17:28 ` takasi-y
2008-10-26 15:17 ` [Qemu-devel] [PATCH 3/3] sh4: Add r2d onboard FPGA IRQ controller takasi-y
2008-10-28 20:58 ` [Qemu-devel] [PATCH 3/3] take3 " takasi-y
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=fb249edb0810261829g7b5aac5fw80ddbaf2ddb72bcf@mail.gmail.com \
--to=balrogg@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 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).