diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-11-16 12:40:57 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-13 22:59:48 -0500 |
commit | 7ec758718920e5e5876d0d02ece6855128c8eb1e (patch) | |
tree | ecdc049d7a296b75b1fe7f0da731bf8c875fc8c4 /drivers/tty | |
parent | 84c3e03bdd1146191b7222ed62a08512199a45c7 (diff) |
tty: amba-pl011: add support for ZTE UART (EXPERIMENTAL)
Add (incomplete) support for the ZTE UART to the AMBA PL011 driver.
This is similar to the ARM and ST variants, except it has a different
register address layout, and requires 32-bit accesses to the registers.
Use the newly introduced register tables and access size support to
cope with these differences.
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')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index c8165b61dbf8..295f0be128f9 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c | |||
@@ -171,6 +171,29 @@ static struct vendor_data vendor_st = { | |||
171 | .get_fifosize = get_fifosize_st, | 171 | .get_fifosize = get_fifosize_st, |
172 | }; | 172 | }; |
173 | 173 | ||
174 | static const u16 pl011_zte_offsets[REG_ARRAY_SIZE] = { | ||
175 | [REG_DR] = ZX_UART011_DR, | ||
176 | [REG_FR] = ZX_UART011_FR, | ||
177 | [REG_LCRH_RX] = ZX_UART011_LCRH, | ||
178 | [REG_LCRH_TX] = ZX_UART011_LCRH, | ||
179 | [REG_IBRD] = ZX_UART011_IBRD, | ||
180 | [REG_FBRD] = ZX_UART011_FBRD, | ||
181 | [REG_CR] = ZX_UART011_CR, | ||
182 | [REG_IFLS] = ZX_UART011_IFLS, | ||
183 | [REG_IMSC] = ZX_UART011_IMSC, | ||
184 | [REG_RIS] = ZX_UART011_RIS, | ||
185 | [REG_MIS] = ZX_UART011_MIS, | ||
186 | [REG_ICR] = ZX_UART011_ICR, | ||
187 | [REG_DMACR] = ZX_UART011_DMACR, | ||
188 | }; | ||
189 | |||
190 | static struct vendor_data vendor_zte = { | ||
191 | .reg_offset = pl011_zte_offsets, | ||
192 | .access_32b = true, | ||
193 | .ifls = UART011_IFLS_RX4_8|UART011_IFLS_TX4_8, | ||
194 | .get_fifosize = get_fifosize_arm, | ||
195 | }; | ||
196 | |||
174 | /* Deals with DMA transactions */ | 197 | /* Deals with DMA transactions */ |
175 | 198 | ||
176 | struct pl011_sgbuf { | 199 | struct pl011_sgbuf { |