diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2010-02-08 22:10:10 -0500 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-03-01 18:40:52 -0500 |
commit | a056bef45529810183f56944dcea8b4e297c2dc3 (patch) | |
tree | 31155e0d6d746fbb2272e109a2d5790e03f0d1c5 | |
parent | 98acdbe4cf83f5a2e21c7aac830146b5d6da9282 (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/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/ssp.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/ssp.c | 5 | ||||
-rw-r--r-- | sound/soc/pxa/Kconfig | 1 |
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 | |||
458 | config CORGI_SSP_DEPRECATED | 458 | config 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 | ||
662 | config PXA_SSP_LEGACY | ||
663 | bool | ||
664 | help | ||
665 | Support of legacy SSP API | ||
666 | |||
661 | config TOSA_BT | 667 | config 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); | |||
78 | int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags); | 79 | int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags); |
79 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); | 80 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); |
80 | void ssp_exit(struct ssp_dev *dev); | 81 | void 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 | ||
40 | static irqreturn_t ssp_interrupt(int irq, void *dev_id) | 42 | static 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 | ||
307 | static DEFINE_MUTEX(ssp_lock); | 310 | static DEFINE_MUTEX(ssp_lock); |
308 | static LIST_HEAD(ssp_list); | 311 | static LIST_HEAD(ssp_list); |
@@ -488,6 +491,7 @@ static void __exit pxa_ssp_exit(void) | |||
488 | arch_initcall(pxa_ssp_init); | 491 | arch_initcall(pxa_ssp_init); |
489 | module_exit(pxa_ssp_exit); | 492 | module_exit(pxa_ssp_exit); |
490 | 493 | ||
494 | #ifdef CONFIG_PXA_SSP_LEGACY | ||
491 | EXPORT_SYMBOL(ssp_write_word); | 495 | EXPORT_SYMBOL(ssp_write_word); |
492 | EXPORT_SYMBOL(ssp_read_word); | 496 | EXPORT_SYMBOL(ssp_read_word); |
493 | EXPORT_SYMBOL(ssp_flush); | 497 | EXPORT_SYMBOL(ssp_flush); |
@@ -498,6 +502,7 @@ EXPORT_SYMBOL(ssp_restore_state); | |||
498 | EXPORT_SYMBOL(ssp_init); | 502 | EXPORT_SYMBOL(ssp_init); |
499 | EXPORT_SYMBOL(ssp_exit); | 503 | EXPORT_SYMBOL(ssp_exit); |
500 | EXPORT_SYMBOL(ssp_config); | 504 | EXPORT_SYMBOL(ssp_config); |
505 | #endif | ||
501 | 506 | ||
502 | MODULE_DESCRIPTION("PXA SSP driver"); | 507 | MODULE_DESCRIPTION("PXA SSP driver"); |
503 | MODULE_AUTHOR("Liam Girdwood"); | 508 | MODULE_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 | ||
24 | config SND_PXA_SOC_SSP | 24 | config SND_PXA_SOC_SSP |
25 | tristate | 25 | tristate |
26 | select PXA_SSP_LEGACY | ||
26 | 27 | ||
27 | config SND_PXA2XX_SOC_CORGI | 28 | config SND_PXA2XX_SOC_CORGI |
28 | tristate "SoC Audio support for Sharp Zaurus SL-C7x0" | 29 | tristate "SoC Audio support for Sharp Zaurus SL-C7x0" |