diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-11-03 17:51:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-14 06:59:48 +0300 |
commit | 9f25bc510e960c551dc295c2d1d60e3da334590c (patch) | |
tree | 0249992316d87891b184710d236bfbd71c985b43 /drivers/tty/serial/amba-pl011.h | |
parent | 7fe9a5a9d91f0e9ac65c723665bbdf899c3a4a24 (diff) | |
download | linux-9f25bc510e960c551dc295c2d1d60e3da334590c.tar.xz |
tty: amba-pl011: prepare REG_* register indexes
Prepare for REG_* register accessors. This change involves introducing
pl011_reg_to_offset() to convert REG_* to the hardware register offset,
and converting all call sites to use REG_* names. We need to fix up
locations where we check for equivalence of register offsets as well.
Much of this change was made via these sed expressions:
s/ST_UART01[1x]\(_[^_]*\|_LCRH_[TR]X\)\>/REG_ST\1/
s/UART01[1x]_\(DR\|RSR\|ECR\|FR\|ILPR\|[IF]BRD\|LCRH\|CR\|IFLS\|IMSC\|RIS\|MIS\|ICR\|DMACR\)\>/REG_\1/g
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/amba-pl011.h')
-rw-r--r-- | drivers/tty/serial/amba-pl011.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/tty/serial/amba-pl011.h b/drivers/tty/serial/amba-pl011.h new file mode 100644 index 000000000000..b7eb1bc2fab9 --- /dev/null +++ b/drivers/tty/serial/amba-pl011.h @@ -0,0 +1,32 @@ +#ifndef AMBA_PL011_H +#define AMBA_PL011_H + +enum { + REG_DR = UART01x_DR, + REG_ST_DMAWM = ST_UART011_DMAWM, + REG_ST_TIMEOUT = ST_UART011_TIMEOUT, + REG_FR = UART01x_FR, + REG_ST_LCRH_RX = ST_UART011_LCRH_RX, + REG_IBRD = UART011_IBRD, + REG_FBRD = UART011_FBRD, + REG_LCRH = UART011_LCRH, + REG_ST_LCRH_TX = ST_UART011_LCRH_TX, + REG_CR = UART011_CR, + REG_IFLS = UART011_IFLS, + REG_IMSC = UART011_IMSC, + REG_RIS = UART011_RIS, + REG_MIS = UART011_MIS, + REG_ICR = UART011_ICR, + REG_DMACR = UART011_DMACR, + REG_ST_XFCR = ST_UART011_XFCR, + REG_ST_XON1 = ST_UART011_XON1, + REG_ST_XON2 = ST_UART011_XON2, + REG_ST_XOFF1 = ST_UART011_XOFF1, + REG_ST_XOFF2 = ST_UART011_XOFF2, + REG_ST_ITCR = ST_UART011_ITCR, + REG_ST_ITIP = ST_UART011_ITIP, + REG_ST_ABCR = ST_UART011_ABCR, + REG_ST_ABIMSC = ST_UART011_ABIMSC, +}; + +#endif |