1414#include "topology.h"
1515
1616static int __maybe_unused
17- apl_enable_logs (struct avs_dev * adev , enum avs_log_enable enable , u32 aging_period ,
18- u32 fifo_full_period , unsigned long resource_mask , u32 * priorities )
17+ avs_apl_enable_logs (struct avs_dev * adev , enum avs_log_enable enable , u32 aging_period ,
18+ u32 fifo_full_period , unsigned long resource_mask , u32 * priorities )
1919{
20- struct apl_log_state_info * info ;
20+ struct avs_apl_log_state_info * info ;
2121 u32 size , num_cores = adev -> hw_cfg .dsp_cores ;
2222 int ret , i ;
2323
@@ -48,9 +48,9 @@ apl_enable_logs(struct avs_dev *adev, enum avs_log_enable enable, u32 aging_peri
4848 return 0 ;
4949}
5050
51- static int apl_log_buffer_status (struct avs_dev * adev , union avs_notify_msg * msg )
51+ static int avs_apl_log_buffer_status (struct avs_dev * adev , union avs_notify_msg * msg )
5252{
53- struct apl_log_buffer_layout layout ;
53+ struct avs_apl_log_buffer_layout layout ;
5454 void __iomem * addr , * buf ;
5555
5656 addr = avs_log_buffer_addr (adev , msg -> log .core );
@@ -63,11 +63,11 @@ static int apl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msg
6363 /* consume the logs regardless of consumer presence */
6464 goto update_read_ptr ;
6565
66- buf = apl_log_payload_addr (addr );
66+ buf = avs_apl_log_payload_addr (addr );
6767
6868 if (layout .read_ptr > layout .write_ptr ) {
6969 avs_dump_fw_log (adev , buf + layout .read_ptr ,
70- apl_log_payload_size (adev ) - layout .read_ptr );
70+ avs_apl_log_payload_size (adev ) - layout .read_ptr );
7171 layout .read_ptr = 0 ;
7272 }
7373 avs_dump_fw_log_wakeup (adev , buf + layout .read_ptr , layout .write_ptr - layout .read_ptr );
@@ -77,7 +77,8 @@ static int apl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msg
7777 return 0 ;
7878}
7979
80- static int apl_wait_log_entry (struct avs_dev * adev , u32 core , struct apl_log_buffer_layout * layout )
80+ static int avs_apl_wait_log_entry (struct avs_dev * adev , u32 core ,
81+ struct avs_apl_log_buffer_layout * layout )
8182{
8283 unsigned long timeout ;
8384 void __iomem * addr ;
@@ -99,11 +100,11 @@ static int apl_wait_log_entry(struct avs_dev *adev, u32 core, struct apl_log_buf
99100}
100101
101102/* reads log header and tests its type */
102- #define apl_is_entry_stackdump (addr ) ((readl(addr) >> 30) & 0x1)
103+ #define avs_apl_is_entry_stackdump (addr ) ((readl(addr) >> 30) & 0x1)
103104
104- static int apl_coredump (struct avs_dev * adev , union avs_notify_msg * msg )
105+ static int avs_apl_coredump (struct avs_dev * adev , union avs_notify_msg * msg )
105106{
106- struct apl_log_buffer_layout layout ;
107+ struct avs_apl_log_buffer_layout layout ;
107108 void __iomem * addr , * buf ;
108109 size_t dump_size ;
109110 u16 offset = 0 ;
@@ -124,9 +125,9 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
124125 if (!addr )
125126 goto exit ;
126127
127- buf = apl_log_payload_addr (addr );
128+ buf = avs_apl_log_payload_addr (addr );
128129 memcpy_fromio (& layout , addr , sizeof (layout ));
129- if (!apl_is_entry_stackdump (buf + layout .read_ptr )) {
130+ if (!avs_apl_is_entry_stackdump (buf + layout .read_ptr )) {
130131 union avs_notify_msg lbs_msg = AVS_NOTIFICATION (LOG_BUFFER_STATUS );
131132
132133 /*
@@ -142,11 +143,11 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
142143 do {
143144 u32 count ;
144145
145- if (apl_wait_log_entry (adev , msg -> ext .coredump .core_id , & layout ))
146+ if (avs_apl_wait_log_entry (adev , msg -> ext .coredump .core_id , & layout ))
146147 break ;
147148
148149 if (layout .read_ptr > layout .write_ptr ) {
149- count = apl_log_payload_size (adev ) - layout .read_ptr ;
150+ count = avs_apl_log_payload_size (adev ) - layout .read_ptr ;
150151 memcpy_fromio (pos + offset , buf + layout .read_ptr , count );
151152 layout .read_ptr = 0 ;
152153 offset += count ;
@@ -165,7 +166,7 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)
165166 return 0 ;
166167}
167168
168- static bool apl_lp_streaming (struct avs_dev * adev )
169+ static bool avs_apl_lp_streaming (struct avs_dev * adev )
169170{
170171 struct avs_path * path ;
171172
@@ -201,7 +202,7 @@ static bool apl_lp_streaming(struct avs_dev *adev)
201202 return true;
202203}
203204
204- static bool apl_d0ix_toggle (struct avs_dev * adev , struct avs_ipc_msg * tx , bool wake )
205+ static bool avs_apl_d0ix_toggle (struct avs_dev * adev , struct avs_ipc_msg * tx , bool wake )
205206{
206207 /* wake in all cases */
207208 if (wake )
@@ -215,10 +216,10 @@ static bool apl_d0ix_toggle(struct avs_dev *adev, struct avs_ipc_msg *tx, bool w
215216 * Note: for cAVS 1.5+ and 1.8, D0IX is LP-firmware transition,
216217 * not the power-gating mechanism known from cAVS 2.0.
217218 */
218- return apl_lp_streaming (adev );
219+ return avs_apl_lp_streaming (adev );
219220}
220221
221- static int apl_set_d0ix (struct avs_dev * adev , bool enable )
222+ static int avs_apl_set_d0ix (struct avs_dev * adev , bool enable )
222223{
223224 bool streaming = false;
224225 int ret ;
@@ -231,7 +232,7 @@ static int apl_set_d0ix(struct avs_dev *adev, bool enable)
231232 return AVS_IPC_RET (ret );
232233}
233234
234- const struct avs_dsp_ops apl_dsp_ops = {
235+ const struct avs_dsp_ops avs_apl_dsp_ops = {
235236 .power = avs_dsp_core_power ,
236237 .reset = avs_dsp_core_reset ,
237238 .stall = avs_dsp_core_stall ,
@@ -241,10 +242,10 @@ const struct avs_dsp_ops apl_dsp_ops = {
241242 .load_basefw = avs_hda_load_basefw ,
242243 .load_lib = avs_hda_load_library ,
243244 .transfer_mods = avs_hda_transfer_modules ,
244- .log_buffer_offset = skl_log_buffer_offset ,
245- .log_buffer_status = apl_log_buffer_status ,
246- .coredump = apl_coredump ,
247- .d0ix_toggle = apl_d0ix_toggle ,
248- .set_d0ix = apl_set_d0ix ,
245+ .log_buffer_offset = avs_skl_log_buffer_offset ,
246+ .log_buffer_status = avs_apl_log_buffer_status ,
247+ .coredump = avs_apl_coredump ,
248+ .d0ix_toggle = avs_apl_d0ix_toggle ,
249+ .set_d0ix = avs_apl_set_d0ix ,
249250 AVS_SET_ENABLE_LOGS_OP (apl )
250251};
0 commit comments