18c2ecf20Sopenharmony_ci/*====================================================================== 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci A driver for PCMCIA IDE/ATA disk cards 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci The contents of this file are subject to the Mozilla Public 68c2ecf20Sopenharmony_ci License Version 1.1 (the "License"); you may not use this file 78c2ecf20Sopenharmony_ci except in compliance with the License. You may obtain a copy of 88c2ecf20Sopenharmony_ci the License at http://www.mozilla.org/MPL/ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci Software distributed under the License is distributed on an "AS 118c2ecf20Sopenharmony_ci IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 128c2ecf20Sopenharmony_ci implied. See the License for the specific language governing 138c2ecf20Sopenharmony_ci rights and limitations under the License. 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci The initial developer of the original code is David A. Hinds 168c2ecf20Sopenharmony_ci <dahinds@users.sourceforge.net>. Portions created by David A. Hinds 178c2ecf20Sopenharmony_ci are Copyright (C) 1999 David A. Hinds. All Rights Reserved. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci Alternatively, the contents of this file may be used under the 208c2ecf20Sopenharmony_ci terms of the GNU General Public License version 2 (the "GPL"), in 218c2ecf20Sopenharmony_ci which case the provisions of the GPL are applicable instead of the 228c2ecf20Sopenharmony_ci above. If you wish to allow the use of your version of this file 238c2ecf20Sopenharmony_ci only under the terms of the GPL and not to allow others to use 248c2ecf20Sopenharmony_ci your version of this file under the MPL, indicate your decision 258c2ecf20Sopenharmony_ci by deleting the provisions above and replace them with the notice 268c2ecf20Sopenharmony_ci and other provisions required by the GPL. If you do not delete 278c2ecf20Sopenharmony_ci the provisions above, a recipient may use your version of this 288c2ecf20Sopenharmony_ci file under either the MPL or the GPL. 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci======================================================================*/ 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#include <linux/module.h> 338c2ecf20Sopenharmony_ci#include <linux/kernel.h> 348c2ecf20Sopenharmony_ci#include <linux/init.h> 358c2ecf20Sopenharmony_ci#include <linux/ptrace.h> 368c2ecf20Sopenharmony_ci#include <linux/slab.h> 378c2ecf20Sopenharmony_ci#include <linux/string.h> 388c2ecf20Sopenharmony_ci#include <linux/timer.h> 398c2ecf20Sopenharmony_ci#include <linux/ioport.h> 408c2ecf20Sopenharmony_ci#include <linux/ide.h> 418c2ecf20Sopenharmony_ci#include <linux/major.h> 428c2ecf20Sopenharmony_ci#include <linux/delay.h> 438c2ecf20Sopenharmony_ci#include <asm/io.h> 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#include <pcmcia/cistpl.h> 468c2ecf20Sopenharmony_ci#include <pcmcia/ds.h> 478c2ecf20Sopenharmony_ci#include <pcmcia/cisreg.h> 488c2ecf20Sopenharmony_ci#include <pcmcia/ciscode.h> 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#define DRV_NAME "ide-cs" 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci/*====================================================================*/ 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci/* Module parameters */ 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ciMODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>"); 578c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("PCMCIA ATA/IDE card driver"); 588c2ecf20Sopenharmony_ciMODULE_LICENSE("Dual MPL/GPL"); 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci/*====================================================================*/ 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_citypedef struct ide_info_t { 638c2ecf20Sopenharmony_ci struct pcmcia_device *p_dev; 648c2ecf20Sopenharmony_ci struct ide_host *host; 658c2ecf20Sopenharmony_ci int ndev; 668c2ecf20Sopenharmony_ci} ide_info_t; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_cistatic void ide_release(struct pcmcia_device *); 698c2ecf20Sopenharmony_cistatic int ide_config(struct pcmcia_device *); 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_cistatic void ide_detach(struct pcmcia_device *p_dev); 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_cistatic int ide_probe(struct pcmcia_device *link) 748c2ecf20Sopenharmony_ci{ 758c2ecf20Sopenharmony_ci ide_info_t *info; 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci dev_dbg(&link->dev, "ide_attach()\n"); 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci /* Create new ide device */ 808c2ecf20Sopenharmony_ci info = kzalloc(sizeof(*info), GFP_KERNEL); 818c2ecf20Sopenharmony_ci if (!info) 828c2ecf20Sopenharmony_ci return -ENOMEM; 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci info->p_dev = link; 858c2ecf20Sopenharmony_ci link->priv = info; 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO | 888c2ecf20Sopenharmony_ci CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci return ide_config(link); 918c2ecf20Sopenharmony_ci} /* ide_attach */ 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_cistatic void ide_detach(struct pcmcia_device *link) 948c2ecf20Sopenharmony_ci{ 958c2ecf20Sopenharmony_ci ide_info_t *info = link->priv; 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci dev_dbg(&link->dev, "ide_detach(0x%p)\n", link); 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci ide_release(link); 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci kfree(info); 1028c2ecf20Sopenharmony_ci} /* ide_detach */ 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_cistatic const struct ide_port_ops idecs_port_ops = { 1058c2ecf20Sopenharmony_ci .quirkproc = ide_undecoded_slave, 1068c2ecf20Sopenharmony_ci}; 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_cistatic const struct ide_port_info idecs_port_info = { 1098c2ecf20Sopenharmony_ci .port_ops = &idecs_port_ops, 1108c2ecf20Sopenharmony_ci .host_flags = IDE_HFLAG_NO_DMA, 1118c2ecf20Sopenharmony_ci .irq_flags = IRQF_SHARED, 1128c2ecf20Sopenharmony_ci .chipset = ide_pci, 1138c2ecf20Sopenharmony_ci}; 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_cistatic struct ide_host *idecs_register(unsigned long io, unsigned long ctl, 1168c2ecf20Sopenharmony_ci unsigned long irq, struct pcmcia_device *handle) 1178c2ecf20Sopenharmony_ci{ 1188c2ecf20Sopenharmony_ci struct ide_host *host; 1198c2ecf20Sopenharmony_ci ide_hwif_t *hwif; 1208c2ecf20Sopenharmony_ci int i, rc; 1218c2ecf20Sopenharmony_ci struct ide_hw hw, *hws[] = { &hw }; 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci if (!request_region(io, 8, DRV_NAME)) { 1248c2ecf20Sopenharmony_ci printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX not free.\n", 1258c2ecf20Sopenharmony_ci DRV_NAME, io, io + 7); 1268c2ecf20Sopenharmony_ci return NULL; 1278c2ecf20Sopenharmony_ci } 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci if (!request_region(ctl, 1, DRV_NAME)) { 1308c2ecf20Sopenharmony_ci printk(KERN_ERR "%s: I/O resource 0x%lX not free.\n", 1318c2ecf20Sopenharmony_ci DRV_NAME, ctl); 1328c2ecf20Sopenharmony_ci release_region(io, 8); 1338c2ecf20Sopenharmony_ci return NULL; 1348c2ecf20Sopenharmony_ci } 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci memset(&hw, 0, sizeof(hw)); 1378c2ecf20Sopenharmony_ci ide_std_init_ports(&hw, io, ctl); 1388c2ecf20Sopenharmony_ci hw.irq = irq; 1398c2ecf20Sopenharmony_ci hw.dev = &handle->dev; 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci rc = ide_host_add(&idecs_port_info, hws, 1, &host); 1428c2ecf20Sopenharmony_ci if (rc) 1438c2ecf20Sopenharmony_ci goto out_release; 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci hwif = host->ports[0]; 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci if (hwif->present) 1488c2ecf20Sopenharmony_ci return host; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci /* retry registration in case device is still spinning up */ 1518c2ecf20Sopenharmony_ci for (i = 0; i < 10; i++) { 1528c2ecf20Sopenharmony_ci msleep(100); 1538c2ecf20Sopenharmony_ci ide_port_scan(hwif); 1548c2ecf20Sopenharmony_ci if (hwif->present) 1558c2ecf20Sopenharmony_ci return host; 1568c2ecf20Sopenharmony_ci } 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci return host; 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ciout_release: 1618c2ecf20Sopenharmony_ci release_region(ctl, 1); 1628c2ecf20Sopenharmony_ci release_region(io, 8); 1638c2ecf20Sopenharmony_ci return NULL; 1648c2ecf20Sopenharmony_ci} 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_cistatic int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data) 1678c2ecf20Sopenharmony_ci{ 1688c2ecf20Sopenharmony_ci int *is_kme = priv_data; 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci if ((pdev->resource[0]->flags & IO_DATA_PATH_WIDTH) 1718c2ecf20Sopenharmony_ci != IO_DATA_PATH_WIDTH_8) { 1728c2ecf20Sopenharmony_ci pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; 1738c2ecf20Sopenharmony_ci pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 1748c2ecf20Sopenharmony_ci } 1758c2ecf20Sopenharmony_ci pdev->resource[1]->flags &= ~IO_DATA_PATH_WIDTH; 1768c2ecf20Sopenharmony_ci pdev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci if (pdev->resource[1]->end) { 1798c2ecf20Sopenharmony_ci pdev->resource[0]->end = 8; 1808c2ecf20Sopenharmony_ci pdev->resource[1]->end = (*is_kme) ? 2 : 1; 1818c2ecf20Sopenharmony_ci } else { 1828c2ecf20Sopenharmony_ci if (pdev->resource[0]->end < 16) 1838c2ecf20Sopenharmony_ci return -ENODEV; 1848c2ecf20Sopenharmony_ci } 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci return pcmcia_request_io(pdev); 1878c2ecf20Sopenharmony_ci} 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_cistatic int ide_config(struct pcmcia_device *link) 1908c2ecf20Sopenharmony_ci{ 1918c2ecf20Sopenharmony_ci ide_info_t *info = link->priv; 1928c2ecf20Sopenharmony_ci int ret = 0, is_kme = 0; 1938c2ecf20Sopenharmony_ci unsigned long io_base, ctl_base; 1948c2ecf20Sopenharmony_ci struct ide_host *host; 1958c2ecf20Sopenharmony_ci 1968c2ecf20Sopenharmony_ci dev_dbg(&link->dev, "ide_config(0x%p)\n", link); 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_ci is_kme = ((link->manf_id == MANFID_KME) && 1998c2ecf20Sopenharmony_ci ((link->card_id == PRODID_KME_KXLC005_A) || 2008c2ecf20Sopenharmony_ci (link->card_id == PRODID_KME_KXLC005_B))); 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci if (pcmcia_loop_config(link, pcmcia_check_one_config, &is_kme)) { 2038c2ecf20Sopenharmony_ci link->config_flags &= ~CONF_AUTO_CHECK_VCC; 2048c2ecf20Sopenharmony_ci if (pcmcia_loop_config(link, pcmcia_check_one_config, &is_kme)) 2058c2ecf20Sopenharmony_ci goto failed; /* No suitable config found */ 2068c2ecf20Sopenharmony_ci } 2078c2ecf20Sopenharmony_ci io_base = link->resource[0]->start; 2088c2ecf20Sopenharmony_ci if (link->resource[1]->end) 2098c2ecf20Sopenharmony_ci ctl_base = link->resource[1]->start; 2108c2ecf20Sopenharmony_ci else 2118c2ecf20Sopenharmony_ci ctl_base = link->resource[0]->start + 0x0e; 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_ci if (!link->irq) 2148c2ecf20Sopenharmony_ci goto failed; 2158c2ecf20Sopenharmony_ci 2168c2ecf20Sopenharmony_ci ret = pcmcia_enable_device(link); 2178c2ecf20Sopenharmony_ci if (ret) 2188c2ecf20Sopenharmony_ci goto failed; 2198c2ecf20Sopenharmony_ci 2208c2ecf20Sopenharmony_ci /* disable drive interrupts during IDE probe */ 2218c2ecf20Sopenharmony_ci outb(0x02, ctl_base); 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci /* special setup for KXLC005 card */ 2248c2ecf20Sopenharmony_ci if (is_kme) 2258c2ecf20Sopenharmony_ci outb(0x81, ctl_base+1); 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci host = idecs_register(io_base, ctl_base, link->irq, link); 2288c2ecf20Sopenharmony_ci if (host == NULL && resource_size(link->resource[0]) == 0x20) { 2298c2ecf20Sopenharmony_ci outb(0x02, ctl_base + 0x10); 2308c2ecf20Sopenharmony_ci host = idecs_register(io_base + 0x10, ctl_base + 0x10, 2318c2ecf20Sopenharmony_ci link->irq, link); 2328c2ecf20Sopenharmony_ci } 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci if (host == NULL) 2358c2ecf20Sopenharmony_ci goto failed; 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci info->ndev = 1; 2388c2ecf20Sopenharmony_ci info->host = host; 2398c2ecf20Sopenharmony_ci dev_info(&link->dev, "ide-cs: hd%c: Vpp = %d.%d\n", 2408c2ecf20Sopenharmony_ci 'a' + host->ports[0]->index * 2, 2418c2ecf20Sopenharmony_ci link->vpp / 10, link->vpp % 10); 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ci return 0; 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_cifailed: 2468c2ecf20Sopenharmony_ci ide_release(link); 2478c2ecf20Sopenharmony_ci return -ENODEV; 2488c2ecf20Sopenharmony_ci} /* ide_config */ 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_cistatic void ide_release(struct pcmcia_device *link) 2518c2ecf20Sopenharmony_ci{ 2528c2ecf20Sopenharmony_ci ide_info_t *info = link->priv; 2538c2ecf20Sopenharmony_ci struct ide_host *host = info->host; 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ci dev_dbg(&link->dev, "ide_release(0x%p)\n", link); 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci if (info->ndev) { 2588c2ecf20Sopenharmony_ci ide_hwif_t *hwif = host->ports[0]; 2598c2ecf20Sopenharmony_ci unsigned long data_addr, ctl_addr; 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ci data_addr = hwif->io_ports.data_addr; 2628c2ecf20Sopenharmony_ci ctl_addr = hwif->io_ports.ctl_addr; 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ci ide_host_remove(host); 2658c2ecf20Sopenharmony_ci info->ndev = 0; 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci release_region(ctl_addr, 1); 2688c2ecf20Sopenharmony_ci release_region(data_addr, 8); 2698c2ecf20Sopenharmony_ci } 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_ci pcmcia_disable_device(link); 2728c2ecf20Sopenharmony_ci} /* ide_release */ 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_cistatic const struct pcmcia_device_id ide_ids[] = { 2768c2ecf20Sopenharmony_ci PCMCIA_DEVICE_FUNC_ID(4), 2778c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x0000, 0x0000), /* Corsair */ 2788c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x0007, 0x0000), /* Hitachi */ 2798c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x000a, 0x0000), /* I-O Data CFA */ 2808c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x001c, 0x0001), /* Mitsubishi CFA */ 2818c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704), 2828c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x0032, 0x2904), 2838c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401), /* SanDisk CFA */ 2848c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x004f, 0x0000), /* Kingston */ 2858c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x0097, 0x1620), /* TI emulated */ 2868c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000), /* Toshiba */ 2878c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d), 2888c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x00ce, 0x0000), /* Samsung */ 2898c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x0319, 0x0000), /* Hitachi */ 2908c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x2080, 0x0001), 2918c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x4e01, 0x0100), /* Viking CFA */ 2928c2ecf20Sopenharmony_ci PCMCIA_DEVICE_MANF_CARD(0x4e01, 0x0200), /* Lexar, Viking CFA */ 2938c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID123("Caravelle", "PSC-IDE ", "PSC000", 0x8c36137c, 0xd0693ab8, 0x2768a9f0), 2948c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID123("CDROM", "IDE", "MCD-601p", 0x1b9179ca, 0xede88951, 0x0d902f74), 2958c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID123("PCMCIA", "IDE CARD", "F1", 0x281f1c5d, 0x1907960c, 0xf7fde8b9), 2968c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("ARGOSY", "CD-ROM", 0x78f308dc, 0x66536591), 2978c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("ARGOSY", "PnPIDE", 0x78f308dc, 0x0c694728), 2988c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("CNF ", "CD-ROM", 0x46d7db81, 0x66536591), 2998c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("CNF CD-M", "CD-ROM", 0x7d93b852, 0x66536591), 3008c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("Creative Technology Ltd.", "PCMCIA CD-ROM Interface Card", 0xff8c8a45, 0xfe8020c4), 3018c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("Digital Equipment Corporation.", "Digital Mobile Media CD-ROM", 0x17692a66, 0xef1dcbde), 3028c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("EXP", "CD+GAME", 0x6f58c983, 0x63c13aaf), 3038c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("EXP ", "CD-ROM", 0x0a5c52fd, 0x66536591), 3048c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("EXP ", "PnPIDE", 0x0a5c52fd, 0x0c694728), 3058c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("FREECOM", "PCCARD-IDE", 0x5714cbf7, 0x48e0ab8e), 3068c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("HITACHI", "FLASH", 0xf4f43949, 0x9eb86aae), 3078c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("HITACHI", "microdrive", 0xf4f43949, 0xa6d76178), 3088c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), 3098c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), 3108c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), 3118c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x55d5bffb), 3128c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), 3138c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), 3148c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), 3158c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), 3168c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674), 3178c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2 ", 0xe37be2b5, 0x8671043b), 3188c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF300", 0x7ed2ad87, 0x7e9e78ee), 3198c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c), 3208c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79), 3218c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591), 3228c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("PCMCIA", "PnPIDE", 0x281f1c5d, 0x0c694728), 3238c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("SHUTTLE TECHNOLOGY LTD.", "PCCARD-IDE/ATAPI Adapter", 0x4a3f0ba0, 0x322560e1), 3248c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("SEAGATE", "ST1", 0x87c1b330, 0xe1f30883), 3258c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "04/05/06", 0x43d74cb4, 0x6a22777d), 3268c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6), 3278c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003), 3288c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443), 3298c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF45", 0x709b1bf1, 0xf68b6f32), 3308c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), 3318c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), 3328c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), 3338c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x7558f133), 3348c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), 3358c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), 3368c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), 3378c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), 3388c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e), 3398c2ecf20Sopenharmony_ci PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6), 3408c2ecf20Sopenharmony_ci PCMCIA_DEVICE_PROD_ID2("Flash Card", 0x5a362506), 3418c2ecf20Sopenharmony_ci PCMCIA_DEVICE_NULL, 3428c2ecf20Sopenharmony_ci}; 3438c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(pcmcia, ide_ids); 3448c2ecf20Sopenharmony_ci 3458c2ecf20Sopenharmony_cistatic struct pcmcia_driver ide_cs_driver = { 3468c2ecf20Sopenharmony_ci .owner = THIS_MODULE, 3478c2ecf20Sopenharmony_ci .name = "ide-cs", 3488c2ecf20Sopenharmony_ci .probe = ide_probe, 3498c2ecf20Sopenharmony_ci .remove = ide_detach, 3508c2ecf20Sopenharmony_ci .id_table = ide_ids, 3518c2ecf20Sopenharmony_ci}; 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_cistatic int __init init_ide_cs(void) 3548c2ecf20Sopenharmony_ci{ 3558c2ecf20Sopenharmony_ci return pcmcia_register_driver(&ide_cs_driver); 3568c2ecf20Sopenharmony_ci} 3578c2ecf20Sopenharmony_ci 3588c2ecf20Sopenharmony_cistatic void __exit exit_ide_cs(void) 3598c2ecf20Sopenharmony_ci{ 3608c2ecf20Sopenharmony_ci pcmcia_unregister_driver(&ide_cs_driver); 3618c2ecf20Sopenharmony_ci} 3628c2ecf20Sopenharmony_ci 3638c2ecf20Sopenharmony_cilate_initcall(init_ide_cs); 3648c2ecf20Sopenharmony_cimodule_exit(exit_ide_cs); 365