2 * Adaptec AAC series RAID controller driver
3 * (c) Copyright 2001 Red Hat Inc. <alan@redhat.com>
5 * based on the old aacraid driver that is..
6 * Adaptec aacraid device driver for Linux.
8 * Copyright (c) 2000 Adaptec, Inc. (aacraid@adaptec.com)
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2, or (at your option)
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; see the file COPYING. If not, write to
22 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
27 * Abstract: Hardware Device Interface for NEMER/ARK
31 #include <linux/pci.h>
32 #include <linux/blkdev.h>
34 #include <scsi/scsi_host.h>
40 * @size: mapping resize request
43 static int aac_nark_ioremap(struct aac_dev * dev, u32 size)
46 iounmap(dev->regs.rx);
52 dev->scsi_host_ptr->base = pci_resource_start(dev->pdev, 2);
53 dev->regs.rx = ioremap((u64)pci_resource_start(dev->pdev, 0) |
54 ((u64)pci_resource_start(dev->pdev, 1) << 32),
55 sizeof(struct rx_registers) - sizeof(struct rx_inbound));
57 if (dev->regs.rx == NULL)
59 dev->base = ioremap(dev->scsi_host_ptr->base, size);
60 if (dev->base == NULL) {
61 iounmap(dev->regs.rx);
65 dev->IndexRegs = &((struct rx_registers __iomem *)dev->base)->IndexRegs;
70 * aac_nark_init - initialize an NEMER/ARK Split Bar card
71 * @dev: device to configure
75 int aac_nark_init(struct aac_dev * dev)
78 * Fill in the function dispatch table.
80 dev->a_ops.adapter_ioremap = aac_nark_ioremap;
81 dev->a_ops.adapter_comm = aac_rx_select_comm;
83 return _aac_rx_init(dev);