1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Adaptec AAC series RAID controller driver
5 * based on the old aacraid driver that is..
6 * Adaptec aacraid device driver for Linux.
8 * Copyright (c) 2000-2010 Adaptec, Inc.
9 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
10 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com)
15 * Abstract: Hardware Device Interface for NEMER/ARK
18 #include <linux/pci.h>
19 #include <linux/blkdev.h>
21 #include <scsi/scsi_host.h>
27 * @size: mapping resize request
30 static int aac_nark_ioremap(struct aac_dev
* dev
, u32 size
)
33 iounmap(dev
->regs
.rx
);
39 dev
->base_start
= pci_resource_start(dev
->pdev
, 2);
40 dev
->regs
.rx
= ioremap((u64
)pci_resource_start(dev
->pdev
, 0) |
41 ((u64
)pci_resource_start(dev
->pdev
, 1) << 32),
42 sizeof(struct rx_registers
) - sizeof(struct rx_inbound
));
44 if (dev
->regs
.rx
== NULL
)
46 dev
->base
= ioremap(dev
->base_start
, size
);
47 if (dev
->base
== NULL
) {
48 iounmap(dev
->regs
.rx
);
52 dev
->IndexRegs
= &((struct rx_registers __iomem
*)dev
->base
)->IndexRegs
;
57 * aac_nark_init - initialize an NEMER/ARK Split Bar card
58 * @dev: device to configure
62 int aac_nark_init(struct aac_dev
* dev
)
65 * Fill in the function dispatch table.
67 dev
->a_ops
.adapter_ioremap
= aac_nark_ioremap
;
68 dev
->a_ops
.adapter_comm
= aac_rx_select_comm
;
70 return _aac_rx_init(dev
);