qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/1] hw: aspeed_gpio: Fix pin I/O type declarations


From: pdel
Subject: [PATCH 0/1] hw: aspeed_gpio: Fix pin I/O type declarations
Date: Mon, 27 Sep 2021 20:24:55 -0700

From: Peter Delevoryas <pdel@fb.com>

In the Aspeed chips, the GPIO pins are mostly labeled in groups of 8,
but some of the groups only have 4 elements. Also, most pins have input
and output capabilities, but some are strictly input or strictly output
pins. We have some arrays that describe the I/O capabilities of each pin
for each chip.

A few of the declarations for the AST2500 and AST2600 in aspeed_gpio.c
don't seem to match the datasheet, probably because of confusion over
the association between big-endian uint32 literals (right-to-left) and
the array of group labels (left-to-right). I checked the AST2400 too,
but it was correct and didn't need any changes.

We might want to consider replacing the u32's with u8's and putting them
together into a u32 programmatically, or perhaps implicitly performing a
big-endian to little-endian conversion, something to make it easier to
read.

Peter Delevoryas (1):
  hw: aspeed_gpio: Fix pin I/O type declarations

 hw/gpio/aspeed_gpio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.30.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]