diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-04-27 22:23:06 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-10 09:18:40 +0200 |
commit | 8f9ef2d9ab22f4d9e1047661994bc608e98fd467 (patch) | |
tree | fb98e012ce03f8e36f639271172a917b904d162e /include/io.h | |
parent | 01c1a0e8088da6ca464cfc0950669222a246d5a0 (diff) | |
download | barebox-8f9ef2d9ab22f4d9e1047661994bc608e98fd467.tar.gz |
gpio: generic: sync with upstream Linux gpio-mmio driver
The gpio-mmio driver in Linux v5.12 has evolved quite a bit since the
last sync. It now supports big endian byte order, 64-bit registers as
well as controllers that have both a dirin and dirout register.
The latter is particularly interesting, because it's required for the
SiFive GPIO controller ported in a later patch.
This commit also touches gpio-mpc8xxx used on the LS1046A.
Because bit and byte endianness can now be configured separately,
the driver needs adjustment. We don't seem to support any boards
that have the peripheral as little-endian, but this is fixed by this
commit. Comparing other bgpio_init users with Linux shows no need for
further fixups.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210427202309.32077-9-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/io.h')
-rw-r--r-- | include/io.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/io.h b/include/io.h index 9130020722..79d8b56c4e 100644 --- a/include/io.h +++ b/include/io.h @@ -4,4 +4,6 @@ #include <asm/io.h> +#define IOMEM_ERR_PTR(err) (__force void __iomem *)ERR_PTR(err) + #endif /* __IO_H */ |