From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Tawfik Bayouk <tawfik@marvell.com>,
Nadav Haklai <nadavh@marvell.com>,
Lior Amsalem <alior@marvell.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
linux-arm-kernel@lists.infradead.org,
Nicolas Schichan <nschichan@freebox.fr>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/3] bus: mvebu-mbus: do not set WIN_CTRL_SYNCBARRIER on non io-coherent platforms.
Date: Thu, 28 May 2015 11:15:53 +0200 [thread overview]
Message-ID: <5566DCC9.4010800@free-electrons.com> (raw)
In-Reply-To: <1432802414-12355-2-git-send-email-thomas.petazzoni@free-electrons.com>
Hi Thomas,
On 28/05/2015 10:40, Thomas Petazzoni wrote:
> From: Nicolas Schichan <nschichan@freebox.fr>
>
> Commit a0b5cd4ac2d6 ("bus: mvebu-mbus: use automatic I/O
> synchronization barriers") enabled the usage of automatic I/O
> synchronization barriers by enabling bit WIN_CTRL_SYNCBARRIER in the
> control registers of MBus windows, but on non io-coherent platforms
> (orion5x, kirkwood and dove) the WIN_CTRL_SYNCBARRIER bit in
> the window control register is either reserved (all windows except 6
> and 7) or enables read-only protection (windows 6 and 7).
>
> Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: <stable@vger.kernel.org> # v4.0+
> Fixes: a0b5cd4ac2d6 ("bus: mvebu-mbus: use automatic I/O synchronization barriers")
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
applied on mvebu/fixes
Thanks,
Gregory
> ---
> drivers/bus/mvebu-mbus.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
> index fb9ec62..7fa4510 100644
> --- a/drivers/bus/mvebu-mbus.c
> +++ b/drivers/bus/mvebu-mbus.c
> @@ -70,6 +70,7 @@
> */
> #define WIN_CTRL_OFF 0x0000
> #define WIN_CTRL_ENABLE BIT(0)
> +/* Only on HW I/O coherency capable platforms */
> #define WIN_CTRL_SYNCBARRIER BIT(1)
> #define WIN_CTRL_TGT_MASK 0xf0
> #define WIN_CTRL_TGT_SHIFT 4
> @@ -323,8 +324,9 @@ static int mvebu_mbus_setup_window(struct mvebu_mbus_state *mbus,
> ctrl = ((size - 1) & WIN_CTRL_SIZE_MASK) |
> (attr << WIN_CTRL_ATTR_SHIFT) |
> (target << WIN_CTRL_TGT_SHIFT) |
> - WIN_CTRL_SYNCBARRIER |
> WIN_CTRL_ENABLE;
> + if (mbus->hw_io_coherency)
> + ctrl |= WIN_CTRL_SYNCBARRIER;
>
> writel(base & WIN_BASE_LOW, addr + WIN_BASE_OFF);
> writel(ctrl, addr + WIN_CTRL_OFF);
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2015-05-28 9:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1432802414-12355-1-git-send-email-thomas.petazzoni@free-electrons.com>
2015-05-28 8:40 ` [PATCH 1/3] bus: mvebu-mbus: do not set WIN_CTRL_SYNCBARRIER on non io-coherent platforms Thomas Petazzoni
2015-05-28 9:15 ` Gregory CLEMENT [this message]
2015-06-02 7:14 ` Ian Campbell
2015-05-28 8:40 ` [PATCH 2/3] Revert "bus: mvebu-mbus: make sure SDRAM CS for DMA don't overlap the MBus bridge window" Thomas Petazzoni
2015-05-28 8:49 ` Arnd Bergmann
2015-05-28 9:01 ` Thomas Petazzoni
2015-05-28 15:58 ` Greg KH
2015-05-28 9:17 ` Gregory CLEMENT
2015-05-28 15:59 ` Greg KH
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=5566DCC9.4010800@free-electrons.com \
--to=gregory.clement@free-electrons.com \
--cc=alior@marvell.com \
--cc=andrew@lunn.ch \
--cc=boris.brezillon@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=nadavh@marvell.com \
--cc=nschichan@freebox.fr \
--cc=sebastian.hesselbarth@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tawfik@marvell.com \
--cc=thomas.petazzoni@free-electrons.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).