aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2013-07-03 18:08:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:08:04 -0400
commite350cd1d9308b67363ebb870a678a1fd807df1a6 (patch)
treeaf093b1ffa88846850b8a086a08d4e421e5a5444
parentdd04b452f532ca100f7c557295ffcbc049c77171 (diff)
rapidio/switches: remove tsi500 driver
Remove the driver for Tsi500 Parallel RapidIO switch because this device has not been available for several years. Since the first introduction of Tsi500, the parallel RapidIO interface was replaced by the serial RapidIO (sRIO) and therefore there is no value in keeping this driver. 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/rapidio/switches/Kconfig7
-rw-r--r--drivers/rapidio/switches/Makefile1
-rw-r--r--drivers/rapidio/switches/tsi500.c78
3 files changed, 0 insertions, 86 deletions
diff --git a/drivers/rapidio/switches/Kconfig b/drivers/rapidio/switches/Kconfig
index f47fee5d4563..62d4a065230f 100644
--- a/drivers/rapidio/switches/Kconfig
+++ b/drivers/rapidio/switches/Kconfig
@@ -26,10 +26,3 @@ config RAPIDIO_CPS_GEN2
26 default n 26 default n
27 ---help--- 27 ---help---
28 Includes support for ITD CPS Gen.2 serial RapidIO switches. 28 Includes support for ITD CPS Gen.2 serial RapidIO switches.
29
30config RAPIDIO_TSI500
31 bool "Tsi500 Parallel RapidIO switch support"
32 depends on RAPIDIO
33 default n
34 ---help---
35 Includes support for IDT Tsi500 parallel RapidIO switch.
diff --git a/drivers/rapidio/switches/Makefile b/drivers/rapidio/switches/Makefile
index c4d3acc3c715..051cc6b38188 100644
--- a/drivers/rapidio/switches/Makefile
+++ b/drivers/rapidio/switches/Makefile
@@ -5,5 +5,4 @@
5obj-$(CONFIG_RAPIDIO_TSI57X) += tsi57x.o 5obj-$(CONFIG_RAPIDIO_TSI57X) += tsi57x.o
6obj-$(CONFIG_RAPIDIO_CPS_XX) += idtcps.o 6obj-$(CONFIG_RAPIDIO_CPS_XX) += idtcps.o
7obj-$(CONFIG_RAPIDIO_TSI568) += tsi568.o 7obj-$(CONFIG_RAPIDIO_TSI568) += tsi568.o
8obj-$(CONFIG_RAPIDIO_TSI500) += tsi500.o
9obj-$(CONFIG_RAPIDIO_CPS_GEN2) += idt_gen2.o 8obj-$(CONFIG_RAPIDIO_CPS_GEN2) += idt_gen2.o
diff --git a/drivers/rapidio/switches/tsi500.c b/drivers/rapidio/switches/tsi500.c
deleted file mode 100644
index 914eddd5aa42..000000000000
--- a/drivers/rapidio/switches/tsi500.c
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * RapidIO Tsi500 switch support
3 *
4 * Copyright 2009-2010 Integrated Device Technology, Inc.
5 * Alexandre Bounine <alexandre.bounine@idt.com>
6 * - Modified switch operations initialization.
7 *
8 * Copyright 2005 MontaVista Software, Inc.
9 * Matt Porter <mporter@kernel.crashing.org>
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16
17#include <linux/rio.h>
18#include <linux/rio_drv.h>
19#include <linux/rio_ids.h>
20#include "../rio.h"
21
22static int
23tsi500_route_add_entry(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 route_port)
24{
25 int i;
26 u32 offset = 0x10000 + 0xa00 + ((route_destid / 2)&~0x3);
27 u32 result;
28
29 if (table == 0xff) {
30 rio_mport_read_config_32(mport, destid, hopcount, offset, &result);
31 result &= ~(0xf << (4*(route_destid & 0x7)));
32 for (i=0;i<4;i++)
33 rio_mport_write_config_32(mport, destid, hopcount, offset + (0x20000*i), result | (route_port << (4*(route_destid & 0x7))));
34 }
35 else {
36 rio_mport_read_config_32(mport, destid, hopcount, offset + (0x20000*table), &result);
37 result &= ~(0xf << (4*(route_destid & 0x7)));
38 rio_mport_write_config_32(mport, destid, hopcount, offset + (0x20000*table), result | (route_port << (4*(route_destid & 0x7))));
39 }
40
41 return 0;
42}
43
44static int
45tsi500_route_get_entry(struct rio_mport *mport, u16 destid, u8 hopcount, u16 table, u16 route_destid, u8 *route_port)
46{
47 int ret = 0;
48 u32 offset = 0x10000 + 0xa00 + ((route_destid / 2)&~0x3);
49 u32 result;
50
51 if (table == 0xff)
52 rio_mport_read_config_32(mport, destid, hopcount, offset, &result);
53 else
54 rio_mport_read_config_32(mport, destid, hopcount, offset + (0x20000*table), &result);
55
56 result &= 0xf << (4*(route_destid & 0x7));
57 *route_port = result >> (4*(route_destid & 0x7));
58 if (*route_port > 3)
59 ret = -1;
60
61 return ret;
62}
63
64static int tsi500_switch_init(struct rio_dev *rdev, int do_enum)
65{
66 pr_debug("RIO: %s for %s\n", __func__, rio_name(rdev));
67 rdev->rswitch->add_entry = tsi500_route_add_entry;
68 rdev->rswitch->get_entry = tsi500_route_get_entry;
69 rdev->rswitch->clr_table = NULL;
70 rdev->rswitch->set_domain = NULL;
71 rdev->rswitch->get_domain = NULL;
72 rdev->rswitch->em_init = NULL;
73 rdev->rswitch->em_handle = NULL;
74
75 return 0;
76}
77
78DECLARE_RIO_SWITCH_INIT(RIO_VID_TUNDRA, RIO_DID_TSI500, tsi500_switch_init);