forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform.c
More file actions
86 lines (66 loc) · 1.61 KB
/
platform.c
File metadata and controls
86 lines (66 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2020 Google Inc. All rights reserved.
//
// Author: Curtis Malainey <cujomalainey@chromium.org>
#include <rtos/sof.h>
#include <sof/ipc/driver.h>
#include <rtos/timer.h>
#include <sof/lib/agent.h>
#include <sof/schedule/edf_schedule.h>
#include <sof/schedule/ll_schedule_domain.h>
#include <sof/lib/mailbox.h>
#include <sof/lib/dai.h>
#ifndef __ZEPHYR__
static SHARED_DATA struct timer timer = {};
#endif /* __ZEPHYR__ */
static uint8_t mailbox[MAILBOX_DSPBOX_SIZE +
MAILBOX_HOSTBOX_SIZE +
MAILBOX_EXCEPTION_SIZE +
MAILBOX_DEBUG_SIZE +
MAILBOX_STREAM_SIZE +
MAILBOX_TRACE_SIZE];
uint8_t *get_library_mailbox()
{
return mailbox;
}
static void platform_clock_init(struct sof *sof) {}
int dmac_init(struct sof *sof)
{
return 0;
}
int platform_init(struct sof *sof)
{
#ifndef __ZEPHYR__
sof->platform_timer = &timer;
sof->cpu_timers = &timer;
#endif
platform_clock_init(sof);
scheduler_init_edf();
/* init low latency timer domain and scheduler */
/* sof->platform_timer_domain = */
/* timer_domain_init(sof->platform_timer, PLATFORM_DEFAULT_CLOCK, */
/* CONFIG_SYSTICK_PERIOD); */
/* init the system agent */
sa_init(sof, CONFIG_SYSTICK_PERIOD);
/* init DMACs */
dmac_init(sof);
/* initialise the host IPC mechanisms */
ipc_init(sof);
dai_init(sof);
return 0;
}
int platform_context_save(struct sof *sof)
{
return 0;
}
#ifdef __ZEPHYR__
/* Stubs for unsupported architectures */
/* Platform */
int platform_boot_complete(uint32_t boot_message)
{
return 0;
}
/* Logging */
LOG_MODULE_REGISTER(sof);
#endif