Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753333AbbHUKlQ (ORCPT ); Fri, 21 Aug 2015 06:41:16 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:38753 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752922AbbHUKlM convert rfc822-to-8bit (ORCPT ); Fri, 21 Aug 2015 06:41:12 -0400 From: Vineet Gupta To: Noam Camus , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" CC: "gregkh@linuxfoundation.org" , "jslaby@suse.com" , "peter@hurleysoftware.com" , "fransklaver@gmail.com" , "Alexey.Brodkin@synopsys.com" , "Vineet.Gupta1@synopsys.com" Subject: Re: [v4 2/2] serial: 8250_dw: dw8250_setup_port() use endianness aware read. Thread-Topic: [v4 2/2] serial: 8250_dw: dw8250_setup_port() use endianness aware read. Thread-Index: AQHQ2/0qcePUKfs6+UCJPepZWPjChQ== Date: Fri, 21 Aug 2015 10:41:07 +0000 Message-ID: References: <1437886478-29273-1-git-send-email-noamc@ezchip.com> <1440153223-25712-1-git-send-email-noamc@ezchip.com> <1440153223-25712-2-git-send-email-noamc@ezchip.com> <1440153223-25712-3-git-send-email-noamc@ezchip.com> Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.197.191] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1765 Lines: 47 Hi Noam, On Friday 21 August 2015 04:05 PM, Noam Camus wrote: > From: Noam Camus > > readl() for UCV and CPR will not work for port type UPIO_MEM32BE. > Instead we use the serial_in32() accessor which is initialized > properly according to endianness. > > Signed-off-by: Noam Camus > --- > drivers/tty/serial/8250/8250_dw.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c > index f479433..62f766a 100644 > --- a/drivers/tty/serial/8250/8250_dw.c > +++ b/drivers/tty/serial/8250/8250_dw.c > @@ -310,7 +310,8 @@ static bool dw8250_dma_filter(struct dma_chan *chan, void *param) > static void dw8250_setup_port(struct uart_8250_port *up) > { > struct uart_port *p = &up->port; > - u32 reg = readl(p->membase + DW_UART_UCV); > + struct dw8250_data *d = p->private_data; > + u32 reg = d->serial_in(p->membase + DW_UART_UCV); > > /* > * If the Component Version Register returns zero, we know that > @@ -322,7 +323,7 @@ static void dw8250_setup_port(struct uart_8250_port *up) > dev_dbg_ratelimited(p->dev, "Designware UART version %c.%c%c\n", > (reg >> 24) & 0xff, (reg >> 16) & 0xff, (reg >> 8) & 0xff); > > - reg = readl(p->membase + DW_UART_CPR); > + reg = d->serial_in(p->membase + DW_UART_CPR); > if (!reg) > return; > I think this can be folded into the previous patch - I don't see how this logically seperates anything from patch 1/2 -Vineet -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/