diff options
author | eric miao <eric.miao@marvell.com> | 2007-12-06 04:56:42 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-26 10:07:51 -0500 |
commit | 88286450462216ca9b5c67c2175d75a5aebd5d0f (patch) | |
tree | 34e054e52d45813dddc0430298848fdc4302eaca /include | |
parent | d8e0db1111b51558456466f66c9115d71b68e8b9 (diff) |
[ARM] pxa: define "struct ssp_device" and add ssp_request()/ssp_free()
1. define "struct ssp_device" for SSP information, which is requested
and released by function ssp_request()/ssp_free()
2. modify the ssp_init() and ssp_exit() to use the interface
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-pxa/ssp.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/include/asm-arm/arch-pxa/ssp.h b/include/asm-arm/arch-pxa/ssp.h index ea200551a75f..a012882c9ee6 100644 --- a/include/asm-arm/arch-pxa/ssp.h +++ b/include/asm-arm/arch-pxa/ssp.h | |||
@@ -13,10 +13,37 @@ | |||
13 | * PXA255 SSP, NSSP | 13 | * PXA255 SSP, NSSP |
14 | * PXA26x SSP, NSSP, ASSP | 14 | * PXA26x SSP, NSSP, ASSP |
15 | * PXA27x SSP1, SSP2, SSP3 | 15 | * PXA27x SSP1, SSP2, SSP3 |
16 | * PXA3xx SSP1, SSP2, SSP3, SSP4 | ||
16 | */ | 17 | */ |
17 | 18 | ||
18 | #ifndef SSP_H | 19 | #ifndef __ASM_ARCH_SSP_H |
19 | #define SSP_H | 20 | #define __ASM_ARCH_SSP_H |
21 | |||
22 | #include <linux/list.h> | ||
23 | |||
24 | enum pxa_ssp_type { | ||
25 | SSP_UNDEFINED = 0, | ||
26 | PXA25x_SSP, /* pxa 210, 250, 255, 26x */ | ||
27 | PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */ | ||
28 | PXA27x_SSP, | ||
29 | }; | ||
30 | |||
31 | struct ssp_device { | ||
32 | struct platform_device *pdev; | ||
33 | struct list_head node; | ||
34 | |||
35 | struct clk *clk; | ||
36 | void __iomem *mmio_base; | ||
37 | unsigned long phys_base; | ||
38 | |||
39 | const char *label; | ||
40 | int port_id; | ||
41 | int type; | ||
42 | int use_count; | ||
43 | int irq; | ||
44 | int drcmr_rx; | ||
45 | int drcmr_tx; | ||
46 | }; | ||
20 | 47 | ||
21 | /* | 48 | /* |
22 | * SSP initialisation flags | 49 | * SSP initialisation flags |
@@ -31,6 +58,7 @@ struct ssp_state { | |||
31 | }; | 58 | }; |
32 | 59 | ||
33 | struct ssp_dev { | 60 | struct ssp_dev { |
61 | struct ssp_device *ssp; | ||
34 | u32 port; | 62 | u32 port; |
35 | u32 mode; | 63 | u32 mode; |
36 | u32 flags; | 64 | u32 flags; |
@@ -50,4 +78,6 @@ int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags); | |||
50 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); | 78 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); |
51 | void ssp_exit(struct ssp_dev *dev); | 79 | void ssp_exit(struct ssp_dev *dev); |
52 | 80 | ||
53 | #endif | 81 | struct ssp_device *ssp_request(int port, const char *label); |
82 | void ssp_free(struct ssp_device *); | ||
83 | #endif /* __ASM_ARCH_SSP_H */ | ||