qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Thomas Huth <huth@tuxfamily.org>,
	Sarah Harris <S.E.Harris@kent.ac.uk>,
	Michael Rolnik <mrolnik@gmail.com>,
	Heecheol Yang <heecheol.yang@outlook.com>
Subject: Re: [PATCH 03/11] hw/avr: Add limited support for avr gpio registers
Date: Sat, 13 Mar 2021 13:55:27 -0600	[thread overview]
Message-ID: <b5a4c759-8b19-2f25-c5b4-ad523aa5152d@linaro.org> (raw)
In-Reply-To: <20210313165445.2113938-4-f4bug@amsat.org>

On 3/13/21 10:54 AM, Philippe Mathieu-Daudé wrote:
> +#define AVR_GPIO_COUNT 8
> +
> +struct AVRGPIOState {
> +    /*< private >*/
> +    SysBusDevice parent_obj;
> +
> +    /*< public >*/
> +    MemoryRegion mmio;
> +
> +    struct {
> +        uint8_t pin;
> +        uint8_t ddr;
> +        uint8_t port;
> +    } reg;
> +
> +    /* PORTx data changed IRQs */
> +    qemu_irq out[8u];

AVR_GPIO_COUNT?

Can we drop all the useless 'u' suffixes from all over?

> +    gpio->reg.pin = 0u;
> +    gpio->reg.ddr = 0u;
> +    gpio->reg.port = 0u;
...
> +        uint8_t cur_port_pin_val = cur_port_val & 0x01u;
> +        uint8_t cur_ddr_pin_val = cur_ddr_val & 0x01u;
> +        uint8_t new_port_pin_val = value & 0x01u;
...
> +        cur_port_val >>= 1u;
> +        cur_ddr_val >>= 1u;
> +        value >>= 1u;

etc.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2021-03-13 20:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13 16:54 [PATCH 00/11] AVR patch queue for QEMU 6.0 Philippe Mathieu-Daudé
2021-03-13 16:54 ` [PATCH 01/11] hw/misc/led: Add yellow LED Philippe Mathieu-Daudé
2021-03-13 19:51   ` Richard Henderson
2021-03-13 16:54 ` [PATCH 02/11] hw/avr/arduino: List board schematic links Philippe Mathieu-Daudé
2021-03-13 19:51   ` Richard Henderson
2021-03-13 16:54 ` [PATCH 03/11] hw/avr: Add limited support for avr gpio registers Philippe Mathieu-Daudé
2021-03-13 19:55   ` Richard Henderson [this message]
2021-03-14 10:26   ` Mark Cave-Ayland
2021-03-14 23:41     ` Philippe Mathieu-Daudé
2021-03-15 13:15   ` Sarah Harris
2021-03-13 16:54 ` [PATCH 04/11] hw/gpio/avr_gpio: Add migration VMstate Philippe Mathieu-Daudé
2021-03-13 19:57   ` Richard Henderson
2021-03-13 16:54 ` [PATCH 05/11] hw/gpio/avr_gpio: Add 'id' field in AVRGPIOState Philippe Mathieu-Daudé
2021-03-13 19:58   ` Richard Henderson
2021-03-13 16:54 ` [PATCH 06/11] hw/gpio/avr_gpio: Simplify avr_gpio_write_port using extract32() Philippe Mathieu-Daudé
2021-03-13 19:59   ` Richard Henderson
2021-03-13 16:54 ` [PATCH 07/11] hw/gpio/avr_gpio: Add tracing for reads and writes Philippe Mathieu-Daudé
2021-03-13 17:21   ` Niteesh G. S.
2021-03-23  2:42     ` Niteesh G. S.
2021-03-23  8:39       ` Philippe Mathieu-Daudé
2021-03-13 16:54 ` [PATCH 08/11] hw/avr/arduino: Add D13 LED Philippe Mathieu-Daudé
2021-03-13 17:02   ` Niteesh G. S.
2021-03-13 17:21     ` Niteesh G. S.
2021-03-13 16:54 ` [PATCH 09/11] hw/avr/arduino: Replace magic number by gpio_port_index() call Philippe Mathieu-Daudé
2021-03-13 20:02   ` Richard Henderson
2021-03-13 22:20     ` Philippe Mathieu-Daudé
2021-03-13 16:54 ` [PATCH 10/11] target/avr: Fix some comment spelling errors Philippe Mathieu-Daudé
2021-03-13 16:54 ` [PATCH 11/11] target/avr: Fix interrupt execution Philippe Mathieu-Daudé
2021-03-13 22:16 ` [PATCH 00/11] AVR patch queue for QEMU 6.0 Michael Rolnik
2021-03-14 23:42 ` Philippe Mathieu-Daudé

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=b5a4c759-8b19-2f25-c5b4-ad523aa5152d@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=S.E.Harris@kent.ac.uk \
    --cc=f4bug@amsat.org \
    --cc=heecheol.yang@outlook.com \
    --cc=huth@tuxfamily.org \
    --cc=mrolnik@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).