mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 08:56:45 +07:00
imx25: redefine MX25_IO_ADDRESS using IMX_IO_ADDRESS
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Russell King <linux@arm.linux.org.uk>
This commit is contained in:
parent
1273e7686f
commit
df9375fad4
@ -22,21 +22,10 @@
|
||||
#define MX25_GPIO3_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0xa4000)
|
||||
#define MX25_GPIO4_BASE_ADDR_VIRT (MX25_AIPS2_BASE_ADDR_VIRT + 0x9c000)
|
||||
|
||||
#define MX25_AIPS1_IO_ADDRESS(x) \
|
||||
(((x) - MX25_AIPS1_BASE_ADDR) + MX25_AIPS1_BASE_ADDR_VIRT)
|
||||
#define MX25_AIPS2_IO_ADDRESS(x) \
|
||||
(((x) - MX25_AIPS2_BASE_ADDR) + MX25_AIPS2_BASE_ADDR_VIRT)
|
||||
#define MX25_AVIC_IO_ADDRESS(x) \
|
||||
(((x) - MX25_AVIC_BASE_ADDR) + MX25_AVIC_BASE_ADDR_VIRT)
|
||||
|
||||
#define __in_range(addr, name) ((addr) >= name##_BASE_ADDR && (addr) < name##_BASE_ADDR + name##_SIZE)
|
||||
|
||||
#define MX25_IO_ADDRESS(x) \
|
||||
(void __force __iomem *) \
|
||||
(__in_range(x, MX25_AIPS1) ? MX25_AIPS1_IO_ADDRESS(x) : \
|
||||
__in_range(x, MX25_AIPS2) ? MX25_AIPS2_IO_ADDRESS(x) : \
|
||||
__in_range(x, MX25_AVIC) ? MX25_AVIC_IO_ADDRESS(x) : \
|
||||
0xDEADBEEF)
|
||||
#define MX25_IO_ADDRESS(x) ( \
|
||||
IMX_IO_ADDRESS(x, MX25_AIPS1) ?: \
|
||||
IMX_IO_ADDRESS(x, MX25_AIPS2) ?: \
|
||||
IMX_IO_ADDRESS(x, MX25_AVIC))
|
||||
|
||||
#define UART1_BASE_ADDR 0x43f90000
|
||||
#define UART2_BASE_ADDR 0x43f94000
|
||||
|
Loading…
Reference in New Issue
Block a user