diff mbox

[2/4] ARM: gpio: tegra: Maintain endianness

Message ID 1420817231-8346-3-git-send-email-bob.mottram@codethink.co.uk
State Deferred
Headers show

Commit Message

Bob Mottram Jan. 9, 2015, 3:27 p.m. UTC
Replace the _raw-writel with writel_relaxed to fix issue with
running tegra in big-endian. Tested on Jetson TK1.

Signed-off-by: Bob Mottram <bob.mottram@codethink.co.uk>
---
 drivers/gpio/gpio-tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dmitry Osipenko Jan. 27, 2015, 6:41 p.m. UTC | #1
09.01.2015 18:27, Bob Mottram пишет:
> Replace the _raw-writel with writel_relaxed to fix issue with
> running tegra in big-endian. Tested on Jetson TK1.
>
> Signed-off-by: Bob Mottram <bob.mottram@codethink.co.uk>
> ---
>   drivers/gpio/gpio-tegra.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index 1741981..a83e140 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -85,12 +85,12 @@ static struct tegra_gpio_bank *tegra_gpio_banks;
>
>   static inline void tegra_gpio_writel(u32 val, u32 reg)
>   {
> -	__raw_writel(val, regs + reg);
> +	writel_relaxed(val, regs + reg);
>   }
>
>   static inline u32 tegra_gpio_readl(u32 reg)
>   {
> -	return __raw_readl(regs + reg);
> +	return readl_relaxed(regs + reg);
>   }
>
>   static int tegra_gpio_compose(int bank, int port, int bit)
> --
> 2.1.0
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Thierry Reding March 11, 2015, 9:43 a.m. UTC | #2
On Fri, Jan 09, 2015 at 03:27:09PM +0000, Bob Mottram wrote:
> Replace the _raw-writel with writel_relaxed to fix issue with
> running tegra in big-endian. Tested on Jetson TK1.
> 
> Signed-off-by: Bob Mottram <bob.mottram@codethink.co.uk>
> ---
>  drivers/gpio/gpio-tegra.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Linus, Alex,

would you prefer to take this through the GPIO tree or shall I take it
into the Tegra tree along with the rest of this series. In case of the
former:

Acked-by: Thierry Reding <treding@nvidia.com>

I see that the patch wasn't Cc'ed to linux-gpio or Linus so, for
reference, here's a link to it in patchwork:

	http://patchwork.ozlabs.org/patch/427142/

I'm also quoting the entire patch below for your reference.

Thierry

> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index 1741981..a83e140 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -85,12 +85,12 @@ static struct tegra_gpio_bank *tegra_gpio_banks;
> 
>  static inline void tegra_gpio_writel(u32 val, u32 reg)
>  {
> -	__raw_writel(val, regs + reg);
> +	writel_relaxed(val, regs + reg);
>  }
> 
>  static inline u32 tegra_gpio_readl(u32 reg)
>  {
> -	return __raw_readl(regs + reg);
> +	return readl_relaxed(regs + reg);
>  }
> 
>  static int tegra_gpio_compose(int bank, int port, int bit)
> --
> 2.1.0
Alexandre Courbot March 11, 2015, 9:46 a.m. UTC | #3
On Wed, Mar 11, 2015 at 6:43 PM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> On Fri, Jan 09, 2015 at 03:27:09PM +0000, Bob Mottram wrote:
>> Replace the _raw-writel with writel_relaxed to fix issue with
>> running tegra in big-endian. Tested on Jetson TK1.
>>
>> Signed-off-by: Bob Mottram <bob.mottram@codethink.co.uk>
>> ---
>>  drivers/gpio/gpio-tegra.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Linus, Alex,
>
> would you prefer to take this through the GPIO tree or shall I take it
> into the Tegra tree along with the rest of this series. In case of the
> former:
>
> Acked-by: Thierry Reding <treding@nvidia.com>
>
> I see that the patch wasn't Cc'ed to linux-gpio or Linus so, for
> reference, here's a link to it in patchwork:
>
>         http://patchwork.ozlabs.org/patch/427142/

Please take it in the Tegra tree, that way the patches of this series
will appear sequentially in the git log instead of being spread across
various trees without any hint about their relation.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thierry Reding March 11, 2015, 9:55 a.m. UTC | #4
On Wed, Mar 11, 2015 at 06:46:10PM +0900, Alexandre Courbot wrote:
> On Wed, Mar 11, 2015 at 6:43 PM, Thierry Reding
> <thierry.reding@gmail.com> wrote:
> > On Fri, Jan 09, 2015 at 03:27:09PM +0000, Bob Mottram wrote:
> >> Replace the _raw-writel with writel_relaxed to fix issue with
> >> running tegra in big-endian. Tested on Jetson TK1.
> >>
> >> Signed-off-by: Bob Mottram <bob.mottram@codethink.co.uk>
> >> ---
> >>  drivers/gpio/gpio-tegra.c | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Linus, Alex,
> >
> > would you prefer to take this through the GPIO tree or shall I take it
> > into the Tegra tree along with the rest of this series. In case of the
> > former:
> >
> > Acked-by: Thierry Reding <treding@nvidia.com>
> >
> > I see that the patch wasn't Cc'ed to linux-gpio or Linus so, for
> > reference, here's a link to it in patchwork:
> >
> >         http://patchwork.ozlabs.org/patch/427142/
> 
> Please take it in the Tegra tree, that way the patches of this series
> will appear sequentially in the git log instead of being spread across
> various trees without any hint about their relation.

Does that imply an Acked-by from you as GPIO maintainer?

Thierry
Alexandre Courbot March 11, 2015, 9:58 a.m. UTC | #5
On Wed, Mar 11, 2015 at 6:55 PM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> On Wed, Mar 11, 2015 at 06:46:10PM +0900, Alexandre Courbot wrote:
>> On Wed, Mar 11, 2015 at 6:43 PM, Thierry Reding
>> <thierry.reding@gmail.com> wrote:
>> > On Fri, Jan 09, 2015 at 03:27:09PM +0000, Bob Mottram wrote:
>> >> Replace the _raw-writel with writel_relaxed to fix issue with
>> >> running tegra in big-endian. Tested on Jetson TK1.
>> >>
>> >> Signed-off-by: Bob Mottram <bob.mottram@codethink.co.uk>
>> >> ---
>> >>  drivers/gpio/gpio-tegra.c | 4 ++--
>> >>  1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > Linus, Alex,
>> >
>> > would you prefer to take this through the GPIO tree or shall I take it
>> > into the Tegra tree along with the rest of this series. In case of the
>> > former:
>> >
>> > Acked-by: Thierry Reding <treding@nvidia.com>
>> >
>> > I see that the patch wasn't Cc'ed to linux-gpio or Linus so, for
>> > reference, here's a link to it in patchwork:
>> >
>> >         http://patchwork.ozlabs.org/patch/427142/
>>
>> Please take it in the Tegra tree, that way the patches of this series
>> will appear sequentially in the git log instead of being spread across
>> various trees without any hint about their relation.
>
> Does that imply an Acked-by from you as GPIO maintainer?

My bad:

Acked-by: Alexandre Courbot <gnurou@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ben Dooks March 11, 2015, 10:03 a.m. UTC | #6
On 11/03/15 09:58, Alexandre Courbot wrote:
> On Wed, Mar 11, 2015 at 6:55 PM, Thierry Reding
> <thierry.reding@gmail.com> wrote:
>> On Wed, Mar 11, 2015 at 06:46:10PM +0900, Alexandre Courbot wrote:
>>> On Wed, Mar 11, 2015 at 6:43 PM, Thierry Reding
>>> <thierry.reding@gmail.com> wrote:
>>>> On Fri, Jan 09, 2015 at 03:27:09PM +0000, Bob Mottram wrote:
>>>>> Replace the _raw-writel with writel_relaxed to fix issue with
>>>>> running tegra in big-endian. Tested on Jetson TK1.
>>>>>
>>>>> Signed-off-by: Bob Mottram <bob.mottram@codethink.co.uk>
>>>>> ---
>>>>>  drivers/gpio/gpio-tegra.c | 4 ++--
>>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> Linus, Alex,
>>>>
>>>> would you prefer to take this through the GPIO tree or shall I take it
>>>> into the Tegra tree along with the rest of this series. In case of the
>>>> former:
>>>>
>>>> Acked-by: Thierry Reding <treding@nvidia.com>
>>>>
>>>> I see that the patch wasn't Cc'ed to linux-gpio or Linus so, for
>>>> reference, here's a link to it in patchwork:
>>>>
>>>>         http://patchwork.ozlabs.org/patch/427142/
>>>
>>> Please take it in the Tegra tree, that way the patches of this series
>>> will appear sequentially in the git log instead of being spread across
>>> various trees without any hint about their relation.
>>
>> Does that imply an Acked-by from you as GPIO maintainer?
> 
> My bad:
> 
> Acked-by: Alexandre Courbot <gnurou@gmail.com>

Thanks for sorting this out.
Linus Walleij March 18, 2015, 1:36 a.m. UTC | #7
On Wed, Mar 11, 2015 at 10:43 AM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> On Fri, Jan 09, 2015 at 03:27:09PM +0000, Bob Mottram wrote:
>> Replace the _raw-writel with writel_relaxed to fix issue with
>> running tegra in big-endian. Tested on Jetson TK1.
>>
>> Signed-off-by: Bob Mottram <bob.mottram@codethink.co.uk>
>> ---
>>  drivers/gpio/gpio-tegra.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Linus, Alex,
>
> would you prefer to take this through the GPIO tree or shall I take it
> into the Tegra tree along with the rest of this series.

OK take it in the Tegra tree as Alex suggests,
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 1741981..a83e140 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -85,12 +85,12 @@  static struct tegra_gpio_bank *tegra_gpio_banks;

 static inline void tegra_gpio_writel(u32 val, u32 reg)
 {
-	__raw_writel(val, regs + reg);
+	writel_relaxed(val, regs + reg);
 }

 static inline u32 tegra_gpio_readl(u32 reg)
 {
-	return __raw_readl(regs + reg);
+	return readl_relaxed(regs + reg);
 }

 static int tegra_gpio_compose(int bank, int port, int bit)