diff options
Diffstat (limited to 'drivers/sn')
-rw-r--r-- | drivers/sn/Makefile | 6 | ||||
-rw-r--r-- | drivers/sn/ioc4.c | 65 |
2 files changed, 71 insertions, 0 deletions
diff --git a/drivers/sn/Makefile b/drivers/sn/Makefile new file mode 100644 index 000000000000..631e54958448 --- /dev/null +++ b/drivers/sn/Makefile | |||
@@ -0,0 +1,6 @@ | |||
1 | # | ||
2 | # Makefile for the Altix device drivers. | ||
3 | # | ||
4 | # | ||
5 | |||
6 | obj-$(CONFIG_BLK_DEV_SGIIOC4) += ioc4.o | ||
diff --git a/drivers/sn/ioc4.c b/drivers/sn/ioc4.c new file mode 100644 index 000000000000..d9e4ee280e5f --- /dev/null +++ b/drivers/sn/ioc4.c | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2005 Silicon Graphics, Inc. All Rights Reserved. | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * This file contains a shim driver for the IOC4 IDE and serial drivers. | ||
11 | */ | ||
12 | |||
13 | #include <linux/errno.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/pci.h> | ||
16 | #include <linux/ioc4_common.h> | ||
17 | #include <linux/ide.h> | ||
18 | |||
19 | |||
20 | static int __devinit | ||
21 | ioc4_probe_one(struct pci_dev *pdev, const struct pci_device_id *pci_id) | ||
22 | { | ||
23 | int ret; | ||
24 | |||
25 | if ((ret = pci_enable_device(pdev))) { | ||
26 | printk(KERN_WARNING | ||
27 | "%s: Failed to enable device with " | ||
28 | "pci_dev 0x%p... returning\n", | ||
29 | __FUNCTION__, (void *)pdev); | ||
30 | return ret; | ||
31 | } | ||
32 | pci_set_master(pdev); | ||
33 | |||
34 | /* attach each sub-device */ | ||
35 | ret = ioc4_ide_attach_one(pdev, pci_id); | ||
36 | if (ret) | ||
37 | return ret; | ||
38 | return ioc4_serial_attach_one(pdev, pci_id); | ||
39 | } | ||
40 | |||
41 | /* pci device struct */ | ||
42 | static struct pci_device_id ioc4_s_id_table[] = { | ||
43 | {PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC4, PCI_ANY_ID, | ||
44 | PCI_ANY_ID, 0x0b4000, 0xFFFFFF}, | ||
45 | {0} | ||
46 | }; | ||
47 | MODULE_DEVICE_TABLE(pci, ioc4_s_id_table); | ||
48 | |||
49 | static struct pci_driver __devinitdata ioc4_s_driver = { | ||
50 | .name = "IOC4", | ||
51 | .id_table = ioc4_s_id_table, | ||
52 | .probe = ioc4_probe_one, | ||
53 | }; | ||
54 | |||
55 | static int __devinit ioc4_detect(void) | ||
56 | { | ||
57 | ioc4_serial_init(); | ||
58 | |||
59 | return pci_register_driver(&ioc4_s_driver); | ||
60 | } | ||
61 | module_init(ioc4_detect); | ||
62 | |||
63 | MODULE_AUTHOR("Pat Gefre - Silicon Graphics Inc. (SGI) <pfg@sgi.com>"); | ||
64 | MODULE_DESCRIPTION("PCI driver module for SGI IOC4 Base-IO Card"); | ||
65 | MODULE_LICENSE("GPL"); | ||