qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Colin Leitner <colin.leitner@googlemail.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	Colin Leitner <colin.leitner@googlemail.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] zynq_gpio: GPIO model for Zynq SoC
Date: Wed, 31 Dec 2014 02:03:32 +0100	[thread overview]
Message-ID: <54A34B64.10205@gmail.com> (raw)
In-Reply-To: <CAEgOgz6uOkQ0iraT8gK+8mvf-DZp3yAZOih13tZ7b5zrxZHNvA@mail.gmail.com>

Hi Peter,

thanks for the review! I'll rework the patch ASAP.

> Is it better to just model the GPIO controller as a standalone GPIO,
> and leave the mio vs emio distinction to the SoC/Board level?
> 
> This would mean the bank GPIOs are on the top level entity, and the
> core would then have no EMIO/MIO awareness. This also makes QEMU a
> little less awkward considering there is no sense of MIO and EMIO in
> QEMU to date.

The reason for chosing the MIO/EMIO names was simply for easier mapping
to real hardware where I've been usually confronted with MIO/EMIO.
Changing this to the banks makes sense of course if Xilinx choses to
reuse that IP again.

>> +    /* Outputs float high.  */
>> +    /* FIXME: This is board dependent.  */
> 
> How so? Looks pretty generic to me (not sure what needs fixing here).
> Are you saying that the IO width should truncate based on Zynq
> specifics?

This is a fragment from pl061. If we don't explicitly drive a output
line through the direction register, we assume it floats high. We
still have to drive the qemu IRQ line to some state.

I'll write a better comment.

>> +    zynq_gpio_reset(s);
> 
> Don't reset in init fns. You shuold use a device-reset function ...

Another 1:1 copy from pl061. I'll take the time to read up how the
device model is meant to be implemented correctly.

Thanks again for the review and you'll hear from me shortly.

Regards,
	Colin

  reply	other threads:[~2014-12-31  1:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30 13:13 [Qemu-devel] [PATCH 0/2] GPIO model for Zynq SoC Colin Leitner
2014-12-30 13:13 ` [Qemu-devel] [PATCH 1/2] zynq_gpio: " Colin Leitner
2014-12-30 23:24   ` Peter Crosthwaite
2014-12-31  1:03     ` Colin Leitner [this message]
2014-12-30 13:13 ` [Qemu-devel] [PATCH 2/2] xilinx_zynq: Add zynq_gpio to the machine Colin Leitner
2014-12-31 14:06 ` [Qemu-devel] [PATCH v2 0/2] Reworked Zynq GPIO model Colin Leitner
2014-12-31 14:06   ` [Qemu-devel] [PATCH v2 1/2] zynq_gpio: GPIO model for Zynq SoC Colin Leitner
2014-12-31 14:06   ` [Qemu-devel] [PATCH v2 2/2] xilinx_zynq: Add zynq-gpio to the machine Colin Leitner
2015-01-06 22:26 ` [Qemu-devel] [PATCH v3 0/2] Reworked Zynq GPIO model Colin Leitner
2015-01-06 22:26   ` [Qemu-devel] [PATCH v3 1/2] zynq_gpio: GPIO model for Zynq SoC Colin Leitner
2015-01-20 22:05     ` Peter Crosthwaite
2015-01-06 22:26   ` [Qemu-devel] [PATCH v3 2/2] xilinx_zynq: Add zynq-gpio to the machine Colin Leitner
2015-01-20 22:06     ` Peter Crosthwaite
2015-01-25 19:51   ` [Qemu-devel] [PATCH v4 0/2] Reworked Zynq GPIO model Colin Leitner
2015-01-25 19:51     ` [Qemu-devel] [PATCH v4 1/2] zynq_gpio: GPIO model for Zynq SoC Colin Leitner
2015-01-25 19:51     ` [Qemu-devel] [PATCH v4 2/2] xilinx_zynq: Add zynq-gpio to the machine Colin Leitner
2015-02-10  6:06     ` [Qemu-devel] [PATCH v4 0/2] Reworked Zynq GPIO model Peter Crosthwaite
2015-02-21 17:59       ` Peter Crosthwaite

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=54A34B64.10205@gmail.com \
    --to=colin.leitner@googlemail.com \
    --cc=peter.crosthwaite@xilinx.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).