[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfN6=EZ6zBsVojfrXf5kdhBXUjS_HNBkb0gHhVQRPc=OQ@mail.gmail.com>
Date: Wed, 17 May 2017 12:53:32 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Nikita Yushchenko <nikita.yoush@...entembedded.com>
Cc: Dong Aisheng <aisheng.dong@....com>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
fugang.duan@....com, dongas86@...il.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
yangbo.lu@....com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Stefan Agner <stefan@...er.ch>, Mingkai.Hu@....com,
Jiri Slaby <jslaby@...e.com>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support
On Tue, May 16, 2017 at 2:15 PM, Nikita Yushchenko
<nikita.yoush@...entembedded.com> wrote:
>> static u32 lpuart32_read(void __iomem *addr)
>> {
>> - return ioread32be(addr);
>> + return lpuart_is_be ? ioread32be(addr) : readl(addr);
>> }
>>
>> static void lpuart32_write(u32 val, void __iomem *addr)
>> {
>> - iowrite32be(val, addr);
>> + if (lpuart_is_be)
>> + iowrite32be(val, addr);
>> + else
>> + writel(val, addr);
>> }
>
> What if this is ever executed on big endian system?
Above is apparently about bus side of communication and it looks like
it needs to be CPU side. Is this what you are trying to discuss?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists