Revert "serial: 8250: dma: Allow driver operations before starting DMA transfers"
This reverts commit ad7fd9f652 which is
commit e4fb03fe10c5e7a5d9aef7cefe815253274fb9ee upstream.
It breaks the Android GKI kernel abi, and is not needed for Android
devices, so revert it for now. If it is needed for this branch, it can
come back later in an ABI-stable way.
Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id5501ecc2d1bdb34c06ab436f7a9d0dd9537b7e2
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
struct uart_8250_dma {
|
||||
int (*tx_dma)(struct uart_8250_port *p);
|
||||
int (*rx_dma)(struct uart_8250_port *p);
|
||||
void (*prepare_tx_dma)(struct uart_8250_port *p);
|
||||
void (*prepare_rx_dma)(struct uart_8250_port *p);
|
||||
|
||||
/* Filter function */
|
||||
dma_filter_fn fn;
|
||||
@@ -333,22 +331,6 @@ extern int serial8250_rx_dma(struct uart_8250_port *);
|
||||
extern void serial8250_rx_dma_flush(struct uart_8250_port *);
|
||||
extern int serial8250_request_dma(struct uart_8250_port *);
|
||||
extern void serial8250_release_dma(struct uart_8250_port *);
|
||||
|
||||
static inline void serial8250_do_prepare_tx_dma(struct uart_8250_port *p)
|
||||
{
|
||||
struct uart_8250_dma *dma = p->dma;
|
||||
|
||||
if (dma->prepare_tx_dma)
|
||||
dma->prepare_tx_dma(p);
|
||||
}
|
||||
|
||||
static inline void serial8250_do_prepare_rx_dma(struct uart_8250_port *p)
|
||||
{
|
||||
struct uart_8250_dma *dma = p->dma;
|
||||
|
||||
if (dma->prepare_rx_dma)
|
||||
dma->prepare_rx_dma(p);
|
||||
}
|
||||
#else
|
||||
static inline int serial8250_tx_dma(struct uart_8250_port *p)
|
||||
{
|
||||
|
||||
@@ -86,8 +86,6 @@ int serial8250_tx_dma(struct uart_8250_port *p)
|
||||
|
||||
dma->tx_size = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
|
||||
|
||||
serial8250_do_prepare_tx_dma(p);
|
||||
|
||||
desc = dmaengine_prep_slave_single(dma->txchan,
|
||||
dma->tx_addr + xmit->tail,
|
||||
dma->tx_size, DMA_MEM_TO_DEV,
|
||||
@@ -125,8 +123,6 @@ int serial8250_rx_dma(struct uart_8250_port *p)
|
||||
if (dma->rx_running)
|
||||
return 0;
|
||||
|
||||
serial8250_do_prepare_rx_dma(p);
|
||||
|
||||
desc = dmaengine_prep_slave_single(dma->rxchan, dma->rx_addr,
|
||||
dma->rx_size, DMA_DEV_TO_MEM,
|
||||
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
|
||||
|
||||
Reference in New Issue
Block a user