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) 2000-2010 Adaptec, Inc.
8 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
9 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com)
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; see the file COPYING. If not, write to
23 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
28 * Abstract: Hardware Device Interface for NEMER/ARK
32 #include <linux/pci.h>
33 #include <linux/blkdev.h>
35 #include <scsi/scsi_host.h>
41 * @size: mapping resize request
44 static int aac_nark_ioremap(struct aac_dev
* dev
, u32 size
)
47 iounmap(dev
->regs
.rx
);
53 dev
->base_start
= pci_resource_start(dev
->pdev
, 2);
54 dev
->regs
.rx
= ioremap((u64
)pci_resource_start(dev
->pdev
, 0) |
55 ((u64
)pci_resource_start(dev
->pdev
, 1) << 32),
56 sizeof(struct rx_registers
) - sizeof(struct rx_inbound
));
58 if (dev
->regs
.rx
== NULL
)
60 dev
->base
= ioremap(dev
->base_start
, size
);
61 if (dev
->base
== NULL
) {
62 iounmap(dev
->regs
.rx
);
66 dev
->IndexRegs
= &((struct rx_registers __iomem
*)dev
->base
)->IndexRegs
;
71 * aac_nark_init - initialize an NEMER/ARK Split Bar card
72 * @dev: device to configure
76 int aac_nark_init(struct aac_dev
* dev
)
79 * Fill in the function dispatch table.
81 dev
->a_ops
.adapter_ioremap
= aac_nark_ioremap
;
82 dev
->a_ops
.adapter_comm
= aac_rx_select_comm
;
84 return _aac_rx_init(dev
);