forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform.h
More file actions
81 lines (58 loc) · 2.04 KB
/
platform.h
File metadata and controls
81 lines (58 loc) · 2.04 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
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2016 Intel Corporation. All rights reserved.
*
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
* Keyon Jie <yang.jie@linux.intel.com>
*/
#ifdef __SOF_PLATFORM_H__
#ifndef __PLATFORM_PLATFORM_H__
#define __PLATFORM_PLATFORM_H__
#include <rtos/wait.h>
#include <rtos/clk.h>
#include <sof/lib/mailbox.h>
#include <stdint.h>
struct ipc_msg;
struct timer;
/*! \def PLATFORM_DEFAULT_CLOCK
* \brief clock source for audio pipeline
*
* There are two types of clock: cpu clock which is a internal clock in
* xtensa core, and ssp clock which is provided by external HW IP.
* The choice depends on HW features on different platform
*/
#define PLATFORM_DEFAULT_CLOCK CLK_CPU(0)
/* Host page size */
#define HOST_PAGE_SIZE 4096
/* Platform stream capabilities */
#define PLATFORM_MAX_CHANNELS 8
#define PLATFORM_MAX_STREAMS 16
/* IPC page data copy timeout */
#define PLATFORM_IPC_DMA_TIMEOUT 2000
/* DSP default delay in cycles */
#define PLATFORM_DEFAULT_DELAY 12
/* local buffer size of DMA tracing */
#define DMA_TRACE_LOCAL_SIZE HOST_PAGE_SIZE
/* trace bytes flushed during panic */
#define DMA_FLUSH_TRACE_SIZE (MAILBOX_TRACE_SIZE >> 2)
/* the interval of DMA trace copying */
#define DMA_TRACE_PERIOD 500000
/*
* the interval of reschedule DMA trace copying in special case like half
* fullness of local DMA trace buffer
*/
#define DMA_TRACE_RESCHEDULE_TIME 100
#define HW_CFG_VERSION 0
static inline void platform_panic(uint32_t p) {}
/**
* \brief Platform specific CPU entering idle.
* May be power-optimized using platform specific capabilities.
* @param level Interrupt level.
*/
static inline void platform_wait_for_interrupt(int level) {}
static inline int ipc_platform_send_msg(const struct ipc_msg *msg) { return 0; }
static inline void ipc_platform_send_msg_direct(const struct ipc_msg *msg) {}
#endif /* __PLATFORM_PLATFORM_H__ */
#else
#error "This file shouldn't be included from outside of sof/platform.h"
#endif /* __SOF_PLATFORM_H__ */