diff options
Diffstat (limited to 'drivers/rapidio/rio.h')
-rw-r--r-- | drivers/rapidio/rio.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/rapidio/rio.h b/drivers/rapidio/rio.h index 7786d02581f2..b53c5ec276a5 100644 --- a/drivers/rapidio/rio.h +++ b/drivers/rapidio/rio.h | |||
@@ -21,6 +21,14 @@ extern u32 rio_mport_get_feature(struct rio_mport *mport, int local, u16 destid, | |||
21 | extern int rio_create_sysfs_dev_files(struct rio_dev *rdev); | 21 | extern int rio_create_sysfs_dev_files(struct rio_dev *rdev); |
22 | extern int rio_enum_mport(struct rio_mport *mport); | 22 | extern int rio_enum_mport(struct rio_mport *mport); |
23 | extern int rio_disc_mport(struct rio_mport *mport); | 23 | extern int rio_disc_mport(struct rio_mport *mport); |
24 | extern int rio_std_route_add_entry(struct rio_mport *mport, u16 destid, | ||
25 | u8 hopcount, u16 table, u16 route_destid, | ||
26 | u8 route_port); | ||
27 | extern int rio_std_route_get_entry(struct rio_mport *mport, u16 destid, | ||
28 | u8 hopcount, u16 table, u16 route_destid, | ||
29 | u8 *route_port); | ||
30 | extern int rio_std_route_clr_table(struct rio_mport *mport, u16 destid, | ||
31 | u8 hopcount, u16 table); | ||
24 | 32 | ||
25 | /* Structures internal to the RIO core code */ | 33 | /* Structures internal to the RIO core code */ |
26 | extern struct device_attribute rio_dev_attrs[]; | 34 | extern struct device_attribute rio_dev_attrs[]; |
@@ -30,9 +38,9 @@ extern struct rio_route_ops __start_rio_route_ops[]; | |||
30 | extern struct rio_route_ops __end_rio_route_ops[]; | 38 | extern struct rio_route_ops __end_rio_route_ops[]; |
31 | 39 | ||
32 | /* Helpers internal to the RIO core code */ | 40 | /* Helpers internal to the RIO core code */ |
33 | #define DECLARE_RIO_ROUTE_SECTION(section, vid, did, add_hook, get_hook) \ | 41 | #define DECLARE_RIO_ROUTE_SECTION(section, name, vid, did, add_hook, get_hook, clr_hook) \ |
34 | static struct rio_route_ops __rio_route_ops __used \ | 42 | static const struct rio_route_ops __rio_route_##name __used \ |
35 | __section(section)= { vid, did, add_hook, get_hook }; | 43 | __section(section) = { vid, did, add_hook, get_hook, clr_hook }; |
36 | 44 | ||
37 | /** | 45 | /** |
38 | * DECLARE_RIO_ROUTE_OPS - Registers switch routing operations | 46 | * DECLARE_RIO_ROUTE_OPS - Registers switch routing operations |
@@ -47,9 +55,9 @@ extern struct rio_route_ops __end_rio_route_ops[]; | |||
47 | * rio_route_ops is initialized with the ops and placed into a | 55 | * rio_route_ops is initialized with the ops and placed into a |
48 | * RIO-specific kernel section. | 56 | * RIO-specific kernel section. |
49 | */ | 57 | */ |
50 | #define DECLARE_RIO_ROUTE_OPS(vid, did, add_hook, get_hook) \ | 58 | #define DECLARE_RIO_ROUTE_OPS(vid, did, add_hook, get_hook, clr_hook) \ |
51 | DECLARE_RIO_ROUTE_SECTION(.rio_route_ops, \ | 59 | DECLARE_RIO_ROUTE_SECTION(.rio_route_ops, vid##did, \ |
52 | vid, did, add_hook, get_hook) | 60 | vid, did, add_hook, get_hook, clr_hook) |
53 | 61 | ||
54 | #define RIO_GET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x00ff0000) >> 16)) | 62 | #define RIO_GET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x00ff0000) >> 16)) |
55 | #define RIO_SET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x000000ff) << 16)) | 63 | #define RIO_SET_DID(size, x) (size ? (x & 0xffff) : ((x & 0x000000ff) << 16)) |