diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-02-13 20:37:28 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-15 22:00:19 -0500 |
commit | 75c86e7422751c5be3caaf448d802839ec685725 (patch) | |
tree | 9372526aa0722b9d1bac8341025873cb9e545999 /include/asm-powerpc/ps3.h | |
parent | 724339d76d9407cd1a8ad32a9c1fdf64840cc51b (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 'include/asm-powerpc/ps3.h')
-rw-r--r-- | include/asm-powerpc/ps3.h | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index e5982ad46576..a39d92f9022b 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
@@ -355,13 +355,7 @@ extern struct bus_type ps3_system_bus_type; | |||
355 | 355 | ||
356 | /* vuart routines */ | 356 | /* vuart routines */ |
357 | 357 | ||
358 | struct ps3_vuart_stats { | 358 | struct ps3_vuart_port_priv; |
359 | unsigned long bytes_written; | ||
360 | unsigned long bytes_read; | ||
361 | unsigned long tx_interrupts; | ||
362 | unsigned long rx_interrupts; | ||
363 | unsigned long disconnect_interrupts; | ||
364 | }; | ||
365 | 359 | ||
366 | /** | 360 | /** |
367 | * struct ps3_vuart_port_device - a device on a vuart port | 361 | * struct ps3_vuart_port_device - a device on a vuart port |
@@ -370,20 +364,8 @@ struct ps3_vuart_stats { | |||
370 | struct ps3_vuart_port_device { | 364 | struct ps3_vuart_port_device { |
371 | enum ps3_match_id match_id; | 365 | enum ps3_match_id match_id; |
372 | struct device core; | 366 | struct device core; |
367 | struct ps3_vuart_port_priv* priv; /* private driver variables */ | ||
373 | 368 | ||
374 | /* private driver variables */ | ||
375 | unsigned int port_number; | ||
376 | u64 interrupt_mask; | ||
377 | struct { | ||
378 | spinlock_t lock; | ||
379 | struct list_head head; | ||
380 | } tx_list; | ||
381 | struct { | ||
382 | unsigned long bytes_held; | ||
383 | spinlock_t lock; | ||
384 | struct list_head head; | ||
385 | } rx_list; | ||
386 | struct ps3_vuart_stats stats; | ||
387 | }; | 369 | }; |
388 | 370 | ||
389 | int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); | 371 | int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); |