[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fb9fe0cd-5ca7-74e6-33dc-7638e205b2e3@cogentembedded.com>
Date: Tue, 16 May 2017 14:15:08 +0300
From: Nikita Yushchenko <nikita.yoush@...entembedded.com>
To: Dong Aisheng <aisheng.dong@....com>, linux-serial@...r.kernel.org
Cc: fugang.duan@....com, dongas86@...il.com,
gregkh@...uxfoundation.org, yangbo.lu@....com,
linux-kernel@...r.kernel.org, stefan@...er.ch, Mingkai.Hu@....com,
jslaby@...e.com, linux-arm-kernel@...ts.infradead.org
Subject: Re: [V2, 2/6] tty: serial: lpuart: add little endian 32 bit register
support
> 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?
Powered by blists - more mailing lists