aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ps3/vuart.h
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-02-13 20:37:28 -0500
committerPaul Mackerras <paulus@samba.org>2007-02-15 22:00:19 -0500
commit75c86e7422751c5be3caaf448d802839ec685725 (patch)
tree9372526aa0722b9d1bac8341025873cb9e545999 /drivers/ps3/vuart.h
parent724339d76d9407cd1a8ad32a9c1fdf64840cc51b (diff)
[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.h30
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 @@
21#if !defined(_PS3_VUART_H) 21#if !defined(_PS3_VUART_H)
22#define _PS3_VUART_H 22#define _PS3_VUART_H
23 23
24#include <asm/ps3.h>
25
26struct ps3_vuart_stats {
27 unsigned long bytes_written;
28 unsigned long bytes_read;
29 unsigned long tx_interrupts;
30 unsigned long rx_interrupts;
31 unsigned long disconnect_interrupts;
32};
33
34/**
35 * struct ps3_vuart_port_priv - private vuart device data.
36 */
37
38struct ps3_vuart_port_priv {
39 unsigned int port_number;
40 u64 interrupt_mask;
41
42 struct {
43 spinlock_t lock;
44 struct list_head head;
45 } tx_list;
46 struct {
47 unsigned long bytes_held;
48 spinlock_t lock;
49 struct list_head head;
50 } rx_list;
51 struct ps3_vuart_stats stats;
52};
53
24/** 54/**
25 * struct ps3_vuart_port_driver - a driver for a device on a vuart port 55 * struct ps3_vuart_port_driver - a driver for a device on a vuart port
26 */ 56 */