diff options
Diffstat (limited to 'include/linux/rio.h')
-rw-r--r-- | include/linux/rio.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/include/linux/rio.h b/include/linux/rio.h index ff681ebba585..4e37a7cfa726 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define RIO_NO_HOPCOUNT -1 | 24 | #define RIO_NO_HOPCOUNT -1 |
25 | #define RIO_INVALID_DESTID 0xffff | 25 | #define RIO_INVALID_DESTID 0xffff |
26 | 26 | ||
27 | #define RIO_MAX_MPORTS 8 | ||
27 | #define RIO_MAX_MPORT_RESOURCES 16 | 28 | #define RIO_MAX_MPORT_RESOURCES 16 |
28 | #define RIO_MAX_DEV_RESOURCES 16 | 29 | #define RIO_MAX_DEV_RESOURCES 16 |
29 | 30 | ||
@@ -241,7 +242,7 @@ struct rio_mport { | |||
241 | struct rio_msg inb_msg[RIO_MAX_MBOX]; | 242 | struct rio_msg inb_msg[RIO_MAX_MBOX]; |
242 | struct rio_msg outb_msg[RIO_MAX_MBOX]; | 243 | struct rio_msg outb_msg[RIO_MAX_MBOX]; |
243 | int host_deviceid; /* Host device ID */ | 244 | int host_deviceid; /* Host device ID */ |
244 | struct rio_ops *ops; /* maintenance transaction functions */ | 245 | struct rio_ops *ops; /* low-level architecture-dependent routines */ |
245 | unsigned char id; /* port ID, unique among all ports */ | 246 | unsigned char id; /* port ID, unique among all ports */ |
246 | unsigned char index; /* port index, unique among all port | 247 | unsigned char index; /* port index, unique among all port |
247 | interfaces of the same type */ | 248 | interfaces of the same type */ |
@@ -285,6 +286,13 @@ struct rio_net { | |||
285 | * @cwrite: Callback to perform network write of config space. | 286 | * @cwrite: Callback to perform network write of config space. |
286 | * @dsend: Callback to send a doorbell message. | 287 | * @dsend: Callback to send a doorbell message. |
287 | * @pwenable: Callback to enable/disable port-write message handling. | 288 | * @pwenable: Callback to enable/disable port-write message handling. |
289 | * @open_outb_mbox: Callback to initialize outbound mailbox. | ||
290 | * @close_outb_mbox: Callback to shut down outbound mailbox. | ||
291 | * @open_inb_mbox: Callback to initialize inbound mailbox. | ||
292 | * @close_inb_mbox: Callback to shut down inbound mailbox. | ||
293 | * @add_outb_message: Callback to add a message to an outbound mailbox queue. | ||
294 | * @add_inb_buffer: Callback to add a buffer to an inbound mailbox queue. | ||
295 | * @get_inb_message: Callback to get a message from an inbound mailbox queue. | ||
288 | */ | 296 | */ |
289 | struct rio_ops { | 297 | struct rio_ops { |
290 | int (*lcread) (struct rio_mport *mport, int index, u32 offset, int len, | 298 | int (*lcread) (struct rio_mport *mport, int index, u32 offset, int len, |
@@ -297,6 +305,16 @@ struct rio_ops { | |||
297 | u8 hopcount, u32 offset, int len, u32 data); | 305 | u8 hopcount, u32 offset, int len, u32 data); |
298 | int (*dsend) (struct rio_mport *mport, int index, u16 destid, u16 data); | 306 | int (*dsend) (struct rio_mport *mport, int index, u16 destid, u16 data); |
299 | int (*pwenable) (struct rio_mport *mport, int enable); | 307 | int (*pwenable) (struct rio_mport *mport, int enable); |
308 | int (*open_outb_mbox)(struct rio_mport *mport, void *dev_id, | ||
309 | int mbox, int entries); | ||
310 | void (*close_outb_mbox)(struct rio_mport *mport, int mbox); | ||
311 | int (*open_inb_mbox)(struct rio_mport *mport, void *dev_id, | ||
312 | int mbox, int entries); | ||
313 | void (*close_inb_mbox)(struct rio_mport *mport, int mbox); | ||
314 | int (*add_outb_message)(struct rio_mport *mport, struct rio_dev *rdev, | ||
315 | int mbox, void *buffer, size_t len); | ||
316 | int (*add_inb_buffer)(struct rio_mport *mport, int mbox, void *buf); | ||
317 | void *(*get_inb_message)(struct rio_mport *mport, int mbox); | ||
300 | }; | 318 | }; |
301 | 319 | ||
302 | #define RIO_RESOURCE_MEM 0x00000100 | 320 | #define RIO_RESOURCE_MEM 0x00000100 |
@@ -378,12 +396,7 @@ union rio_pw_msg { | |||
378 | }; | 396 | }; |
379 | 397 | ||
380 | /* Architecture and hardware-specific functions */ | 398 | /* Architecture and hardware-specific functions */ |
381 | extern int rio_init_mports(void); | ||
382 | extern void rio_register_mport(struct rio_mport *); | 399 | extern void rio_register_mport(struct rio_mport *); |
383 | extern int rio_hw_add_outb_message(struct rio_mport *, struct rio_dev *, int, | ||
384 | void *, size_t); | ||
385 | extern int rio_hw_add_inb_buffer(struct rio_mport *, int, void *); | ||
386 | extern void *rio_hw_get_inb_message(struct rio_mport *, int); | ||
387 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); | 400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); |
388 | extern void rio_close_inb_mbox(struct rio_mport *, int); | 401 | extern void rio_close_inb_mbox(struct rio_mport *, int); |
389 | extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); | 402 | extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); |