• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 // Copyright (C) 2022 Beken Corporation
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <components/log.h>
17 #include <common/bk_include.h>
18 #include "sys_driver.h"
19 #include "mailbox_driver.h"
20 
mailbox_interrupt_enable(mailbox_endpoint_t src)21 void mailbox_interrupt_enable(mailbox_endpoint_t src)
22 {
23 	switch(src) {
24 		case MAILBOX_CPU0:
25 			sys_drv_int_group2_enable(MBOX0_INTERRUPT_CTRL_BIT);
26 			break;
27 		case MAILBOX_CPU1:
28 			sys_drv_int_group2_enable(MBOX1_INTERRUPT_CTRL_BIT);
29 			break;
30 		default:
31 			break;
32 		}
33 }
34 
mailbox_interrupt_disable(mailbox_endpoint_t src)35 void mailbox_interrupt_disable(mailbox_endpoint_t src)
36 {
37 	switch(src) {
38 		case MAILBOX_CPU0:
39 			sys_drv_int_group2_disable(MBOX0_INTERRUPT_CTRL_BIT);
40 			break;
41 		case MAILBOX_CPU1:
42 			sys_drv_int_group2_disable(MBOX1_INTERRUPT_CTRL_BIT);
43 			break;
44 		default:
45 			break;
46 		}
47 }
48 
49