qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] hw: aspeed_gpio: Fix pin I/O type declarations
@ 2021-09-28  3:24 pdel
  2021-09-28  3:24 ` [PATCH 1/1] " pdel
  0 siblings, 1 reply; 6+ messages in thread
From: pdel @ 2021-09-28  3:24 UTC (permalink / raw)
  Cc: clg, joel, rashmica.g, patrick, qemu-devel, f4bug, Peter Delevoryas

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-30 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28  3:24 [PATCH 0/1] hw: aspeed_gpio: Fix pin I/O type declarations pdel
2021-09-28  3:24 ` [PATCH 1/1] " pdel
2021-09-28 10:53   ` Damien Hedde
2021-09-30  0:45     ` Peter Delevoryas
2021-09-30 12:05       ` Rashmica Gupta
2021-09-30 14:09         ` Peter Delevoryas

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).