[Sound-open-firmware] [PATCH] apollolake: probe all valid SSP ports at platform init
Keyon Jie
yang.jie at linux.intel.com
Mon Jan 29 15:39:25 CET 2018
Add macro for apollolake valid SSP ports, and probe all of them
at platform init.
Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
---
Tested on GP-MRB,
SOF Master: f7beb51118e6e8463a864b9416c773a508930e06,
SOF Tool Master: 59d81995f682876bd34f939332e8838c76f714ec,
https://github.com/plbossart/sound/tree/topic/sof-v4.14:
5a91e6776d41b0e97828882294cdc00b5c0bafd6
src/platform/apollolake/include/platform/platform.h | 2 ++
src/platform/apollolake/platform.c | 14 +++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h
index 4165b95..f7c83e8 100644
--- a/src/platform/apollolake/include/platform/platform.h
+++ b/src/platform/apollolake/include/platform/platform.h
@@ -38,6 +38,8 @@
struct reef;
+#define PLATFORM_SSP_COUNT 6
+
/* Host page size */
#define HOST_PAGE_SIZE 4096
#define PLATFORM_PAGE_TABLE_SIZE 256
diff --git a/src/platform/apollolake/platform.c b/src/platform/apollolake/platform.c
index bb44634..608695a 100644
--- a/src/platform/apollolake/platform.c
+++ b/src/platform/apollolake/platform.c
@@ -178,7 +178,8 @@ int platform_init(struct reef *reef)
{
struct dma *dmac0;
struct dma *dmac1;
- struct dai *ssp2;
+ struct dai *ssp;
+ int i;
platform_interrupt_init();
@@ -244,9 +245,12 @@ int platform_init(struct reef *reef)
/* init SSP ports */
trace_point(TRACE_BOOT_PLATFORM_SSP);
- ssp2 = dai_get(SOF_DAI_INTEL_SSP, 4);
- if (ssp2 == NULL)
- return -ENODEV;
- dai_probe(ssp2);
+ for (i = 0; i < PLATFORM_SSP_COUNT; i++) {
+ ssp = dai_get(SOF_DAI_INTEL_SSP, i);
+ if (!ssp)
+ return -ENODEV;
+ dai_probe(ssp);
+ }
+
return 0;
}
--
2.11.0
More information about the Sound-open-firmware
mailing list