aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2013-01-30 21:50:08 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2013-01-31 19:56:35 -0500
commit6fcdf4facb85e7d54ff6195378dd2ba8e0baccc4 (patch)
tree97220d3bf7c93be60bb805e4c8e149a96f11f91d
parenta786a7c0ad44985548118fd2370c792c0da36891 (diff)
wanrouter: delete now orphaned header content, files/drivers
The wanrouter support was identified earlier as unused for years, and so the previous commit totally decoupled it from the kernel, leaving the related wanrouter files present, but totally inert. Here we take the final step in that cleanup, by doing a wholesale removal of these files. The two step process is used so that the large deletion is decoupled from the git history of files that we still care about. The drivers deleted here all were dependent on the Kconfig setting CONFIG_WAN_ROUTER_DRIVERS. A stub wanrouter.h header (kernel & uapi) are left behind so that drivers/isdn/i4l/isdn_x25iface.c continues to compile, and so that we don't accidentally break userspace that expected these defines. Cc: Joe Perches <joe@perches.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/net/wan/cycx_drv.c569
-rw-r--r--drivers/net/wan/cycx_main.c346
-rw-r--r--drivers/net/wan/cycx_x25.c1602
-rw-r--r--include/linux/cyclomx.h77
-rw-r--r--include/linux/cycx_drv.h64
-rw-r--r--include/linux/wanrouter.h127
-rw-r--r--include/uapi/linux/wanrouter.h443
-rw-r--r--net/wanrouter/Kconfig27
-rw-r--r--net/wanrouter/Makefile7
-rw-r--r--net/wanrouter/patchlevel1
-rw-r--r--net/wanrouter/wanmain.c782
-rw-r--r--net/wanrouter/wanproc.c380
12 files changed, 8 insertions, 4417 deletions
diff --git a/drivers/net/wan/cycx_drv.c b/drivers/net/wan/cycx_drv.c
deleted file mode 100644
index 2a3ecae67a90..000000000000
--- a/drivers/net/wan/cycx_drv.c
+++ /dev/null
@@ -1,569 +0,0 @@
1/*
2* cycx_drv.c Cyclom 2X Support Module.
3*
4* This module is a library of common hardware specific
5* functions used by the Cyclades Cyclom 2X sync card.
6*
7* Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8*
9* Copyright: (c) 1998-2003 Arnaldo Carvalho de Melo
10*
11* Based on sdladrv.c by Gene Kozin <genek@compuserve.com>
12*
13* This program is free software; you can redistribute it and/or
14* modify it under the terms of the GNU General Public License
15* as published by the Free Software Foundation; either version
16* 2 of the License, or (at your option) any later version.
17* ============================================================================
18* 1999/11/11 acme set_current_state(TASK_INTERRUPTIBLE), code
19* cleanup
20* 1999/11/08 acme init_cyc2x deleted, doing nothing
21* 1999/11/06 acme back to read[bw], write[bw] and memcpy_to and
22* fromio to use dpmbase ioremaped
23* 1999/10/26 acme use isa_read[bw], isa_write[bw] & isa_memcpy_to
24* & fromio
25* 1999/10/23 acme cleanup to only supports cyclom2x: all the other
26* boards are no longer manufactured by cyclades,
27* if someone wants to support them... be my guest!
28* 1999/05/28 acme cycx_intack & cycx_intde gone for good
29* 1999/05/18 acme lots of unlogged work, submitting to Linus...
30* 1999/01/03 acme more judicious use of data types
31* 1999/01/03 acme judicious use of data types :>
32* cycx_inten trying to reset pending interrupts
33* from cyclom 2x - I think this isn't the way to
34* go, but for now...
35* 1999/01/02 acme cycx_intack ok, I think there's nothing to do
36* to ack an int in cycx_drv.c, only handle it in
37* cyx_isr (or in the other protocols: cyp_isr,
38* cyf_isr, when they get implemented.
39* Dec 31, 1998 acme cycx_data_boot & cycx_code_boot fixed, crossing
40* fingers to see x25_configure in cycx_x25.c
41* work... :)
42* Dec 26, 1998 acme load implementation fixed, seems to work! :)
43* cycx_2x_dpmbase_options with all the possible
44* DPM addresses (20).
45* cycx_intr implemented (test this!)
46* general code cleanup
47* Dec 8, 1998 Ivan Passos Cyclom-2X firmware load implementation.
48* Aug 8, 1998 acme Initial version.
49*/
50
51#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
52
53#include <linux/init.h> /* __init */
54#include <linux/module.h>
55#include <linux/kernel.h> /* printk(), and other useful stuff */
56#include <linux/stddef.h> /* offsetof(), etc. */
57#include <linux/errno.h> /* return codes */
58#include <linux/cycx_drv.h> /* API definitions */
59#include <linux/cycx_cfm.h> /* CYCX firmware module definitions */
60#include <linux/delay.h> /* udelay, msleep_interruptible */
61#include <asm/io.h> /* read[wl], write[wl], ioremap, iounmap */
62
63#define MOD_VERSION 0
64#define MOD_RELEASE 6
65
66MODULE_AUTHOR("Arnaldo Carvalho de Melo");
67MODULE_DESCRIPTION("Cyclom 2x Sync Card Driver");
68MODULE_LICENSE("GPL");
69
70/* Hardware-specific functions */
71static int load_cyc2x(struct cycx_hw *hw, struct cycx_firmware *cfm, u32 len);
72static void cycx_bootcfg(struct cycx_hw *hw);
73
74static int reset_cyc2x(void __iomem *addr);
75static int detect_cyc2x(void __iomem *addr);
76
77/* Miscellaneous functions */
78static int get_option_index(const long *optlist, long optval);
79static u16 checksum(u8 *buf, u32 len);
80
81#define wait_cyc(addr) cycx_exec(addr + CMD_OFFSET)
82
83/* Global Data */
84
85/* private data */
86static const char fullname[] = "Cyclom 2X Support Module";
87static const char copyright[] =
88 "(c) 1998-2003 Arnaldo Carvalho de Melo <acme@conectiva.com.br>";
89
90/* Hardware configuration options.
91 * These are arrays of configuration options used by verification routines.
92 * The first element of each array is its size (i.e. number of options).
93 */
94static const long cyc2x_dpmbase_options[] = {
95 20,
96 0xA0000, 0xA4000, 0xA8000, 0xAC000, 0xB0000, 0xB4000, 0xB8000,
97 0xBC000, 0xC0000, 0xC4000, 0xC8000, 0xCC000, 0xD0000, 0xD4000,
98 0xD8000, 0xDC000, 0xE0000, 0xE4000, 0xE8000, 0xEC000
99};
100
101static const long cycx_2x_irq_options[] = { 7, 3, 5, 9, 10, 11, 12, 15 };
102
103/* Kernel Loadable Module Entry Points */
104/* Module 'insert' entry point.
105 * o print announcement
106 * o initialize static data
107 *
108 * Return: 0 Ok
109 * < 0 error.
110 * Context: process */
111
112static int __init cycx_drv_init(void)
113{
114 pr_info("%s v%u.%u %s\n",
115 fullname, MOD_VERSION, MOD_RELEASE, copyright);
116
117 return 0;
118}
119
120/* Module 'remove' entry point.
121 * o release all remaining system resources */
122static void cycx_drv_cleanup(void)
123{
124}
125
126/* Kernel APIs */
127/* Set up adapter.
128 * o detect adapter type
129 * o verify hardware configuration options
130 * o check for hardware conflicts
131 * o set up adapter shared memory
132 * o test adapter memory
133 * o load firmware
134 * Return: 0 ok.
135 * < 0 error */
136EXPORT_SYMBOL(cycx_setup);
137int cycx_setup(struct cycx_hw *hw, void *cfm, u32 len, unsigned long dpmbase)
138{
139 int err;
140
141 /* Verify IRQ configuration options */
142 if (!get_option_index(cycx_2x_irq_options, hw->irq)) {
143 pr_err("IRQ %d is invalid!\n", hw->irq);
144 return -EINVAL;
145 }
146
147 /* Setup adapter dual-port memory window and test memory */
148 if (!dpmbase) {
149 pr_err("you must specify the dpm address!\n");
150 return -EINVAL;
151 } else if (!get_option_index(cyc2x_dpmbase_options, dpmbase)) {
152 pr_err("memory address 0x%lX is invalid!\n", dpmbase);
153 return -EINVAL;
154 }
155
156 hw->dpmbase = ioremap(dpmbase, CYCX_WINDOWSIZE);
157 hw->dpmsize = CYCX_WINDOWSIZE;
158
159 if (!detect_cyc2x(hw->dpmbase)) {
160 pr_err("adapter Cyclom 2X not found at address 0x%lX!\n",
161 dpmbase);
162 return -EINVAL;
163 }
164
165 pr_info("found Cyclom 2X card at address 0x%lX\n", dpmbase);
166
167 /* Load firmware. If loader fails then shut down adapter */
168 err = load_cyc2x(hw, cfm, len);
169
170 if (err)
171 cycx_down(hw); /* shutdown adapter */
172
173 return err;
174}