From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Shawn Guo <shawnguo@kernel.org>
Cc: Peter Hurley <peter@hurleysoftware.com>,
Jason Liu <jason.liu@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Timur Tabi <timur@codeaurora.org>,
xie.baoyou@zte.com.cn, Andre Przywara <andre.przywara@arm.com>,
linux-serial@vger.kernel.org, Sudeep Holla <sudeep.holla@arm.com>,
Jun Nie <jun.nie@linaro.org>, Shawn Guo <shawn.guo@linaro.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/3] tty: amba-pl011: define flag register bits for ZTE device
Date: Sat, 17 Sep 2016 10:17:54 +0100 [thread overview]
Message-ID: <20160917091753.GJ1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20160917053753.GG7398@tiger>
On Sat, Sep 17, 2016 at 01:37:53PM +0800, Shawn Guo wrote:
> I still think that's a bad idea. ZTE is not the first one making such
> small customization on PL011, and likely won't be the last one. We
> don't want to clone PL011 driver every time there is a such vendor
> hardware coming out, do we? Having PL011 driver being able to handle
> different register layout is very helpful to handle such vendor
> variants, IMHO.
Well, it's turning out that handling ZTE in PL011 is turning into a
bad idea as well - we keep getting these breakages each time we try.
I think ZTE is sufficiently different from PL011 with the different
register layout _and_ the different bits, _and_ the pain that this
is causing, that it should have been a separate driver.
The only way I can think of dealing with the console issue is to
replicate the console code, once for the PL011 variant and then
again for the ZTE variant. We can't _both_ give them the same names
_and_ register them together - we either have to give them different
names, which makes it confusing because one name won't match the
userspace name for the UART, or we need the driver to detect the
port type early. That's made much more difficult because ZTE didn't
bother with the ID registers, unlike every other vendor.
Serial drivers are not that complex anymore, compared to how they
were back before serial_core happened, so having it as a separate
driver isn't that big a deal.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-09-17 9:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-08 9:00 [PATCH v3 0/3] Complete ZTE PL011 device support Shawn Guo
2016-07-08 9:00 ` [PATCH v3 1/3] tty: amba-pl011: define flag register bits for ZTE device Shawn Guo
2016-09-16 14:23 ` Sudeep Holla
2016-09-16 16:39 ` Russell King - ARM Linux
2016-09-16 17:11 ` Timur Tabi
2016-09-17 5:37 ` Shawn Guo
2016-09-17 9:17 ` Russell King - ARM Linux [this message]
2016-09-17 5:26 ` Shawn Guo
2016-07-08 9:00 ` [PATCH v3 2/3] tty: amba-pl011: add .get_fifosize " Shawn Guo
2016-07-08 9:00 ` [PATCH v3 3/3] tty: amba-pl011: probe ZTE device from AMBA bus with a pseudo-ID Shawn Guo
2016-07-14 13:26 ` [PATCH v3 0/3] Complete ZTE PL011 device support Shawn Guo
2016-07-18 13:35 ` Russell King - ARM Linux
2016-08-09 3:21 ` Shawn Guo
2016-08-09 8:27 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160917091753.GJ1041@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andre.przywara@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jason.liu@linaro.org \
--cc=jun.nie@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=shawn.guo@linaro.org \
--cc=shawnguo@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=timur@codeaurora.org \
--cc=xie.baoyou@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).