aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/include/mach/ssp.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-08 14:38:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-08 14:38:42 -0400
commit49b75b87ce2dfbd99e59a50c3681b154d07e3a22 (patch)
treef14e1da19a13d87a512f9043c2f37fd75dd122b3 /arch/arm/mach-pxa/include/mach/ssp.h
parentf1c7f79b6ab4f7ada002a0fae47f462ede6b6857 (diff)
parent097d9eb537ff4d88b74c3fe67392e27c478ca3c5 (diff)
Merge branch 'for-linus-merged' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus-merged' of master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 5177/1: arm/mach-sa1100/Makefile: remove CONFIG_SA1100_USB [ARM] 5166/1: magician: add MAINTAINERS entry [ARM] fix pnx4008 build errors [ARM] Fix SMP booting with non-zero PHYS_OFFSET [ARM] 5185/1: Fix spi num_chipselect for lubbock [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach [ARM] Add support for arch/arm/mach-*/include and arch/arm/plat-*/include [ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead [ARM] Eliminate useless includes of asm/mach-types.h [ARM] Fix circular include dependency with IRQ headers avr32: Use <mach/foo.h> instead of <asm/arch/foo.h> avr32: Introduce arch/avr32/mach-*/include/mach avr32: Move include/asm-avr32 to arch/avr32/include/asm [ARM] sa1100_wdt: use reset_status to remember watchdog reset status [ARM] pxa: introduce reset_status and clear_reset_status for driver's usage [ARM] pxa: introduce reset.h for reset specific header information
Diffstat (limited to 'arch/arm/mach-pxa/include/mach/ssp.h')
-rw-r--r--arch/arm/mach-pxa/include/mach/ssp.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/include/mach/ssp.h b/arch/arm/mach-pxa/include/mach/ssp.h
new file mode 100644
index 000000000000..a012882c9ee6
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/ssp.h
@@ -0,0 +1,83 @@
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 * PXA3xx SSP1, SSP2, SSP3, SSP4
17 */
18
19#ifndef __ASM_ARCH_SSP_H
20#define __ASM_ARCH_SSP_H
21
22#include <linux/list.h>
23
24enum 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
31struct 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};
47
48/*
49 * SSP initialisation flags
50 */
51#define SSP_NO_IRQ 0x1 /* don't register an irq handler in SSP driver */
52
53struct ssp_state {
54 u32 cr0;
55 u32 cr1;
56 u32 to;
57 u32 psp;
58};
59
60struct ssp_dev {
61 struct ssp_device *ssp;
62 u32 port;
63 u32 mode;
64 u32 flags;
65 u32 psp_flags;
66 u32 speed;
67 int irq;
68};
69
70int ssp_write_word(struct ssp_dev *dev, u32 data);
71int ssp_read_word(struct ssp_dev *dev, u32 *data);
72int ssp_flush(struct ssp_dev *dev);
73void ssp_enable(struct ssp_dev *dev);
74void ssp_disable(struct ssp_dev *dev);
75void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp);
76void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp);
77int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags);
78int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed);
79void ssp_exit(struct ssp_dev *dev);
80
81struct ssp_device *ssp_request(int port, const char *label);
82void ssp_free(struct ssp_device *);
83#endif /* __ASM_ARCH_SSP_H */