linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Songjun Wu <songjun.wu@linux.intel.com>
Cc: hua.ma@linux.intel.com, yixin.zhu@linux.intel.com,
	chuanhua.lei@intel.com,
	Linux MIPS Mailing List <linux-mips@linux-mips.org>,
	qi-ming.wu@intel.com, linux-clk@vger.kernel.org,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	James Hogan <jhogan@kernel.org>, Jiri Slaby <jslaby@suse.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 4/7] tty: serial: lantiq: Always use readl()/writel()
Date: Tue, 12 Jun 2018 11:13:29 +0300	[thread overview]
Message-ID: <CAHp75Vc_EVgfj1MpuA_hKHgy6SiQdU7JQDdtVHfOT1sZ_K-nRQ@mail.gmail.com> (raw)
In-Reply-To: <20180612054034.4969-5-songjun.wu@linux.intel.com>

On Tue, Jun 12, 2018 at 8:40 AM, Songjun Wu <songjun.wu@linux.intel.com> wrote:
> Previous implementation uses platform-dependent functions
> ltq_w32()/ltq_r32() to access registers. Those functions are not
> available for other SoC which uses the same IP.
> Change to OS provided readl()/writel() and readb()/writeb(), so
> that different SoCs can use the same driver.

This patch consists 2 or even 3 ones:
- whitespace shuffling (indentation fixes, blank lines), I dunno if
it's needed at all
- some new registers / bits
- actual switch to readl() / writel()

Please, split.

> +#define asc_w32_mask(clear, set, reg)  \
> +       ({ typeof(reg) reg_ = (reg);    \
> +       writel((readl(reg_) & ~(clear)) | (set), reg_); })

This would be better as a static inline helper, and name is completely
misleading, it doesn't mask the register bits, it _updates_ them.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2018-06-12  8:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12  5:40 [PATCH 0/7] MIPS: intel: add initial support for Intel MIPS SoCs Songjun Wu
2018-06-12  5:40 ` [PATCH 1/7] MIPS: dts: Add aliases node for lantiq danube serial Songjun Wu
2018-06-12 22:24   ` Rob Herring
2018-06-14 10:03   ` Arnd Bergmann
2018-06-18  9:42     ` Wu, Songjun
2018-06-18 10:59       ` Arnd Bergmann
2018-06-19  6:46         ` Wu, Songjun
2018-06-12  5:40 ` [PATCH 2/7] clk: intel: Add clock driver for GRX500 SoC Songjun Wu
2018-06-12 22:37   ` Rob Herring
2018-06-14  8:40     ` yixin zhu
2018-06-14 14:09       ` Rob Herring
2018-06-18 10:05         ` yixin zhu
2018-06-12  5:40 ` [PATCH 3/7] MIPS: intel: Add initial support for Intel MIPS SoCs Songjun Wu
2018-06-12 11:23   ` James Hogan
2018-06-14  9:24     ` yixin zhu
2018-06-12 22:31   ` Rob Herring
2018-06-14  8:01     ` Hua Ma
2018-06-12  5:40 ` [PATCH 4/7] tty: serial: lantiq: Always use readl()/writel() Songjun Wu
2018-06-12  8:13   ` Andy Shevchenko [this message]
2018-06-14  7:05     ` Wu, Songjun
2018-06-14 10:07   ` Arnd Bergmann
2018-06-18  9:39     ` Wu, Songjun
2018-06-18 11:52       ` Arnd Bergmann
2018-06-12  5:40 ` [PATCH 5/7] tty: serial: lantiq: Convert global lock to per device lock Songjun Wu
2018-06-12  5:40 ` [PATCH 6/7] tty: serial: lantiq: Remove unneeded header includes and macros Songjun Wu
2018-06-12  5:40 ` [PATCH 7/7] tty: serial: lantiq: Add CCF support Songjun Wu
2018-06-12  8:07   ` kbuild test robot
2018-06-12 22:39   ` Rob Herring
2018-06-14  6:38     ` Wu, Songjun

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=CAHp75Vc_EVgfj1MpuA_hKHgy6SiQdU7JQDdtVHfOT1sZ_K-nRQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=chuanhua.lei@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hua.ma@linux.intel.com \
    --cc=jhogan@kernel.org \
    --cc=jslaby@suse.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=qi-ming.wu@intel.com \
    --cc=ralf@linux-mips.org \
    --cc=songjun.wu@linux.intel.com \
    --cc=yixin.zhu@linux.intel.com \
    /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).