Commit 54e155e4 authored by Eric Nelson (Boundary Devices)'s avatar Eric Nelson (Boundary Devices) Committed by Kevin Hilman

ARM: DaVinci: UART: PWREMU_MGMT is a two-byte register

UART_DAVINCI_PWREMU is a 2-byte register, but davinci_serial_outp only
writes a single byte.
Signed-off-by: default avatarEric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
parent 0689f760
...@@ -42,13 +42,20 @@ static inline unsigned int davinci_serial_in(struct plat_serial8250_port *up, ...@@ -42,13 +42,20 @@ static inline unsigned int davinci_serial_in(struct plat_serial8250_port *up,
return (unsigned int)__raw_readb(up->membase + offset); return (unsigned int)__raw_readb(up->membase + offset);
} }
static inline void davinci_serial_outp(struct plat_serial8250_port *p, static inline void davinci_serial_outb(struct plat_serial8250_port *p,
int offset, int value) int offset, int value)
{ {
offset <<= p->regshift; offset <<= p->regshift;
__raw_writeb(value, p->membase + offset); __raw_writeb(value, p->membase + offset);
} }
static inline void davinci_serial_outs(struct plat_serial8250_port *p,
int offset, int value)
{
offset <<= p->regshift;
__raw_writew(value, p->membase + offset);
}
static struct plat_serial8250_port serial_platform_data[] = { static struct plat_serial8250_port serial_platform_data[] = {
{ {
.membase = (char *)IO_ADDRESS(DAVINCI_UART0_BASE), .membase = (char *)IO_ADDRESS(DAVINCI_UART0_BASE),
...@@ -77,14 +84,14 @@ static void __init davinci_serial_reset(struct plat_serial8250_port *p) ...@@ -77,14 +84,14 @@ static void __init davinci_serial_reset(struct plat_serial8250_port *p)
/* reset both transmitter and receiver: bits 14,13 = UTRST, URRST */ /* reset both transmitter and receiver: bits 14,13 = UTRST, URRST */
unsigned int pwremu = 0; unsigned int pwremu = 0;
davinci_serial_outp(p, UART_IER, 0); /* disable all interrupts */ davinci_serial_outb(p, UART_IER, 0); /* disable all interrupts */
davinci_serial_outp(p, UART_DAVINCI_PWREMU, pwremu); davinci_serial_outs(p, UART_DAVINCI_PWREMU, pwremu);
mdelay(10); mdelay(10);
pwremu |= (0x3 << 13); pwremu |= (0x3 << 13);
pwremu |= 0x1; pwremu |= 0x1;
davinci_serial_outp(p, UART_DAVINCI_PWREMU, pwremu); davinci_serial_outs(p, UART_DAVINCI_PWREMU, pwremu);
} }
static int __init davinci_init(void) static int __init davinci_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment