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
6 * Copyright (C) 2005 Silicon Graphics, Inc. All Rights Reserved.
10 * This file contains a shim driver for the IOC4 IDE and serial drivers.
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>
21 ioc4_probe_one(struct pci_dev *pdev, const struct pci_device_id *pci_id)
25 if ((ret = pci_enable_device(pdev))) {
27 "%s: Failed to enable device with "
28 "pci_dev 0x%p... returning\n",
29 __FUNCTION__, (void *)pdev);
34 /* attach each sub-device */
35 ret = ioc4_ide_attach_one(pdev, pci_id);
38 return ioc4_serial_attach_one(pdev, pci_id);
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},
47 MODULE_DEVICE_TABLE(pci, ioc4_s_id_table);
49 static struct pci_driver __devinitdata ioc4_s_driver = {
51 .id_table = ioc4_s_id_table,
52 .probe = ioc4_probe_one,
55 static int __devinit ioc4_detect(void)
59 return pci_register_driver(&ioc4_s_driver);
61 module_init(ioc4_detect);
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");