[POWERPC] PS3: Vuart cleanups
Cleanups for the PS3 vuart driver. - Hide driver private data from external interface with new structure ps3_vuart_port_priv. - Fix masking bug in ps3_vuart_get_interrupt_status(). - Add new helper routine ps3_vuart_clear_rx_bytes() to flush rx buffer. - Add new variable probe_mutex to serialize probe and destroy routines. - Rename some symbols. - Add platform check in ps3_vuart_bus_init(). Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
724339d76d
commit
75c86e7422
@@ -21,6 +21,36 @@
|
||||
#if !defined(_PS3_VUART_H)
|
||||
#define _PS3_VUART_H
|
||||
|
||||
#include <asm/ps3.h>
|
||||
|
||||
struct ps3_vuart_stats {
|
||||
unsigned long bytes_written;
|
||||
unsigned long bytes_read;
|
||||
unsigned long tx_interrupts;
|
||||
unsigned long rx_interrupts;
|
||||
unsigned long disconnect_interrupts;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ps3_vuart_port_priv - private vuart device data.
|
||||
*/
|
||||
|
||||
struct ps3_vuart_port_priv {
|
||||
unsigned int port_number;
|
||||
u64 interrupt_mask;
|
||||
|
||||
struct {
|
||||
spinlock_t lock;
|
||||
struct list_head head;
|
||||
} tx_list;
|
||||
struct {
|
||||
unsigned long bytes_held;
|
||||
spinlock_t lock;
|
||||
struct list_head head;
|
||||
} rx_list;
|
||||
struct ps3_vuart_stats stats;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ps3_vuart_port_driver - a driver for a device on a vuart port
|
||||
*/
|
||||
|
Reference in New Issue
Block a user