1 /*
2  * Copyright (c) 2022 Intel Corporation.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "comm_widget.h"
8 
9 /*
10  * Operation codes
11  */
12 #define CW_OPCODE_CRRD 0x06
13 #define CW_OPCODE_CRWR 0x07
14 
cw_sb_write(uint32_t dest,uint32_t func,uint16_t address,uint32_t data)15 void cw_sb_write(uint32_t dest, uint32_t func, uint16_t address, uint32_t data)
16 {
17 	cw_upstream_set_attr(dest, func, CW_OPCODE_CRWR, 0, 0);
18 	cw_upstream_set_address16(address);
19 	cw_upstream_set_data(data);
20 	cw_upstream_do_pw();
21 }
22