Commit 9f25bc51 authored by Russell King's avatar Russell King Committed by Greg Kroah-Hartman

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Reviewed-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7fe9a5a9
This diff is collapsed.
#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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment