Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * ssp.h |
| 3 | * |
| 4 | * Copyright (C) 2003 Russell King, All Rights Reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | * |
| 10 | * This driver supports the following PXA CPU/SSP ports:- |
| 11 | * |
| 12 | * PXA250 SSP |
| 13 | * PXA255 SSP, NSSP |
| 14 | * PXA26x SSP, NSSP, ASSP |
| 15 | * PXA27x SSP1, SSP2, SSP3 |
| 16 | */ |
| 17 | |
| 18 | #ifndef SSP_H |
| 19 | #define SSP_H |
| 20 | |
Liam Girdwood | b216c01 | 2005-11-10 17:45:39 +0000 | [diff] [blame] | 21 | /* |
| 22 | * SSP initialisation flags |
| 23 | */ |
| 24 | #define SSP_NO_IRQ 0x1 /* don't register an irq handler in SSP driver */ |
| 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | struct ssp_state { |
| 27 | u32 cr0; |
| 28 | u32 cr1; |
| 29 | u32 to; |
| 30 | u32 psp; |
| 31 | }; |
| 32 | |
| 33 | struct ssp_dev { |
| 34 | u32 port; |
| 35 | u32 mode; |
| 36 | u32 flags; |
| 37 | u32 psp_flags; |
| 38 | u32 speed; |
Liam Girdwood | b216c01 | 2005-11-10 17:45:39 +0000 | [diff] [blame] | 39 | int irq; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | }; |
| 41 | |
| 42 | int ssp_write_word(struct ssp_dev *dev, u32 data); |
Paul Sokolovsky | 8f1bf87 | 2006-08-27 12:54:56 +0100 | [diff] [blame^] | 43 | int ssp_read_word(struct ssp_dev *dev, u32 *data); |
| 44 | int ssp_flush(struct ssp_dev *dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | void ssp_enable(struct ssp_dev *dev); |
| 46 | void ssp_disable(struct ssp_dev *dev); |
| 47 | void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp); |
| 48 | void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp); |
Liam Girdwood | b216c01 | 2005-11-10 17:45:39 +0000 | [diff] [blame] | 49 | int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); |
| 51 | void ssp_exit(struct ssp_dev *dev); |
| 52 | |
| 53 | #endif |