2 * Adaptec AAC series RAID controller driver
4 * based on the old aacraid driver that is..
5 * Adaptec aacraid device driver for Linux.
7 * Copyright (c) 2006-2007 Adaptec, Inc. (aacraid@adaptec.com)
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; see the file COPYING. If not, write to
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
26 * Abstract: Hardware Device Interface for NEMER/ARK
30 #include <linux/pci.h>
31 #include <linux/blkdev.h>
33 #include <scsi/scsi_host.h>
39 * @size: mapping resize request
42 static int aac_nark_ioremap(struct aac_dev
* dev
, u32 size
)
45 iounmap(dev
->regs
.rx
);
51 dev
->scsi_host_ptr
->base
= pci_resource_start(dev
->pdev
, 2);
52 dev
->regs
.rx
= ioremap((u64
)pci_resource_start(dev
->pdev
, 0) |
53 ((u64
)pci_resource_start(dev
->pdev
, 1) << 32),
54 sizeof(struct rx_registers
) - sizeof(struct rx_inbound
));
56 if (dev
->regs
.rx
== NULL
)
58 dev
->base
= ioremap(dev
->scsi_host_ptr
->base
, size
);
59 if (dev
->base
== NULL
) {
60 iounmap(dev
->regs
.rx
);
64 dev
->IndexRegs
= &((struct rx_registers __iomem
*)dev
->base
)->IndexRegs
;
69 * aac_nark_init - initialize an NEMER/ARK Split Bar card
70 * @dev: device to configure
74 int aac_nark_init(struct aac_dev
* dev
)
77 * Fill in the function dispatch table.
79 dev
->a_ops
.adapter_ioremap
= aac_nark_ioremap
;
80 dev
->a_ops
.adapter_comm
= aac_rx_select_comm
;
82 return _aac_rx_init(dev
);