This source file includes following definitions.
- aac_nark_ioremap
- aac_nark_init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #include <linux/pci.h>
19 #include <linux/blkdev.h>
20
21 #include <scsi/scsi_host.h>
22
23 #include "aacraid.h"
24
25
26
27
28
29
30 static int aac_nark_ioremap(struct aac_dev * dev, u32 size)
31 {
32 if (!size) {
33 iounmap(dev->regs.rx);
34 dev->regs.rx = NULL;
35 iounmap(dev->base);
36 dev->base = NULL;
37 return 0;
38 }
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));
43 dev->base = NULL;
44 if (dev->regs.rx == NULL)
45 return -1;
46 dev->base = ioremap(dev->base_start, size);
47 if (dev->base == NULL) {
48 iounmap(dev->regs.rx);
49 dev->regs.rx = NULL;
50 return -1;
51 }
52 dev->IndexRegs = &((struct rx_registers __iomem *)dev->base)->IndexRegs;
53 return 0;
54 }
55
56
57
58
59
60
61
62 int aac_nark_init(struct aac_dev * dev)
63 {
64
65
66
67 dev->a_ops.adapter_ioremap = aac_nark_ioremap;
68 dev->a_ops.adapter_comm = aac_rx_select_comm;
69
70 return _aac_rx_init(dev);
71 }