WIP FPC-III support
[linux/fpc-iii.git] / arch / mips / include / asm / vr41xx / pci.h
blobad93b5e890173eeee3319dd601b7b7e7f736cd34
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Include file for NEC VR4100 series PCI Control Unit.
5 * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org>
6 */
7 #ifndef __NEC_VR41XX_PCI_H
8 #define __NEC_VR41XX_PCI_H
10 #define PCI_MASTER_ADDRESS_MASK 0x7fffffffU
12 struct pci_master_address_conversion {
13 uint32_t bus_base_address;
14 uint32_t address_mask;
15 uint32_t pci_base_address;
18 struct pci_target_address_conversion {
19 uint32_t address_mask;
20 uint32_t bus_base_address;
23 typedef enum {
24 CANNOT_LOCK_FROM_DEVICE,
25 CAN_LOCK_FROM_DEVICE,
26 } pci_exclusive_access_t;
28 struct pci_mailbox_address {
29 uint32_t base_address;
32 struct pci_target_address_window {
33 uint32_t base_address;
36 typedef enum {
37 PCI_ARBITRATION_MODE_FAIR,
38 PCI_ARBITRATION_MODE_ALTERNATE_0,
39 PCI_ARBITRATION_MODE_ALTERNATE_B,
40 } pci_arbiter_priority_control_t;
42 typedef enum {
43 PCI_TAKE_AWAY_GNT_DISABLE,
44 PCI_TAKE_AWAY_GNT_ENABLE,
45 } pci_take_away_gnt_mode_t;
47 struct pci_controller_unit_setup {
48 struct pci_master_address_conversion *master_memory1;
49 struct pci_master_address_conversion *master_memory2;
51 struct pci_target_address_conversion *target_memory1;
52 struct pci_target_address_conversion *target_memory2;
54 struct pci_master_address_conversion *master_io;
56 pci_exclusive_access_t exclusive_access;
58 uint32_t pci_clock_max;
59 uint8_t wait_time_limit_from_irdy_to_trdy; /* Only VR4122 is supported */
61 struct pci_mailbox_address *mailbox;
62 struct pci_target_address_window *target_window1;
63 struct pci_target_address_window *target_window2;
65 uint8_t master_latency_timer;
66 uint8_t retry_limit;
68 pci_arbiter_priority_control_t arbiter_priority_control;
69 pci_take_away_gnt_mode_t take_away_gnt_mode;
71 struct resource *mem_resource;
72 struct resource *io_resource;
75 extern void vr41xx_pciu_setup(struct pci_controller_unit_setup *setup);
77 #endif /* __NEC_VR41XX_PCI_H */