aboutsummaryrefslogtreecommitdiff
path: root/module/mhu2/include/mod_mhu2.h
blob: 3f87e78046af5dd03ed74a192d467f00bae62226 (plain)
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
/*
 * Arm SCP/MCP Software
 * Copyright (c) 2017-2019, Arm Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 * Description:
 *      Message Handling Unit (MHU) v2 Device Driver.
 */

#ifndef MOD_MHU2_H
#define MOD_MHU2_H

#include <stdint.h>
#include <fwk_macros.h>

/*!
 * \addtogroup GroupModules Modules
 * @{
 */

/*!
 * \defgroup GroupMHUv2 Message Handling Unit (MHU) v2 Driver
 * @{
 */

/*!
 * \brief MHU v2 api indicies
 */
enum mod_mhu2_api_idx {
    /*! SMT driver API */
    MOD_MHU2_API_IDX_SMT_DRIVER,
    /*! Number of APIs */
    MOD_MHU2_API_IDX_COUNT,
};

/*!
 * \brief MHU v2 device
 *
 * \details Abstract representation of a bidirectional MHU channel that consists
 *      of a single receive interrupt line and a pair of register sets, one for
 *      each direction of communication.
 */
struct mod_mhu2_channel_config {
    /*! IRQ number of the receive interrupt line */
    unsigned int irq;

    /*! Base address of the registers of the incoming MHU */
    uintptr_t recv;

    /*! Base address of the registers of the outgoing MHU */
    uintptr_t send;

    /*! Channel number */
    unsigned int channel;
};

/*!
 * @}
 */

/*!
 * @}
 */

#endif /* MOD_MHU2_H */