From: Will Deacon <will.deacon@arm.com>
To: Yinbo Zhu <yinbo.zhu@nxp.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
linux-kernel@vger.kernel.org, xiaobo.xie@nxp.com,
ran.wang_1@nxp.com, linux-arm-kernel@lists.infradead.org,
Rajesh Bhagat <rajesh.bhagat@nxp.com>
Subject: Re: [PATCH v1] arch: arm64: add ARM64 specific fucntions required for ehci fsl driver
Date: Thu, 15 Nov 2018 17:48:03 +0000 [thread overview]
Message-ID: <20181115174802.GB3087@brain-police> (raw)
In-Reply-To: <20181115092357.1556-1-yinbo.zhu@nxp.com>
On Thu, Nov 15, 2018 at 05:23:57PM +0800, Yinbo Zhu wrote:
> From: Rajesh Bhagat <rajesh.bhagat@nxp.com>
>
> Add set/clear bits functions for ARM platform which are used by ehci fsl
> driver
>
> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
> arch/arm64/include/asm/io.h | 29 +++++++++++++++++++++++++++++
> 1 files changed, 29 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
> index e97b861..0dc4334 100644
> --- a/arch/arm64/include/asm/io.h
> +++ b/arch/arm64/include/asm/io.h
> @@ -185,6 +185,35 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
> #define iowrite32be(v,p) ({ __iowmb(); __raw_writel((__force __u32)cpu_to_be32(v), p); })
> #define iowrite64be(v,p) ({ __iowmb(); __raw_writeq((__force __u64)cpu_to_be64(v), p); })
>
> +/* access ports */
> +#define setbits32(_addr, _v) iowrite32be(ioread32be(_addr) | (_v), (_addr))
> +#define clrbits32(_addr, _v) iowrite32be(ioread32be(_addr) & ~(_v), (_addr))
> +
> +#define setbits16(_addr, _v) iowrite16be(ioread16be(_addr) | (_v), (_addr))
> +#define clrbits16(_addr, _v) iowrite16be(ioread16be(_addr) & ~(_v), (_addr))
> +
> +#define setbits8(_addr, _v) iowrite8(ioread8(_addr) | (_v), (_addr))
> +#define clrbits8(_addr, _v) iowrite8(ioread8(_addr) & ~(_v), (_addr))
Why isn't this defined in the driver? Adding it to the arch-code leads to
duplication of the definitions and encourages other drivers to start using
this weird interface.
So no, I don't want this in the arch code.
Will
prev parent reply other threads:[~2018-11-15 17:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 9:23 [PATCH v1] arch: arm64: add ARM64 specific fucntions required for ehci fsl driver Yinbo Zhu
2018-11-15 17:48 ` Will Deacon [this message]
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=20181115174802.GB3087@brain-police \
--to=will.deacon@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rajesh.bhagat@nxp.com \
--cc=ran.wang_1@nxp.com \
--cc=xiaobo.xie@nxp.com \
--cc=yinbo.zhu@nxp.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).