source: rtems/c/src/lib/libbsp/powerpc/qoriq/include/intercom.h @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup QorIQInterCom
5 *
6 * @brief Inter-Processor Communication API.
7 */
8
9/*
10 * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.com/license/LICENSE.
21 */
22
23#ifndef LIBBSP_POWERPC_QORIQ_INTERCOM_H
24#define LIBBSP_POWERPC_QORIQ_INTERCOM_H
25
26#include <rtems.h>
27#include <rtems/chain.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif /* __cplusplus */
32
33/**
34 * @defgroup QorIQInterCom QorIQ - Inter-Processor Communication Support
35 *
36 * @ingroup QorIQ
37 *
38 * @brief Inter-processor communication support.
39 *
40 * @{
41 */
42
43uint32_t qoriq_spin_lock(uint32_t *lock);
44
45void qoriq_spin_unlock(uint32_t *lock, uint32_t msr);
46
47#define INTERCOM_CORE_COUNT 2
48
49#define INTERCOM_SERVICE_COUNT 8
50
51typedef enum {
52        INTERCOM_TYPE_MPCI,
53        INTERCOM_TYPE_UART_0,
54        INTERCOM_TYPE_UART_1,
55        INTERCOM_TYPE_NETWORK,
56        INTERCOM_TYPE_CUSTOM_0,
57        INTERCOM_TYPE_CUSTOM_1,
58        INTERCOM_TYPE_CUSTOM_2,
59        INTERCOM_TYPE_CUSTOM_3,
60        INTERCOM_TYPE_CUSTOM_4
61} intercom_type;
62
63typedef enum {
64        INTERCOM_SIZE_64 = 0,
65        INTERCOM_SIZE_512,
66        INTERCOM_SIZE_2K,
67        INTERCOM_SIZE_4K
68} intercom_size;
69
70typedef struct intercom_packet {
71        union {
72                struct intercom_packet *next;
73                rtems_chain_node node;
74        } glue;
75        intercom_type type_index;
76        intercom_size size_index;
77        uint32_t flags;
78        size_t size;
79        uint32_t cache_line_alignment [2];
80        char data [];
81} intercom_packet;
82
83typedef void (*intercom_service)(intercom_packet *packet, void *arg);
84
85void qoriq_intercom_init(void);
86
87void qoriq_intercom_start(void);
88
89void qoriq_intercom_service_install(intercom_type type, intercom_service service, void *arg);
90
91void qoriq_intercom_service_remove(intercom_type type);
92
93intercom_packet *qoriq_intercom_allocate_packet(intercom_type type, intercom_size size);
94
95void qoriq_intercom_send_packets(int destination_core, intercom_packet *first, intercom_packet *last);
96
97static inline void qoriq_intercom_send_packet(int destination_core, intercom_packet *packet)
98{
99        qoriq_intercom_send_packets(destination_core, packet, packet);
100}
101
102void qoriq_intercom_broadcast_packets(intercom_packet *first, intercom_packet *last);
103
104static inline void qoriq_intercom_broadcast_packet(intercom_packet *packet)
105{
106        qoriq_intercom_broadcast_packets(packet, packet);
107}
108
109void qoriq_intercom_send(int destination_core, intercom_type type, intercom_size size, const void *buf, size_t n);
110
111void qoriq_intercom_free_packet(intercom_packet *packet);
112
113intercom_packet *qoriq_intercom_clone_packet(const intercom_packet *packet);
114
115#ifdef RTEMS_MULTIPROCESSING
116  extern rtems_mpci_table qoriq_intercom_mpci;
117#endif
118
119/** @} */
120
121#ifdef __cplusplus
122}
123#endif /* __cplusplus */
124
125#endif /* LIBBSP_POWERPC_QORIQ_INTERCOM_H */
Note: See TracBrowser for help on using the repository browser.