linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/11] tty: amba-pl011: add register lookup table
Date: Fri, 6 Nov 2015 00:24:11 +0000	[thread overview]
Message-ID: <20151106002410.GR8644@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <563BED88.3040101@codeaurora.org>

On Thu, Nov 05, 2015 at 06:00:08PM -0600, Timur Tabi wrote:
> On 11/03/2015 08:51 AM, Russell King wrote:
> >  enum {
> >-	REG_DR = UART01x_DR,
> >-	REG_ST_DMAWM = ST_UART011_DMAWM,
> >-	REG_ST_TIMEOUT = ST_UART011_TIMEOUT,
> >-	REG_FR = UART01x_FR,
> >-	REG_ST_LCRH_RX = ST_UART011_LCRH_RX,
> >-	REG_IBRD = UART011_IBRD,
> >-	REG_FBRD = UART011_FBRD,
> >-	REG_LCRH = UART011_LCRH,
> >-	REG_ST_LCRH_TX = ST_UART011_LCRH_TX,
> >-	REG_CR = UART011_CR,
> >-	REG_IFLS = UART011_IFLS,
> >-	REG_IMSC = UART011_IMSC,
> >-	REG_RIS = UART011_RIS,
> >-	REG_MIS = UART011_MIS,
> >-	REG_ICR = UART011_ICR,
> >-	REG_DMACR = UART011_DMACR,
> >-	REG_ST_XFCR = ST_UART011_XFCR,
> >-	REG_ST_XON1 = ST_UART011_XON1,
> >-	REG_ST_XON2 = ST_UART011_XON2,
> >-	REG_ST_XOFF1 = ST_UART011_XOFF1,
> >-	REG_ST_XOFF2 = ST_UART011_XOFF2,
> >-	REG_ST_ITCR = ST_UART011_ITCR,
> >-	REG_ST_ITIP = ST_UART011_ITIP,
> >-	REG_ST_ABCR = ST_UART011_ABCR,
> >-	REG_ST_ABIMSC = ST_UART011_ABIMSC,
> >+	REG_DR,
> >+	REG_ST_DMAWM,
> >+	REG_ST_TIMEOUT,
> >+	REG_FR,
> >+	REG_ST_LCRH_RX,
> >+	REG_IBRD,
> >+	REG_FBRD,
> >+	REG_LCRH,
> >+	REG_ST_LCRH_TX,
> >+	REG_CR,
> >+	REG_IFLS,
> >+	REG_IMSC,
> >+	REG_RIS,
> >+	REG_MIS,
> >+	REG_ICR,
> >+	REG_DMACR,
> >+	REG_ST_XFCR,
> >+	REG_ST_XON1,
> >+	REG_ST_XON2,
> >+	REG_ST_XOFF1,
> >+	REG_ST_XOFF2,
> >+	REG_ST_ITCR,
> >+	REG_ST_ITIP,
> >+	REG_ST_ABCR,
> >+	REG_ST_ABIMSC,
> >+
> >+	/* The size of the array - must be last */
> >+	REG_ARRAY_SIZE,
> >  };
> 
> This breaks early console because REG_DR and REG_FR are now enums instead of
> an actual register offset, and so
> 
> static void pl011_putc(struct uart_port *port, int c)
> {
> 	while (readl(port->membase + REG_FR) & UART01x_FR_TXFF)
> 		;
> 	writeb(c, port->membase + REG_DR);
> 	while (readl(port->membase + REG_FR) & UART01x_FR_BUSY)
> 		;
> }
> 
> is wrong.  I get alignment violations because REG_FR is equal to 3 instead
> of 0x18.

I know, and I said as much on the 3rd November in my reply to you that
this change should be undone, and again earlier today in reply to Linus.

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-11-06  0:24 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02 12:24 [PATCH DRAFT 0/2] Sketch for ZTE ZX296702 UART integration Andre Przywara
2015-11-02 12:24 ` [PATCH DRAFT 1/2] drivers: serial: PL011: refactor register access Andre Przywara
2015-11-02 13:27   ` Timur Tabi
2015-11-02 13:40     ` Andre Przywara
2015-11-02 13:44       ` Timur Tabi
2015-11-02 12:24 ` [PATCH DRAFT 2/2] drivers: serial: PL011: [DRAFT] implement register diverson for ZTE UART Andre Przywara
2015-11-03 13:46   ` Russell King - ARM Linux
2015-11-03 13:57     ` Andre Przywara
2015-11-05  9:54     ` Jun Nie
2015-11-03 14:23   ` Russell King - ARM Linux
2015-11-03 14:30     ` Andre Przywara
2015-11-03 13:43 ` [PATCH DRAFT 0/2] Sketch for ZTE ZX296702 UART integration Russell King - ARM Linux
2015-11-03 14:48   ` Russell King - ARM Linux
2015-11-03 14:50   ` [PATCH 01/11] tty: amba-pl011: add register accessor functions Russell King
2015-11-03 14:53     ` Timur Tabi
2015-11-03 15:18       ` Russell King - ARM Linux
2015-11-03 14:51   ` [PATCH 02/11] tty: amba-pl011: convert accessor functions to take uart_amba_port Russell King
2015-11-03 14:51   ` [PATCH 03/11] tty: amba-pl011: add helper to detect split LCRH register Russell King
2015-11-03 14:51   ` [PATCH 04/11] tty: amba-pl011: prepare REG_* register indexes Russell King
2015-11-03 14:51   ` [PATCH 05/11] tty: amba-pl011: add register lookup table Russell King
2015-11-06  0:00     ` Timur Tabi
2015-11-06  0:24       ` Russell King - ARM Linux [this message]
2015-11-06  0:27         ` Timur Tabi
2015-12-13  6:03     ` Greg Kroah-Hartman
2015-11-03 14:51   ` [PATCH 06/11] tty: amba-pl011: add register offset table to vendor data Russell King
2015-11-03 14:51   ` [PATCH 07/11] tty: amba-pl011: add ST register offset table Russell King
2015-11-03 14:51   ` [PATCH 08/11] tty: amba-pl011: clean up LCR register offsets Russell King
2015-11-03 14:51   ` [PATCH 09/11] tty: amba-pl011: remove ST micro registers from standard table Russell King
2015-11-03 14:51   ` [PATCH 10/11] tty: amba-pl011: add support for 32-bit register access Russell King
2015-11-03 14:57     ` Timur Tabi
2015-11-03 16:19       ` Russell King - ARM Linux
2015-11-05  4:46         ` Peter Hurley
2015-11-03 14:51   ` [PATCH 11/11] tty: amba-pl011: add support for ZTE UART (EXPERIMENTAL) Russell King
2015-11-05  8:28     ` Linus Walleij
2015-11-05  9:27       ` Russell King - ARM Linux
2015-11-05  9:54         ` Linus Walleij

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=20151106002410.GR8644@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).