summaryrefslogtreecommitdiffstats
path: root/drivers/ps3/vuart.h
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-02-13 17:37:28 -0800
committerPaul Mackerras <paulus@samba.org>2007-02-16 14:00:19 +1100
commit75c86e7422751c5be3caaf448d802839ec685725 (patch)
tree9372526aa0722b9d1bac8341025873cb9e545999 /drivers/ps3/vuart.h
parent724339d76d9407cd1a8ad32a9c1fdf64840cc51b (diff)
downloadop-kernel-dev-75c86e7422751c5be3caaf448d802839ec685725.zip
op-kernel-dev-75c86e7422751c5be3caaf448d802839ec685725.tar.gz
[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 2cbf728..34b360d 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
*/
OpenPOWER on IntegriCloud