From: Bin Liu <b-liu@ti.com>
To: min.guo@mediatek.com
Cc: Rob Herring <robh+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Rutland <mark.rutland@arm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Alan Stern <stern@rowland.harvard.edu>,
chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, tony@atomide.com,
hdegoede@redhat.com
Subject: Re: [PATCH v4 5/6] usb: musb: Add musb_clearb/w() interface
Date: Mon, 21 Jan 2019 09:59:29 -0600 [thread overview]
Message-ID: <20190121155929.GC30080@uda0271908> (raw)
In-Reply-To: <1548073351-13739-6-git-send-email-min.guo@mediatek.com>
Hi Min,
On Mon, Jan 21, 2019 at 08:22:30PM +0800, min.guo@mediatek.com wrote:
> From: Min Guo <min.guo@mediatek.com>
>
> Delete the const attribute of addr parameter in readb/w/l hooks, these
> changes are for implementing clearing W1C registers.
> Replace musb_readb/w with musb_clearb/w to clear the interrupt status.
>
> Signed-off-by: Min Guo <min.guo@mediatek.com>
> ---
> new patch based on v3:
> ---
> drivers/usb/musb/musb_core.c | 32 +++++++++++++++++++++++---------
> drivers/usb/musb/musb_core.h | 8 ++++++--
> drivers/usb/musb/musb_io.h | 8 +++++---
> drivers/usb/musb/musbhsdma.c | 3 +++
> drivers/usb/musb/sunxi.c | 4 ++--
> drivers/usb/musb/tusb6010.c | 2 +-
> 6 files changed, 40 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 2fe5225..5ef8848 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
[snip]
> diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
> index b2394a7..7bf91cb 100644
> --- a/drivers/usb/musb/musbhsdma.c
> +++ b/drivers/usb/musb/musbhsdma.c
> @@ -286,6 +286,9 @@ irqreturn_t dma_controller_irq(int irq, void *private_data)
>
> int_hsdma = musb_readb(mbase, MUSB_HSDMA_INTR);
>
> + /* clear pending interrupts by manual */
> + musb_clearb(musb->mregs, MUSB_HSDMA_INTR);
> +
Make musb_clearb/w() return the value of the _read() instead of
_write(), so that we don't have to read twice here. The value of
_write() is not used anyway.
The change above can be:
int_hsdma = musb_clearb(mbase, MUSB_HSDMA_INTR);
Please see my comments in 6/6 for details.
Regards,
-Bin.
WARNING: multiple messages have this Message-ID (diff)
From: Bin Liu <b-liu@ti.com>
To: min.guo@mediatek.com
Cc: Rob Herring <robh+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Rutland <mark.rutland@arm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Alan Stern <stern@rowland.harvard.edu>,
chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, tony@atomide.com,
hdegoede@redhat.com
Subject: [v4,5/6] usb: musb: Add musb_clearb/w() interface
Date: Mon, 21 Jan 2019 09:59:29 -0600 [thread overview]
Message-ID: <20190121155929.GC30080@uda0271908> (raw)
Hi Min,
On Mon, Jan 21, 2019 at 08:22:30PM +0800, min.guo@mediatek.com wrote:
> From: Min Guo <min.guo@mediatek.com>
>
> Delete the const attribute of addr parameter in readb/w/l hooks, these
> changes are for implementing clearing W1C registers.
> Replace musb_readb/w with musb_clearb/w to clear the interrupt status.
>
> Signed-off-by: Min Guo <min.guo@mediatek.com>
> ---
> new patch based on v3:
> ---
> drivers/usb/musb/musb_core.c | 32 +++++++++++++++++++++++---------
> drivers/usb/musb/musb_core.h | 8 ++++++--
> drivers/usb/musb/musb_io.h | 8 +++++---
> drivers/usb/musb/musbhsdma.c | 3 +++
> drivers/usb/musb/sunxi.c | 4 ++--
> drivers/usb/musb/tusb6010.c | 2 +-
> 6 files changed, 40 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 2fe5225..5ef8848 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
[snip]
> diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
> index b2394a7..7bf91cb 100644
> --- a/drivers/usb/musb/musbhsdma.c
> +++ b/drivers/usb/musb/musbhsdma.c
> @@ -286,6 +286,9 @@ irqreturn_t dma_controller_irq(int irq, void *private_data)
>
> int_hsdma = musb_readb(mbase, MUSB_HSDMA_INTR);
>
> + /* clear pending interrupts by manual */
> + musb_clearb(musb->mregs, MUSB_HSDMA_INTR);
> +
Make musb_clearb/w() return the value of the _read() instead of
_write(), so that we don't have to read twice here. The value of
_write() is not used anyway.
The change above can be:
int_hsdma = musb_clearb(mbase, MUSB_HSDMA_INTR);
Please see my comments in 6/6 for details.
Regards,
-Bin.
WARNING: multiple messages have this Message-ID (diff)
From: Bin Liu <b-liu@ti.com>
To: <min.guo@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, hdegoede@redhat.com,
tony@atomide.com, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Matthias Brugger <matthias.bgg@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
chunfeng.yun@mediatek.com, linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 5/6] usb: musb: Add musb_clearb/w() interface
Date: Mon, 21 Jan 2019 09:59:29 -0600 [thread overview]
Message-ID: <20190121155929.GC30080@uda0271908> (raw)
In-Reply-To: <1548073351-13739-6-git-send-email-min.guo@mediatek.com>
Hi Min,
On Mon, Jan 21, 2019 at 08:22:30PM +0800, min.guo@mediatek.com wrote:
> From: Min Guo <min.guo@mediatek.com>
>
> Delete the const attribute of addr parameter in readb/w/l hooks, these
> changes are for implementing clearing W1C registers.
> Replace musb_readb/w with musb_clearb/w to clear the interrupt status.
>
> Signed-off-by: Min Guo <min.guo@mediatek.com>
> ---
> new patch based on v3:
> ---
> drivers/usb/musb/musb_core.c | 32 +++++++++++++++++++++++---------
> drivers/usb/musb/musb_core.h | 8 ++++++--
> drivers/usb/musb/musb_io.h | 8 +++++---
> drivers/usb/musb/musbhsdma.c | 3 +++
> drivers/usb/musb/sunxi.c | 4 ++--
> drivers/usb/musb/tusb6010.c | 2 +-
> 6 files changed, 40 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 2fe5225..5ef8848 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
[snip]
> diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
> index b2394a7..7bf91cb 100644
> --- a/drivers/usb/musb/musbhsdma.c
> +++ b/drivers/usb/musb/musbhsdma.c
> @@ -286,6 +286,9 @@ irqreturn_t dma_controller_irq(int irq, void *private_data)
>
> int_hsdma = musb_readb(mbase, MUSB_HSDMA_INTR);
>
> + /* clear pending interrupts by manual */
> + musb_clearb(musb->mregs, MUSB_HSDMA_INTR);
> +
Make musb_clearb/w() return the value of the _read() instead of
_write(), so that we don't have to read twice here. The value of
_write() is not used anyway.
The change above can be:
int_hsdma = musb_clearb(mbase, MUSB_HSDMA_INTR);
Please see my comments in 6/6 for details.
Regards,
-Bin.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Bin Liu <b-liu@ti.com>
To: <min.guo@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mark Rutland <mark.rutland@arm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Alan Stern <stern@rowland.harvard.edu>,
<chunfeng.yun@mediatek.com>, <linux-usb@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <tony@atomide.com>,
<hdegoede@redhat.com>
Subject: Re: [PATCH v4 5/6] usb: musb: Add musb_clearb/w() interface
Date: Mon, 21 Jan 2019 09:59:29 -0600 [thread overview]
Message-ID: <20190121155929.GC30080@uda0271908> (raw)
In-Reply-To: <1548073351-13739-6-git-send-email-min.guo@mediatek.com>
Hi Min,
On Mon, Jan 21, 2019 at 08:22:30PM +0800, min.guo@mediatek.com wrote:
> From: Min Guo <min.guo@mediatek.com>
>
> Delete the const attribute of addr parameter in readb/w/l hooks, these
> changes are for implementing clearing W1C registers.
> Replace musb_readb/w with musb_clearb/w to clear the interrupt status.
>
> Signed-off-by: Min Guo <min.guo@mediatek.com>
> ---
> new patch based on v3:
> ---
> drivers/usb/musb/musb_core.c | 32 +++++++++++++++++++++++---------
> drivers/usb/musb/musb_core.h | 8 ++++++--
> drivers/usb/musb/musb_io.h | 8 +++++---
> drivers/usb/musb/musbhsdma.c | 3 +++
> drivers/usb/musb/sunxi.c | 4 ++--
> drivers/usb/musb/tusb6010.c | 2 +-
> 6 files changed, 40 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 2fe5225..5ef8848 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
[snip]
> diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
> index b2394a7..7bf91cb 100644
> --- a/drivers/usb/musb/musbhsdma.c
> +++ b/drivers/usb/musb/musbhsdma.c
> @@ -286,6 +286,9 @@ irqreturn_t dma_controller_irq(int irq, void *private_data)
>
> int_hsdma = musb_readb(mbase, MUSB_HSDMA_INTR);
>
> + /* clear pending interrupts by manual */
> + musb_clearb(musb->mregs, MUSB_HSDMA_INTR);
> +
Make musb_clearb/w() return the value of the _read() instead of
_write(), so that we don't have to read twice here. The value of
_write() is not used anyway.
The change above can be:
int_hsdma = musb_clearb(mbase, MUSB_HSDMA_INTR);
Please see my comments in 6/6 for details.
Regards,
-Bin.
next prev parent reply other threads:[~2019-01-21 15:59 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 12:22 [PATCH v4 0/6] Add MediaTek MUSB Controller Driver min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` [PATCH v4 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` [v4,1/6] " min.guo
2019-01-21 15:14 ` [PATCH v4 1/6] " Rob Herring
2019-01-21 15:14 ` Rob Herring
2019-01-21 15:14 ` [v4,1/6] " Rob Herring
2019-01-22 9:36 ` [PATCH v4 1/6] " Min Guo
2019-01-22 9:36 ` Min Guo
2019-01-22 9:36 ` Min Guo
2019-01-22 9:36 ` [v4,1/6] " min.guo
2019-01-22 14:33 ` [PATCH v4 1/6] " Bin Liu
2019-01-22 14:33 ` Bin Liu
2019-01-22 14:33 ` Bin Liu
2019-01-22 14:33 ` [v4,1/6] " Bin Liu
2019-01-25 2:07 ` [PATCH v4 1/6] " Min Guo
2019-01-25 2:07 ` Min Guo
2019-01-25 2:07 ` Min Guo
2019-01-25 2:07 ` [v4,1/6] " min.guo
2019-02-14 8:30 ` [PATCH v4 1/6] " Min Guo
2019-02-14 8:30 ` Min Guo
2019-02-14 8:30 ` Min Guo
2019-02-14 8:30 ` [v4,1/6] " min.guo
2019-01-21 12:22 ` [PATCH v4 2/6] arm: dts: mt2701: Add usb2 device nodes min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` [v4,2/6] " min.guo
2019-01-21 12:22 ` [PATCH v4 3/6] usb: musb: Add get/set toggle hooks min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` [v4,3/6] " min.guo
2019-01-21 12:22 ` [PATCH v4 4/6] usb: musb: Add noirq type of dma create interface min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` [v4,4/6] " min.guo
2019-01-21 12:22 ` [PATCH v4 5/6] usb: musb: Add musb_clearb/w() interface min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` [v4,5/6] " min.guo
2019-01-21 15:59 ` Bin Liu [this message]
2019-01-21 15:59 ` [PATCH v4 5/6] " Bin Liu
2019-01-21 15:59 ` Bin Liu
2019-01-21 15:59 ` [v4,5/6] " Bin Liu
2019-01-22 1:43 ` [PATCH v4 5/6] " Min Guo
2019-01-22 1:43 ` Min Guo
2019-01-22 1:43 ` Min Guo
2019-01-22 1:43 ` [v4,5/6] " min.guo
2019-01-21 12:22 ` [PATCH v4 6/6] usb: musb: Add support for MediaTek musb controller min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` min.guo
2019-01-21 12:22 ` [v4,6/6] " min.guo
2019-01-21 16:07 ` [PATCH v4 6/6] " Bin Liu
2019-01-21 16:07 ` Bin Liu
2019-01-21 16:07 ` Bin Liu
2019-01-21 16:07 ` [v4,6/6] " Bin Liu
2019-01-22 1:45 ` [PATCH v4 6/6] " Min Guo
2019-01-22 1:45 ` Min Guo
2019-01-22 1:45 ` Min Guo
2019-01-22 1:45 ` [v4,6/6] " min.guo
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=20190121155929.GC30080@uda0271908 \
--to=b-liu@ti.com \
--cc=chunfeng.yun@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=min.guo@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.