mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
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>
This commit is contained in:
parent
9c267ddb41
commit
2426fbc77f
2 changed files with 12 additions and 1 deletions
|
@ -53,8 +53,14 @@ enum amba_vendor {
|
|||
AMBA_VENDOR_ST = 0x80,
|
||||
AMBA_VENDOR_QCOM = 0x51,
|
||||
AMBA_VENDOR_LSI = 0xb6,
|
||||
AMBA_VENDOR_LINUX = 0xfe, /* This value is not official */
|
||||
};
|
||||
|
||||
/* This is used to generate pseudo-ID for AMBA device */
|
||||
#define AMBA_LINUX_ID(conf, rev, part) \
|
||||
(((conf) & 0xff) << 24 | ((rev) & 0xf) << 20 | \
|
||||
AMBA_VENDOR_LINUX << 12 | ((part) & 0xfff))
|
||||
|
||||
extern struct bus_type amba_bustype;
|
||||
|
||||
#define to_amba_device(d) container_of(d, struct amba_device, dev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue