[coreboot-gerrit] Patch set updated for coreboot: 2acf670 broadcom/cygnus: Fix missing writel->write32 transformation
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Tue Apr 21 10:44:37 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9852
-gerrit
commit 2acf6702b93130c83f13c5cf3380d8b980bd1fd9
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Tue Apr 21 09:28:39 2015 +0200
broadcom/cygnus: Fix missing writel->write32 transformation
cygnus' serial driver wasn't part of the tree when the
big transformation was done, so follow up.
Change-Id: Ic1a53bea9bcaf1e568b50b9c2ad7782e65e36328
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
src/soc/broadcom/cygnus/ns16550.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/soc/broadcom/cygnus/ns16550.c b/src/soc/broadcom/cygnus/ns16550.c
index d1ef843..3005ad2 100644
--- a/src/soc/broadcom/cygnus/ns16550.c
+++ b/src/soc/broadcom/cygnus/ns16550.c
@@ -50,39 +50,39 @@ static void ns16550_init(void)
{
int baud_divisor = calc_divisor();
- while (!(readl(®s->lsr) & UART_LSR_TEMT))
+ while (!(read32(®s->lsr) & UART_LSR_TEMT))
;
- writel(0, ®s->ier);
- writel(UART_LCR_BKSE | UART_LCR_8N1, ®s->lcr);
- writel(0, ®s->dll);
- writel(0, ®s->dlm);
- writel(UART_LCR_8N1, ®s->lcr);
- writel(UART_MCR_DTR | UART_MCR_RTS, ®s->mcr);
+ write32(®s->ier, 0);
+ write32(®s->lcr, UART_LCR_BKSE | UART_LCR_8N1);
+ write32(®s->dll, 0);
+ write32(®s->dlm, 0);
+ write32(®s->lcr, UART_LCR_8N1);
+ write32(®s->mcr, UART_MCR_DTR | UART_MCR_RTS);
/* clear & enable FIFOs */
- writel(UART_FCR_FIFO_EN | UART_FCR_RXSR | UART_FCR_TXSR, ®s->fcr);
- writel(UART_LCR_BKSE | UART_LCR_8N1, ®s->lcr);
- writel(baud_divisor & 0xff, ®s->dll);
- writel((baud_divisor >> 8) & 0xff, ®s->dlm);
- writel(UART_LCR_8N1, ®s->lcr);
+ write32(®s->fcr, UART_FCR_FIFO_EN | UART_FCR_RXSR | UART_FCR_TXSR);
+ write32(®s->lcr, UART_LCR_BKSE | UART_LCR_8N1);
+ write32(®s->dll, baud_divisor & 0xff);
+ write32(®s->dlm, (baud_divisor >> 8) & 0xff);
+ write32(®s->lcr, UART_LCR_8N1);
}
static void ns16550_tx_byte(unsigned char data)
{
- while ((readl(®s->lsr) & UART_LSR_THRE) == 0)
+ while ((read32(®s->lsr) & UART_LSR_THRE) == 0)
;
- writel(data, ®s->thr);
+ write32(®s->thr, data);
}
static void ns16550_tx_flush(void)
{
- while (!(readl(®s->lsr) & UART_LSR_TEMT))
+ while (!(read32(®s->lsr) & UART_LSR_TEMT))
;
}
static int ns16550_tst_byte(void)
{
- return (readl(®s->lsr) & UART_LSR_DR) != 0;
+ return (read32(®s->lsr) & UART_LSR_DR) != 0;
}
static unsigned char ns16550_rx_byte(void)
@@ -91,7 +91,7 @@ static unsigned char ns16550_rx_byte(void)
while (i-- && !ns16550_tst_byte())
udelay(1);
if (i)
- return readl(®s->rbr);
+ return read32(®s->rbr);
else
return 0x0;
}
More information about the coreboot-gerrit
mailing list