Commit c8d1f022 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

serial: atmel: allow compile testing on non-atmel architectures

This commit also fixes compiler warnings and errors seen when building
on x86_64.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent abc7882a
...@@ -115,9 +115,9 @@ config SERIAL_SB1250_DUART_CONSOLE ...@@ -115,9 +115,9 @@ config SERIAL_SB1250_DUART_CONSOLE
config SERIAL_ATMEL config SERIAL_ATMEL
bool "AT91 / AT32 on-chip serial port support" bool "AT91 / AT32 on-chip serial port support"
depends on ARCH_AT91 || AVR32 depends on ARCH_AT91 || AVR32 || COMPILE_TEST
select SERIAL_CORE select SERIAL_CORE
select SERIAL_MCTRL_GPIO select SERIAL_MCTRL_GPIO if GPIOLIB
help help
This enables the driver for the on-chip UARTs of the Atmel This enables the driver for the on-chip UARTs of the Atmel
AT91 and AT32 processors. AT91 and AT32 processors.
......
...@@ -927,7 +927,7 @@ static int atmel_prepare_tx_dma(struct uart_port *port) ...@@ -927,7 +927,7 @@ static int atmel_prepare_tx_dma(struct uart_port *port)
sg_set_page(&atmel_port->sg_tx, sg_set_page(&atmel_port->sg_tx,
virt_to_page(port->state->xmit.buf), virt_to_page(port->state->xmit.buf),
UART_XMIT_SIZE, UART_XMIT_SIZE,
(int)port->state->xmit.buf & ~PAGE_MASK); (unsigned long)port->state->xmit.buf & ~PAGE_MASK);
nent = dma_map_sg(port->dev, nent = dma_map_sg(port->dev,
&atmel_port->sg_tx, &atmel_port->sg_tx,
1, 1,
...@@ -937,10 +937,10 @@ static int atmel_prepare_tx_dma(struct uart_port *port) ...@@ -937,10 +937,10 @@ static int atmel_prepare_tx_dma(struct uart_port *port)
dev_dbg(port->dev, "need to release resource of dma\n"); dev_dbg(port->dev, "need to release resource of dma\n");
goto chan_err; goto chan_err;
} else { } else {
dev_dbg(port->dev, "%s: mapped %d@%p to %x\n", __func__, dev_dbg(port->dev, "%s: mapped %d@%p to %pad\n", __func__,
sg_dma_len(&atmel_port->sg_tx), sg_dma_len(&atmel_port->sg_tx),
port->state->xmit.buf, port->state->xmit.buf,
sg_dma_address(&atmel_port->sg_tx)); &sg_dma_address(&atmel_port->sg_tx));
} }
/* Configure the slave DMA */ /* Configure the slave DMA */
...@@ -1109,7 +1109,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port) ...@@ -1109,7 +1109,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
sg_set_page(&atmel_port->sg_rx, sg_set_page(&atmel_port->sg_rx,
virt_to_page(ring->buf), virt_to_page(ring->buf),
sizeof(struct atmel_uart_char) * ATMEL_SERIAL_RINGSIZE, sizeof(struct atmel_uart_char) * ATMEL_SERIAL_RINGSIZE,
(int)ring->buf & ~PAGE_MASK); (unsigned long)ring->buf & ~PAGE_MASK);
nent = dma_map_sg(port->dev, nent = dma_map_sg(port->dev,
&atmel_port->sg_rx, &atmel_port->sg_rx,
1, 1,
...@@ -1119,10 +1119,10 @@ static int atmel_prepare_rx_dma(struct uart_port *port) ...@@ -1119,10 +1119,10 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
dev_dbg(port->dev, "need to release resource of dma\n"); dev_dbg(port->dev, "need to release resource of dma\n");
goto chan_err; goto chan_err;
} else { } else {
dev_dbg(port->dev, "%s: mapped %d@%p to %x\n", __func__, dev_dbg(port->dev, "%s: mapped %d@%p to %pad\n", __func__,
sg_dma_len(&atmel_port->sg_rx), sg_dma_len(&atmel_port->sg_rx),
ring->buf, ring->buf,
sg_dma_address(&atmel_port->sg_rx)); &sg_dma_address(&atmel_port->sg_rx));
} }
/* Configure the slave DMA */ /* Configure the slave DMA */
......
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