diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2016-07-08 11:00:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-31 15:24:23 +0200 |
commit | 2426fbc77faef57c80a573303af6543531e2efa3 (patch) | |
tree | c86998c69689e206090d843d04aa6690b2ddd552 /drivers/tty/serial/amba-pl011.c | |
parent | tty: amba-pl011: add .get_fifosize for ZTE device (diff) | |
download | linux-2426fbc77faef57c80a573303af6543531e2efa3.tar.xz linux-2426fbc77faef57c80a573303af6543531e2efa3.zip |
tty: amba-pl011: probe ZTE device from AMBA bus with a pseudo-ID
There is no Peripheral Identification Registers on ZTE PL011 device, so
although the driver amba-pl011 is ready to work for ZTE device, the
device cannot be probed by the driver at all.
With arm,primecell-periphid DT bindings (bindings/arm/primecell.txt) in
place, it should be the cleanest the way to use a pseudo-ID to probe the
device from AMBA bus. We create an unofficial vendor number
AMBA_VENDOR_LINUX, which will practically never become an official
vendor ID, and takes Configuration, Revision number, and Part number as
input to compose a pseudo-ID for ZTE device.
Also, since we start using vendor_zte to probe ZTE device, the
__maybe_unused for vendor_zte is removed.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/amba-pl011.c')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 055fe27e364f..0b78b04e895e 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -209,7 +209,7 @@ static unsigned int get_fifosize_zte(struct amba_device *dev) return 16; } -static struct vendor_data vendor_zte __maybe_unused = { +static struct vendor_data vendor_zte = { .reg_offset = pl011_zte_offsets, .access_32b = true, .ifls = UART011_IFLS_RX4_8|UART011_IFLS_TX4_8, @@ -2652,6 +2652,11 @@ static struct amba_id pl011_ids[] = { .mask = 0x00ffffff, .data = &vendor_st, }, + { + .id = AMBA_LINUX_ID(0x00, 0x1, 0xffe), + .mask = 0x00ffffff, + .data = &vendor_zte, + }, { 0, 0 }, }; |