1
2
3
4
5
6
7
8
9
10
11
12
13#include <linux/device.h>
14#include <linux/list.h>
15#include <linux/rio.h>
16
17
18
19extern u32 rio_mport_get_feature(struct rio_mport *mport, int local, u16 destid,
20 u8 hopcount, int ftr);
21extern int rio_create_sysfs_dev_files(struct rio_dev *rdev);
22extern int rio_enum_mport(struct rio_mport *mport);
23extern int rio_disc_mport(struct rio_mport *mport);
24
25
26extern struct device_attribute rio_dev_attrs[];
27extern spinlock_t rio_global_list_lock;
28
29extern struct rio_route_ops __start_rio_route_ops[];
30extern struct rio_route_ops __end_rio_route_ops[];
31
32
33#define DECLARE_RIO_ROUTE_SECTION(section, vid, did, add_hook, get_hook) \
34 static struct rio_route_ops __rio_route_ops __attribute_used__ \
35 __attribute__((__section__(#section))) = { vid, did, add_hook, get_hook };
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50#define DECLARE_RIO_ROUTE_OPS(vid, did, add_hook, get_hook) \
51 DECLARE_RIO_ROUTE_SECTION(.rio_route_ops, \
52 vid, did, add_hook, get_hook)
53
54#ifdef CONFIG_RAPIDIO_8_BIT_TRANSPORT
55#define RIO_GET_DID(x) ((x & 0x00ff0000) >> 16)
56#define RIO_SET_DID(x) ((x & 0x000000ff) << 16)
57#else
58#define RIO_GET_DID(x) (x & 0xffff)
59#define RIO_SET_DID(x) (x & 0xffff)
60#endif
61