blob: 9f9d88914160033b33e257a2cec589ae422ce163 (
plain) (
blame)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/*
* _notify.h
*
* The MessageQ module supports the structured sending and receiving of
* variable length messages. This module can be used for homogeneous or
* heterogeneous multi-processor messaging.
*
* Copyright (C) 2009 Texas Instruments, Inc.
*
* This package is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE.
*/
#if !defined(__NOTIFY_H_)
#define __NOTIFY_H_
/* Module headers */
#include <syslink/notify.h>
/* Module ID for notify. */
#define NOTIFY_MODULEID ((u16) 0x5F84)
/* Mask to check for event ID. */
#define NOTIFY_EVENT_MASK ((u16) 0xFFFF)
#define ISRESERVED(event_id, reserved_event) \
(((event_id & NOTIFY_EVENT_MASK) >= reserved_event) || \
((event_id >> 16) == NOTIFY_SYSTEMKEY))
/* This structure defines attributes for initialization of the notify module. */
struct notify_config {
u32 num_events;
/* Number of events to be supported */
u32 send_event_poll_count;
/* Poll for specified amount before send_event times out */
u32 num_lines;
/* Max. number of interrupt lines between a single pair of processors */
u32 reserved_events;
/* Number of reserved events to be supported */
};
/* This structure defines the configuration structure for initialization
* of the notify object. */
struct notify_params {
u32 reserved; /* Reserved field */
};
/* Function to get the default configuration for the notify module. */
void notify_get_config(struct notify_config *cfg);
/* Function to setup the notify module */
int notify_setup(struct notify_config *cfg);
/* Function to destroy the notify module */
int notify_destroy(void);
/* Function to create an instance of notify driver */
struct notify_object *notify_create(void *driver_handle, u16 remote_proc_id,
u16 line_id, const struct notify_params *params);
/* Function to delete an instance of notify driver */
int notify_delete(struct notify_object **handle_ptr);
/* Function to call device specific the notify module setup */
int notify_attach(u16 proc_id, void *shared_addr);
/* Function to destroy the device specific notify module */
int notify_detach(u16 proc_id);
/* Function registered as callback with the notify driver */
void notify_exec(struct notify_object *obj, u32 event_id, u32 payload);
#endif /* !defined(__NOTIFY_H_) */
|