summaryrefslogtreecommitdiff
path: root/drivers/net/fddi/defxx.h
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@orcam.me.uk>2021-03-10 13:03:19 +0100
committerDavid S. Miller <davem@davemloft.net>2021-03-10 13:08:15 -0800
commit795e272e54746e97fde54454873d384d5012cc9d (patch)
treef32fa889a317c79085da2b3e4a03d486a5a39ad2 /drivers/net/fddi/defxx.h
parent193ced4a79599352d63cb8c9e2f0c6043106eb6a (diff)
FDDI: defxx: Implement dynamic CSR I/O address space selection
Recent versions of the PCI Express specification have deprecated support for I/O transactions and actually some PCIe host bridges, such as Power Systems Host Bridge 4 (PHB4), do not implement them. Conversely a DEFEA adapter can have its MMIO decoding disabled with ECU (EISA Configuration Utility) and therefore not available for us with the resource allocation infrastructure we implement. However either I/O address space will always be available for use with the DEFEA (EISA) and DEFPA (PCI) adapters and both have double address decoding implemented in hardware for Control and Status Register access. The two kinds of adapters can be present both at once in a single mixed PCI/EISA system. For the DEFTA (TURBOchannel) variant there is no issue as there has been no port I/O address space defined for that bus. To make people's life easier and the driver more robust remove the DEFXX_MMIO configuration option so as to rather than making the choice for the I/O address space to use at build time for all the adapters installed in the system let the driver choose the most suitable address space dynamically on a case-by-case basis at run time. Make MMIO the default and resort to port I/O should the default fail for some reason. This way multiple adapters installed in one system can use different I/O address spaces each, in particular in the presence of DEFEA adapters in a pure-EISA or a mixed EISA/PCI system (it is expected that DEFPA boards will use MMIO in normal circumstances). The choice of the I/O address space to use continues being reported by the driver on startup, e.g.: eisa 00:05: EISA: slot 5: DEC3002 detected defxx: v1.12 2021/03/10 Lawrence V. Stefani and others 00:05: DEFEA at I/O addr = 0x5000, IRQ = 10, Hardware addr = 00-00-f8-c8-b3-b6 00:05: registered as fddi0 and: defxx: v1.12 2021/03/10 Lawrence V. Stefani and others 0031:02:04.0: DEFPA at MMIO addr = 0x620c080020000, IRQ = 57, Hardware addr = 00-60-6d-93-91-98 0031:02:04.0: registered as fddi0 and: defxx: v1.12 2021/03/10 Lawrence V. Stefani and others tc2: DEFTA at MMIO addr = 0x1f100000, IRQ = 21, Hardware addr = 08-00-2b-b0-8b-1e tc2: registered as fddi0 so there is no need to add further information. The change is supposed to cause a negligible performance hit as I/O accessors will now have code executed conditionally at run time. Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fddi/defxx.h')
-rw-r--r--drivers/net/fddi/defxx.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/fddi/defxx.h b/drivers/net/fddi/defxx.h
index 4c31d31e0a3f..8193713e12db 100644
--- a/drivers/net/fddi/defxx.h
+++ b/drivers/net/fddi/defxx.h
@@ -27,6 +27,7 @@
* 04 Aug 2003 macro Converted to the DMA API.
* 23 Oct 2006 macro Big-endian host support.
* 14 Dec 2006 macro TURBOchannel support.
+ * 10 Mar 2021 macro Dynamic MMIO vs port I/O.
*/
#ifndef _DEFXX_H_
@@ -1776,6 +1777,8 @@ typedef struct DFX_board_tag
int port;
} base; /* base address */
struct device *bus_dev;
+ /* Whether to use MMIO or port I/O. */
+ bool mmio;
u32 full_duplex_enb; /* FDDI Full Duplex enable (1 == on, 2 == off) */
u32 req_ttrt; /* requested TTRT value (in 80ns units) */
u32 burst_size; /* adapter burst size (enumerated) */