summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2010-05-26 14:44:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 09:12:51 -0700
commit058f88d672b3161fe511ebe2996c3faef63c1c8e (patch)
treefb4bb8d93aef661cc9e24e1e6e2e8bd4edc2e764 /include
parent011507e49a696462c30914e2eeebcdda33ed30f8 (diff)
downloadlinux-3.10-058f88d672b3161fe511ebe2996c3faef63c1c8e.tar.gz
linux-3.10-058f88d672b3161fe511ebe2996c3faef63c1c8e.tar.bz2
linux-3.10-058f88d672b3161fe511ebe2996c3faef63c1c8e.zip
rapidio: modify initialization of switch operations
Modify the way how RapidIO switch operations are declared. Multiple assignments through the linker script replaced by single initialization call. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Thomas Moll <thomas.moll@sysgo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h9
-rw-r--r--include/linux/rio.h35
2 files changed, 9 insertions, 35 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 8f7c89b2063..ef779c6fc3d 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -248,12 +248,9 @@
\
/* RapidIO route ops */ \
.rio_ops : AT(ADDR(.rio_ops) - LOAD_OFFSET) { \
- VMLINUX_SYMBOL(__start_rio_route_ops) = .; \
- *(.rio_route_ops) \
- VMLINUX_SYMBOL(__end_rio_route_ops) = .; \
- VMLINUX_SYMBOL(__start_rio_em_ops) = .; \
- *(.rio_em_ops) \
- VMLINUX_SYMBOL(__end_rio_em_ops) = .; \
+ VMLINUX_SYMBOL(__start_rio_switch_ops) = .; \
+ *(.rio_switch_ops) \
+ VMLINUX_SYMBOL(__end_rio_switch_ops) = .; \
} \
\
TRACEDATA \
diff --git a/include/linux/rio.h b/include/linux/rio.h
index 4ec31f44f40..3d0ac930cbe 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -320,40 +320,17 @@ struct rio_device_id {
};
/**
- * struct rio_route_ops - Per-switch route operations
+ * struct rio_switch_ops - Per-switch operations
* @vid: RIO vendor ID
* @did: RIO device ID
- * @add_hook: Callback that adds a route entry
- * @get_hook: Callback that gets a route entry
- * @clr_hook: Callback that clears a switch route table (may be NULL)
+ * @init_hook: Callback that performs switch device initialization
*
- * Defines the operations that are necessary to manipulate the route
- * tables for a particular RIO switch device.
+ * Defines the operations that are necessary to initialize/control
+ * a particular RIO switch device.
*/
-struct rio_route_ops {
+struct rio_switch_ops {
u16 vid, did;
- int (*add_hook) (struct rio_mport * mport, u16 destid, u8 hopcount,
- u16 table, u16 route_destid, u8 route_port);
- int (*get_hook) (struct rio_mport * mport, u16 destid, u8 hopcount,
- u16 table, u16 route_destid, u8 * route_port);
- int (*clr_hook) (struct rio_mport *mport, u16 destid, u8 hopcount,
- u16 table);
-};
-
-/**
- * struct rio_em_ops - Per-switch error management operations
- * @vid: RIO vendor ID
- * @did: RIO device ID
- * @init_hook: Switch specific error management initialization (may be NULL)
- * @handler_hook: Switch specific error management handler (may be NULL)
- *
- * Defines the operations that are necessary to initialize and handle
- * error management events for a particular RIO switch device.
- */
-struct rio_em_ops {
- u16 vid, did;
- int (*init_hook) (struct rio_dev *dev);
- int (*handler_hook) (struct rio_dev *dev, u8 swport);
+ int (*init_hook) (struct rio_dev *rdev, int do_enum);
};
union rio_pw_msg {