aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-23 20:12:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-23 20:12:06 -0400
commitd5b4bb4d103cd601d8009f2d3a7e44586c9ae7cc (patch)
tree0f3b6da2b66fc7a4278764982279c2815c913010 /include
parentc80ddb526331a72c9e9d1480f85f6fd7c74e3d2d (diff)
parentbb8187d35f820671d6dd76700d77a6b55f95e2c5 (diff)
Merge branch 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
Pull the MCA deletion branch from Paul Gortmaker: "It was good that we could support MCA machines back in the day, but realistically, nobody is using them anymore. They were mostly limited to 386-sx 16MHz CPU and some 486 class machines and never more than 64MB of RAM. Even the enthusiast hobbyist community seems to have dried up close to ten years ago, based on what you can find searching various websites dedicated to the relatively short lived hardware. So lets remove the support relating to CONFIG_MCA. There is no point carrying this forward, wasting cycles doing routine maintenance on it; wasting allyesconfig build time on validating it, wasting I/O on git grep'ping over it, and so on." Let's see if anybody screams. It generally has compiled, and James Bottomley pointed out that there was a MCA extension from NCR that allowed for up to 4GB of memory and PPro-class machines. So in *theory* there may be users out there. But even James (technically listed as a maintainer) doesn't actually have a system, and while Alan Cox claims to have a machine in his cellar that he offered to anybody who wants to take it off his hands, he didn't argue for keeping MCA support either. So we could bring it back. But somebody had better speak up and talk about how they have actually been using said MCA hardware with modern kernels for us to do that. And David already took the patch to delete all the networking driver code (commit a5e371f61ad3: "drivers/net: delete all code/drivers depending on CONFIG_MCA"). * 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: MCA: delete all remaining traces of microchannel bus support. scsi: delete the MCA specific drivers and driver code serial: delete the MCA specific 8250 support. arm: remove ability to select CONFIG_MCA
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2o-dev.h2
-rw-r--r--include/linux/mca-legacy.h66
-rw-r--r--include/linux/mca.h148
-rw-r--r--include/linux/serial.h2
-rw-r--r--include/linux/serial_8250.h1
5 files changed, 1 insertions, 218 deletions
diff --git a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h
index a0b23dd45239..a8093bfec3a6 100644
--- a/include/linux/i2o-dev.h
+++ b/include/linux/i2o-dev.h
@@ -124,7 +124,7 @@ typedef struct i2o_sg_io_hdr {
124#define I2O_BUS_LOCAL 0 124#define I2O_BUS_LOCAL 0
125#define I2O_BUS_ISA 1 125#define I2O_BUS_ISA 1
126#define I2O_BUS_EISA 2 126#define I2O_BUS_EISA 2
127#define I2O_BUS_MCA 3 127/* was I2O_BUS_MCA 3 */
128#define I2O_BUS_PCI 4 128#define I2O_BUS_PCI 4
129#define I2O_BUS_PCMCIA 5 129#define I2O_BUS_PCMCIA 5
130#define I2O_BUS_NUBUS 6 130#define I2O_BUS_NUBUS 6
diff --git a/include/linux/mca-legacy.h b/include/linux/mca-legacy.h
deleted file mode 100644
index 7a3aea845902..000000000000
--- a/include/linux/mca-legacy.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/* -*- mode: c; c-basic-offset: 8 -*- */
2
3/* This is the function prototypes for the old legacy MCA interface
4 *
5 * Please move your driver to the new sysfs based one instead */
6
7#ifndef _LINUX_MCA_LEGACY_H
8#define _LINUX_MCA_LEGACY_H
9
10#include <linux/mca.h>
11
12#warning "MCA legacy - please move your driver to the new sysfs api"
13
14/* MCA_NOTFOUND is an error condition. The other two indicate
15 * motherboard POS registers contain the adapter. They might be
16 * returned by the mca_find_adapter() function, and can be used as
17 * arguments to mca_read_stored_pos(). I'm not going to allow direct
18 * access to the motherboard registers until we run across an adapter
19 * that requires it. We don't know enough about them to know if it's
20 * safe.
21 *
22 * See Documentation/mca.txt or one of the existing drivers for
23 * more information.
24 */
25#define MCA_NOTFOUND (-1)
26
27
28
29/* Returns the slot of the first enabled adapter matching id. User can
30 * specify a starting slot beyond zero, to deal with detecting multiple
31 * devices. Returns MCA_NOTFOUND if id not found. Also checks the
32 * integrated adapters.
33 */
34extern int mca_find_adapter(int id, int start);
35extern int mca_find_unused_adapter(int id, int start);
36
37extern int mca_mark_as_used(int slot);
38extern void mca_mark_as_unused(int slot);
39
40/* gets a byte out of POS register (stored in memory) */
41extern unsigned char mca_read_stored_pos(int slot, int reg);
42
43/* This can be expanded later. Right now, it gives us a way of
44 * getting meaningful information into the MCA_info structure,
45 * so we can have a more interesting /proc/mca.
46 */
47extern void mca_set_adapter_name(int slot, char* name);
48
49/* These routines actually mess with the hardware POS registers. They
50 * temporarily disable the device (and interrupts), so make sure you know
51 * what you're doing if you use them. Furthermore, writing to a POS may
52 * result in two devices trying to share a resource, which in turn can
53 * result in multiple devices sharing memory spaces, IRQs, or even trashing
54 * hardware. YOU HAVE BEEN WARNED.
55 *
56 * You can only access slots with this. Motherboard registers are off
57 * limits.
58 */
59
60/* read a byte from the specified POS register. */
61extern unsigned char mca_read_pos(int slot, int reg);
62
63/* write a byte to the specified POS register. */
64extern void mca_write_pos(int slot, int reg, unsigned char byte);
65
66#endif
diff --git a/include/linux/mca.h b/include/linux/mca.h
deleted file mode 100644
index 37972704617f..000000000000
--- a/include/linux/mca.h
+++ /dev/null
@@ -1,148 +0,0 @@
1/*
2 * Header for Microchannel Architecture Bus
3 * Written by Martin Kolinek, February 1996
4 */
5
6#ifndef _LINUX_MCA_H
7#define _LINUX_MCA_H
8
9#include <linux/device.h>
10
11#ifdef CONFIG_MCA
12#include <asm/mca.h>
13
14extern int MCA_bus;
15#else
16#define MCA_bus 0
17#endif
18
19/* This sets up an information callback for /proc/mca/slot?. The
20 * function is called with the buffer, slot, and device pointer (or
21 * some equally informative context information, or nothing, if you
22 * prefer), and is expected to put useful information into the
23 * buffer. The adapter name, id, and POS registers get printed
24 * before this is called though, so don't do it again.
25 *
26 * This should be called with a NULL procfn when a module
27 * unregisters, thus preventing kernel crashes and other such
28 * nastiness.
29 */
30typedef int (*MCA_ProcFn)(char* buf, int slot, void* dev);
31
32/* Should only be called by the NMI interrupt handler, this will do some
33 * fancy stuff to figure out what might have generated a NMI.
34 */
35extern void mca_handle_nmi(void);
36
37enum MCA_AdapterStatus {
38 MCA_ADAPTER_NORMAL = 0,
39 MCA_ADAPTER_NONE = 1,
40 MCA_ADAPTER_DISABLED = 2,
41 MCA_ADAPTER_ERROR = 3
42};
43
44struct mca_device {
45 u64 dma_mask;
46 int pos_id;
47 int slot;
48
49 /* index into id_table, set by the bus match routine */
50 int index;
51
52 /* is there a driver installed? 0 - No, 1 - Yes */
53 int driver_loaded;
54 /* POS registers */
55 unsigned char pos[8];
56 /* if a pseudo adapter of the motherboard, this is the motherboard
57 * register value to use for setup cycles */
58 short pos_register;
59
60 enum MCA_AdapterStatus status;
61#ifdef CONFIG_MCA_PROC_FS
62 /* name of the proc/mca file */
63 char procname[8];
64 /* /proc info callback */
65 MCA_ProcFn procfn;
66 /* device/context info for proc callback */
67 void *proc_dev;
68#endif
69 struct device dev;
70 char name[32];
71};
72#define to_mca_device(mdev) container_of(mdev, struct mca_device, dev)
73
74struct mca_bus_accessor_functions {
75 unsigned char (*mca_read_pos)(struct mca_device *, int reg);
76 void (*mca_write_pos)(struct mca_device *, int reg,
77 unsigned char byte);
78 int (*mca_transform_irq)(struct mca_device *, int irq);
79 int (*mca_transform_ioport)(struct mca_device *,
80 int region);
81 void * (*mca_transform_memory)(struct mca_device *,
82 void *memory);
83};
84
85struct mca_bus {
86 u64 default_dma_mask;
87 int number;
88 struct mca_bus_accessor_functions f;
89 struct device dev;
90 char name[32];
91};
92#define to_mca_bus(mdev) container_of(mdev, struct mca_bus, dev)
93
94struct mca_driver {
95 const short *id_table;
96 void *driver_data;
97 int integrated_id;
98 struct device_driver driver;
99};
100#define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver)
101
102/* Ongoing supported API functions */
103extern struct mca_device *mca_find_device_by_slot(int slot);
104extern int mca_system_init(void);
105extern struct mca_bus *mca_attach_bus(int);
106
107extern unsigned char mca_device_read_stored_pos(struct mca_device *mca_dev,
108 int reg);
109extern unsigned char mca_device_read_pos(struct mca_device *mca_dev, int reg);
110extern void mca_device_write_pos(struct mca_device *mca_dev, int reg,
111 unsigned char byte);
112extern int mca_device_transform_irq(struct mca_device *mca_dev, int irq);
113extern int mca_device_transform_ioport(struct mca_device *mca_dev, int port);
114extern void *mca_device_transform_memory(struct mca_device *mca_dev,
115 void *mem);
116extern int mca_device_claimed(struct mca_device *mca_dev);
117extern void mca_device_set_claim(struct mca_device *mca_dev, int val);
118extern void mca_device_set_name(struct mca_device *mca_dev, const char *name);
119static inline char *mca_device_get_name(struct mca_device *mca_dev)
120{
121 return mca_dev ? mca_dev->name : NULL;
122}
123
124extern enum MCA_AdapterStatus mca_device_status(struct mca_device *mca_dev);
125
126extern struct bus_type mca_bus_type;
127
128extern int mca_register_driver(struct mca_driver *drv);
129extern int mca_register_driver_integrated(struct mca_driver *, int);
130extern void mca_unregister_driver(struct mca_driver *drv);
131
132/* WARNING: only called by the boot time device setup */
133extern int mca_register_device(int bus, struct mca_device *mca_dev);
134
135#ifdef CONFIG_MCA_PROC_FS
136extern void mca_do_proc_init(void);
137extern void mca_set_adapter_procfn(int slot, MCA_ProcFn, void* dev);
138#else
139static inline void mca_do_proc_init(void)
140{
141}
142
143static inline void mca_set_adapter_procfn(int slot, MCA_ProcFn fn, void* dev)
144{
145}
146#endif
147
148#endif /* _LINUX_MCA_H */
diff --git a/include/linux/serial.h b/include/linux/serial.h
index 441980ecc4e5..90e9f981358a 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -130,7 +130,6 @@ struct serial_uart_config {
130#define ASYNCB_CHECK_CD 25 /* i.e., CLOCAL */ 130#define ASYNCB_CHECK_CD 25 /* i.e., CLOCAL */
131#define ASYNCB_SHARE_IRQ 24 /* for multifunction cards, no longer used */ 131#define ASYNCB_SHARE_IRQ 24 /* for multifunction cards, no longer used */
132#define ASYNCB_CONS_FLOW 23 /* flow control for console */ 132#define ASYNCB_CONS_FLOW 23 /* flow control for console */
133#define ASYNCB_BOOT_ONLYMCA 22 /* Probe only if MCA bus */
134#define ASYNCB_FIRST_KERNEL 22 133#define ASYNCB_FIRST_KERNEL 22
135 134
136#define ASYNC_HUP_NOTIFY (1U << ASYNCB_HUP_NOTIFY) 135#define ASYNC_HUP_NOTIFY (1U << ASYNCB_HUP_NOTIFY)
@@ -166,7 +165,6 @@ struct serial_uart_config {
166#define ASYNC_CHECK_CD (1U << ASYNCB_CHECK_CD) 165#define ASYNC_CHECK_CD (1U << ASYNCB_CHECK_CD)
167#define ASYNC_SHARE_IRQ (1U << ASYNCB_SHARE_IRQ) 166#define ASYNC_SHARE_IRQ (1U << ASYNCB_SHARE_IRQ)
168#define ASYNC_CONS_FLOW (1U << ASYNCB_CONS_FLOW) 167#define ASYNC_CONS_FLOW (1U << ASYNCB_CONS_FLOW)
169#define ASYNC_BOOT_ONLYMCA (1U << ASYNCB_BOOT_ONLYMCA)
170#define ASYNC_INTERNAL_FLAGS (~((1U << ASYNCB_FIRST_KERNEL) - 1)) 168#define ASYNC_INTERNAL_FLAGS (~((1U << ASYNCB_FIRST_KERNEL) - 1))
171 169
172/* 170/*
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index 10dbce5205af..a416e92012ef 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -55,7 +55,6 @@ enum {
55 PLAT8250_DEV_BOCA, 55 PLAT8250_DEV_BOCA,
56 PLAT8250_DEV_EXAR_ST16C554, 56 PLAT8250_DEV_EXAR_ST16C554,
57 PLAT8250_DEV_HUB6, 57 PLAT8250_DEV_HUB6,
58 PLAT8250_DEV_MCA,
59 PLAT8250_DEV_AU1X00, 58 PLAT8250_DEV_AU1X00,
60 PLAT8250_DEV_SM501, 59 PLAT8250_DEV_SM501,
61}; 60};