aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2010-02-08 22:10:10 -0500
committerEric Miao <eric.y.miao@gmail.com>2010-03-01 18:40:52 -0500
commita056bef45529810183f56944dcea8b4e297c2dc3 (patch)
tree31155e0d6d746fbb2272e109a2d5790e03f0d1c5
parent98acdbe4cf83f5a2e21c7aac830146b5d6da9282 (diff)
[ARM] pxa: introduce PXA_SSP_LEGACY for legacy SSP API
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/mach-pxa/Kconfig6
-rw-r--r--arch/arm/mach-pxa/include/mach/ssp.h2
-rw-r--r--arch/arm/mach-pxa/ssp.c5
-rw-r--r--sound/soc/pxa/Kconfig1
4 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 3602c729b89a..38fbd0a0e402 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -458,6 +458,7 @@ config SHARPSL_PM
458config CORGI_SSP_DEPRECATED 458config CORGI_SSP_DEPRECATED
459 bool 459 bool
460 select PXA_SSP 460 select PXA_SSP
461 select PXA_SSP_LEGACY
461 help 462 help
462 This option will include corgi_ssp.c and corgi_lcd.c 463 This option will include corgi_ssp.c and corgi_lcd.c
463 that corgi_ts.c and other legacy drivers (corgi_bl.c 464 that corgi_ts.c and other legacy drivers (corgi_bl.c
@@ -658,6 +659,11 @@ config PXA_SSP
658 help 659 help
659 Enable support for PXA2xx SSP ports 660 Enable support for PXA2xx SSP ports
660 661
662config PXA_SSP_LEGACY
663 bool
664 help
665 Support of legacy SSP API
666
661config TOSA_BT 667config TOSA_BT
662 tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" 668 tristate "Control the state of built-in bluetooth chip on Sharp SL-6000"
663 depends on MACH_TOSA 669 depends on MACH_TOSA
diff --git a/arch/arm/mach-pxa/include/mach/ssp.h b/arch/arm/mach-pxa/include/mach/ssp.h
index cb5cb766f0f1..be1be5b6db51 100644
--- a/arch/arm/mach-pxa/include/mach/ssp.h
+++ b/arch/arm/mach-pxa/include/mach/ssp.h
@@ -46,6 +46,7 @@ struct ssp_device {
46 int drcmr_tx; 46 int drcmr_tx;
47}; 47};
48 48
49#ifdef CONFIG_PXA_SSP_LEGACY
49/* 50/*
50 * SSP initialisation flags 51 * SSP initialisation flags
51 */ 52 */
@@ -78,6 +79,7 @@ void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp);
78int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags); 79int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags);
79int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); 80int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed);
80void ssp_exit(struct ssp_dev *dev); 81void ssp_exit(struct ssp_dev *dev);
82#endif /* CONFIG_PXA_SSP_LEGACY */
81 83
82/** 84/**
83 * ssp_write_reg - Write to a SSP register 85 * ssp_write_reg - Write to a SSP register
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
index 9ebe658590fa..a81d6dbf662d 100644
--- a/arch/arm/mach-pxa/ssp.c
+++ b/arch/arm/mach-pxa/ssp.c
@@ -35,6 +35,8 @@
35#include <mach/ssp.h> 35#include <mach/ssp.h>
36#include <mach/regs-ssp.h> 36#include <mach/regs-ssp.h>
37 37
38#ifdef CONFIG_PXA_SSP_LEGACY
39
38#define TIMEOUT 100000 40#define TIMEOUT 100000
39 41
40static irqreturn_t ssp_interrupt(int irq, void *dev_id) 42static irqreturn_t ssp_interrupt(int irq, void *dev_id)
@@ -303,6 +305,7 @@ void ssp_exit(struct ssp_dev *dev)
303 clk_disable(ssp->clk); 305 clk_disable(ssp->clk);
304 ssp_free(ssp); 306 ssp_free(ssp);
305} 307}
308#endif /* CONFIG_PXA_SSP_LEGACY */
306 309
307static DEFINE_MUTEX(ssp_lock); 310static DEFINE_MUTEX(ssp_lock);
308static LIST_HEAD(ssp_list); 311static LIST_HEAD(ssp_list);
@@ -488,6 +491,7 @@ static void __exit pxa_ssp_exit(void)
488arch_initcall(pxa_ssp_init); 491arch_initcall(pxa_ssp_init);
489module_exit(pxa_ssp_exit); 492module_exit(pxa_ssp_exit);
490 493
494#ifdef CONFIG_PXA_SSP_LEGACY
491EXPORT_SYMBOL(ssp_write_word); 495EXPORT_SYMBOL(ssp_write_word);
492EXPORT_SYMBOL(ssp_read_word); 496EXPORT_SYMBOL(ssp_read_word);
493EXPORT_SYMBOL(ssp_flush); 497EXPORT_SYMBOL(ssp_flush);
@@ -498,6 +502,7 @@ EXPORT_SYMBOL(ssp_restore_state);
498EXPORT_SYMBOL(ssp_init); 502EXPORT_SYMBOL(ssp_init);
499EXPORT_SYMBOL(ssp_exit); 503EXPORT_SYMBOL(ssp_exit);
500EXPORT_SYMBOL(ssp_config); 504EXPORT_SYMBOL(ssp_config);
505#endif
501 506
502MODULE_DESCRIPTION("PXA SSP driver"); 507MODULE_DESCRIPTION("PXA SSP driver");
503MODULE_AUTHOR("Liam Girdwood"); 508MODULE_AUTHOR("Liam Girdwood");
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index 376e14a9c273..89de27578416 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -23,6 +23,7 @@ config SND_PXA2XX_SOC_I2S
23 23
24config SND_PXA_SOC_SSP 24config SND_PXA_SOC_SSP
25 tristate 25 tristate
26 select PXA_SSP_LEGACY
26 27
27config SND_PXA2XX_SOC_CORGI 28config SND_PXA2XX_SOC_CORGI
28 tristate "SoC Audio support for Sharp Zaurus SL-C7x0" 29 tristate "SoC Audio support for Sharp Zaurus SL-C7x0"