blob: fabb2e49461f40e79c1a1eb9a46acccea9b0e49b [file] [log] [blame]
Ondrej Zaryebeb4662019-05-14 19:23:07 +02001/* SPDX-License-Identifier: GPL-2.0 */
2
3#define FDOMAIN_REGION_SIZE 0x10
4#define FDOMAIN_BIOS_SIZE 0x2000
5
6enum {
7 in_arbitration = 0x02,
8 in_selection = 0x04,
9 in_other = 0x08,
10 disconnect = 0x10,
11 aborted = 0x20,
12 sent_ident = 0x40,
13};
14
15enum in_port_type {
16 Read_SCSI_Data = 0,
17 SCSI_Status = 1,
18 TMC_Status = 2,
19 FIFO_Status = 3, /* tmc18c50/tmc18c30 only */
20 Interrupt_Cond = 4, /* tmc18c50/tmc18c30 only */
21 LSB_ID_Code = 5,
22 MSB_ID_Code = 6,
23 Read_Loopback = 7,
24 SCSI_Data_NoACK = 8,
25 Interrupt_Status = 9,
26 Configuration1 = 10,
27 Configuration2 = 11, /* tmc18c50/tmc18c30 only */
28 Read_FIFO = 12,
29 FIFO_Data_Count = 14
30};
31
32enum out_port_type {
33 Write_SCSI_Data = 0,
34 SCSI_Cntl = 1,
35 Interrupt_Cntl = 2,
36 SCSI_Mode_Cntl = 3,
37 TMC_Cntl = 4,
38 Memory_Cntl = 5, /* tmc18c50/tmc18c30 only */
39 Write_Loopback = 7,
40 IO_Control = 11, /* tmc18c30 only */
41 Write_FIFO = 12
42};
43
44#ifdef CONFIG_PM_SLEEP
45static const struct dev_pm_ops fdomain_pm_ops;
46#define FDOMAIN_PM_OPS (&fdomain_pm_ops)
47#else
48#define FDOMAIN_PM_OPS NULL
49#endif /* CONFIG_PM_SLEEP */
50
51struct Scsi_Host *fdomain_create(int base, int irq, int this_id,
52 struct device *dev);
53int fdomain_destroy(struct Scsi_Host *sh);