mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
serial: 8250: Separate legacy irq handling from core port operations
Prepare for 8250 split; decouple irq setup/teardown and handler from core port operations. Introduce setup_irq() and release_irq() 8250 driver methods; the 8250 core will use these methods to install and remove irq handling for the given 8250 port. Refactor irq chain linking/unlinking from 8250 core into univ8250_setup_irq()/univ8250_release_irq() for the universal 8250 driver. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6e28157173
commit
a4416cd1ac
@@ -60,6 +60,20 @@ enum {
|
||||
};
|
||||
|
||||
struct uart_8250_dma;
|
||||
struct uart_8250_port;
|
||||
|
||||
/**
|
||||
* 8250 core driver operations
|
||||
*
|
||||
* @setup_irq() Setup irq handling. The universal 8250 driver links this
|
||||
* port to the irq chain. Other drivers may @request_irq().
|
||||
* @release_irq() Undo irq handling. The universal 8250 driver unlinks
|
||||
* the port from the irq chain.
|
||||
*/
|
||||
struct uart_8250_ops {
|
||||
int (*setup_irq)(struct uart_8250_port *);
|
||||
void (*release_irq)(struct uart_8250_port *);
|
||||
};
|
||||
|
||||
/*
|
||||
* This should be used by drivers which want to register
|
||||
@@ -100,6 +114,7 @@ struct uart_8250_port {
|
||||
unsigned char msr_saved_flags;
|
||||
|
||||
struct uart_8250_dma *dma;
|
||||
const struct uart_8250_ops *ops;
|
||||
|
||||
/* 8250 specific callbacks */
|
||||
int (*dl_read)(struct uart_8250_port *);
|
||||
|
||||
Reference in New Issue
Block a user