From: andre.przywara@arm.com (Andre Przywara)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v13 5/5] uart: pl011: Add support to ZTE ZX296702 uart
Date: Mon, 26 Oct 2015 09:59:09 +0000 [thread overview]
Message-ID: <562DF96D.6020307@arm.com> (raw)
In-Reply-To: <562AFBD5.3050508@codeaurora.org>
Hi,
On 24/10/15 04:32, Timur Tabi wrote:
> Jun Nie wrote:
>> I am OK to add a new driver for ZTE UART if no other's objection
>> though I do not agree you. Without this last patch, other patches are
>> just for minor refactor for register access.
>
> In that case, my vote is to drop the whole patchset. Just copy/paste
> the amba-pl011 driver and make whatever changes you need. That sort of
> thing happens all the time.
I don't agree here. The driver _is_ very similar (all the semantics and
behaviour), it's just the register addresses that are different.
In so far I'd go with that approach of supporting it within the PL011
driver - whether this has to be in this very same file is another
question. I think by using register accessors (avoiding direct calls to
writel/readl in the code) we can hide a lot of these differences in just
two functions.
Also, as I said earlier, I guess we don't need all those #ifdefs.
So in the end the driver wouldn't be too different, it's just that those
diffs that look a bit scary (because they touch every readl/writel).
I tried to refactor the driver lately to split up SBSA and PL011 support
and got something that compiles, though I wasn't fully satisfied and I
ran out of time. The refactor idea was to split driver runtime from
initialization, so the different probe and init functions can be moved
into separate files. There would be one stub file with all the core
driver logic (DMA, IRQ handling, buffer handling, communication
parameters setup) and one file for each subtype (PL011, SBSA, ZTE, you
name it).
If people are interested, I can try to clean this up and post it as an RFC.
Cheers,
Andre.
next prev parent reply other threads:[~2015-10-26 9:59 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1438328959-16177-1-git-send-email-jun.nie@linaro.org>
[not found] ` <1438328959-16177-3-git-send-email-jun.nie@linaro.org>
2015-09-18 10:51 ` [PATCH v13 2/5] uart: pl011: Introduce register accessor Andre Przywara
2015-09-19 6:46 ` Jun Nie
2015-09-19 21:45 ` Andre Przywara
2015-10-22 23:36 ` Timur Tabi
2015-10-28 14:22 ` Peter Hurley
2015-10-28 14:51 ` Timur Tabi
2015-10-28 15:08 ` Peter Hurley
[not found] ` <1438328959-16177-5-git-send-email-jun.nie@linaro.org>
2015-09-18 10:58 ` [PATCH v13 4/5] uart: pl011: Improve LCRH register access decision Andre Przywara
[not found] ` <1438328959-16177-6-git-send-email-jun.nie@linaro.org>
2015-09-18 13:50 ` [PATCH v13 5/5] uart: pl011: Add support to ZTE ZX296702 uart Andre Przywara
2015-09-18 13:59 ` Russell King - ARM Linux
2015-09-19 6:47 ` Jun Nie
2015-09-19 6:54 ` Jun Nie
2015-10-23 21:54 ` Timur Tabi
2015-10-24 3:23 ` Jun Nie
2015-10-24 3:32 ` Timur Tabi
2015-10-26 1:27 ` Jun Nie
2015-10-27 13:31 ` Peter Hurley
2015-10-26 9:59 ` Andre Przywara [this message]
2015-10-26 12:46 ` Timur Tabi
2015-10-26 14:00 ` Andre Przywara
2015-10-26 14:07 ` Timur Tabi
2015-10-26 14:42 ` Andre Przywara
2015-10-26 14:47 ` Timur Tabi
2015-10-26 15:19 ` Andre Przywara
2015-10-26 15:31 ` Timur Tabi
2015-10-27 22:54 ` Timur Tabi
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=562DF96D.6020307@arm.com \
--to=andre.przywara@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).