diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-02-14 02:37:28 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-16 04:00:19 +0100 |
commit | 75c86e7422751c5be3caaf448d802839ec685725 (patch) | |
tree | 9372526aa0722b9d1bac8341025873cb9e545999 /drivers/ps3/vuart.h | |
parent | Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa (diff) | |
download | linux-75c86e7422751c5be3caaf448d802839ec685725.tar.xz linux-75c86e7422751c5be3caaf448d802839ec685725.zip |
[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>
Diffstat (limited to 'drivers/ps3/vuart.h')
-rw-r--r-- | drivers/ps3/vuart.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/ps3/vuart.h b/drivers/ps3/vuart.h index 2cbf728a3a0b..34b360da9ff9 100644 --- a/drivers/ps3/vuart.h +++ b/drivers/ps3/vuart.h @@ -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 */ |