diff options
Diffstat (limited to 'drivers/rapidio/switches/tsi57x.c')
-rw-r--r-- | drivers/rapidio/switches/tsi57x.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/rapidio/switches/tsi57x.c b/drivers/rapidio/switches/tsi57x.c index 23040b92ea76..2e902d3e1abe 100644 --- a/drivers/rapidio/switches/tsi57x.c +++ b/drivers/rapidio/switches/tsi57x.c | |||
@@ -1,7 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * RapidIO Tsi57x switch family support | 2 | * RapidIO Tsi57x switch family support |
3 | * | 3 | * |
4 | * Copyright 2009 Integrated Device Technology, Inc. | 4 | * Copyright 2009-2010 Integrated Device Technology, Inc. |
5 | * Alexandre Bounine <alexandre.bounine@idt.com> | ||
6 | * - Added EM support | ||
7 | * - Modified switch operations initialization. | ||
8 | * | ||
5 | * Copyright 2005 MontaVista Software, Inc. | 9 | * Copyright 2005 MontaVista Software, Inc. |
6 | * Matt Porter <mporter@kernel.crashing.org> | 10 | * Matt Porter <mporter@kernel.crashing.org> |
7 | * | 11 | * |
@@ -108,11 +112,6 @@ tsi57x_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount, | |||
108 | return 0; | 112 | return 0; |
109 | } | 113 | } |
110 | 114 | ||
111 | DECLARE_RIO_ROUTE_OPS(RIO_VID_TUNDRA, RIO_DID_TSI572, tsi57x_route_add_entry, tsi57x_route_get_entry, tsi57x_route_clr_table); | ||
112 | DECLARE_RIO_ROUTE_OPS(RIO_VID_TUNDRA, RIO_DID_TSI574, tsi57x_route_add_entry, tsi57x_route_get_entry, tsi57x_route_clr_table); | ||
113 | DECLARE_RIO_ROUTE_OPS(RIO_VID_TUNDRA, RIO_DID_TSI577, tsi57x_route_add_entry, tsi57x_route_get_entry, tsi57x_route_clr_table); | ||
114 | DECLARE_RIO_ROUTE_OPS(RIO_VID_TUNDRA, RIO_DID_TSI578, tsi57x_route_add_entry, tsi57x_route_get_entry, tsi57x_route_clr_table); | ||
115 | |||
116 | static int | 115 | static int |
117 | tsi57x_em_init(struct rio_dev *rdev) | 116 | tsi57x_em_init(struct rio_dev *rdev) |
118 | { | 117 | { |
@@ -253,7 +252,19 @@ exit_es: | |||
253 | return 0; | 252 | return 0; |
254 | } | 253 | } |
255 | 254 | ||
256 | DECLARE_RIO_EM_OPS(RIO_VID_TUNDRA, RIO_DID_TSI572, tsi57x_em_init, tsi57x_em_handler); | 255 | static int tsi57x_switch_init(struct rio_dev *rdev, int do_enum) |
257 | DECLARE_RIO_EM_OPS(RIO_VID_TUNDRA, RIO_DID_TSI574, tsi57x_em_init, tsi57x_em_handler); | 256 | { |
258 | DECLARE_RIO_EM_OPS(RIO_VID_TUNDRA, RIO_DID_TSI577, tsi57x_em_init, tsi57x_em_handler); | 257 | pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev)); |
259 | DECLARE_RIO_EM_OPS(RIO_VID_TUNDRA, RIO_DID_TSI578, tsi57x_em_init, tsi57x_em_handler); | 258 | rdev->rswitch->add_entry = tsi57x_route_add_entry; |
259 | rdev->rswitch->get_entry = tsi57x_route_get_entry; | ||
260 | rdev->rswitch->clr_table = tsi57x_route_clr_table; | ||
261 | rdev->rswitch->em_init = tsi57x_em_init; | ||
262 | rdev->rswitch->em_handle = tsi57x_em_handler; | ||
263 | |||
264 | return 0; | ||
265 | } | ||
266 | |||
267 | DECLARE_RIO_SWITCH_INIT(RIO_VID_TUNDRA, RIO_DID_TSI572, tsi57x_switch_init); | ||
268 | DECLARE_RIO_SWITCH_INIT(RIO_VID_TUNDRA, RIO_DID_TSI574, tsi57x_switch_init); | ||
269 | DECLARE_RIO_SWITCH_INIT(RIO_VID_TUNDRA, RIO_DID_TSI577, tsi57x_switch_init); | ||
270 | DECLARE_RIO_SWITCH_INIT(RIO_VID_TUNDRA, RIO_DID_TSI578, tsi57x_switch_init); | ||