On Mon, Jul 19, 2021 at 01:24:49PM +0100, Wedson Almeida Filho wrote: > On Fri, Jul 09, 2021 at 12:13:25AM +0200, Linus Walleij wrote: > > I have seen that QEMU has a piece of code for the Arm PrimeCell > > PL061 GPIO block which corresponds to drivers/gpio/gpio-pl061.c > > Note that this hardware apart from being used in all Arm reference > > designs is used on ARMv4T systems that are not supported by > > LLVM but only GCC, which might complicate things. > > Here is a working PL061 driver in Rust (converted form the C one): > https://raw.githubusercontent.com/wedsonaf/linux/pl061/drivers/gpio/gpio_pl061_rust.rs I'm also attaching an html rending of the C and Rust versions side by side where I try to line the definitions up to make it easier to contrast the two implementations.