From 95e9f935c778d480ae3972c330bd79608917f78e Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Sun, 16 May 2010 15:18:25 +0000 Subject: Add support for the U4 PCI-Express bridge chipset used in late-generation Powermac G5 systems. MSI and several other things are not presently supported. The U3/U4 internal device support portions of this change were contributed by Andreas Tobler. MFC after: 1 week --- sys/powerpc/powermac/uninorthvar.h | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'sys/powerpc/powermac/uninorthvar.h') diff --git a/sys/powerpc/powermac/uninorthvar.h b/sys/powerpc/powermac/uninorthvar.h index 4480eb8..9625d42 100644 --- a/sys/powerpc/powermac/uninorthvar.h +++ b/sys/powerpc/powermac/uninorthvar.h @@ -63,17 +63,37 @@ struct uninorth_softc { bus_dma_tag_t sc_dmat; struct ofw_bus_iinfo sc_pci_iinfo; - int sc_u3; + int sc_ver; }; struct unin_chip_softc { - vm_offset_t sc_physaddr; + u_int32_t sc_physaddr; vm_offset_t sc_addr; - u_int sc_size; + u_int32_t sc_size; + struct rman sc_mem_rman; int sc_version; }; /* + * Format of a unin reg property entry. + */ +struct unin_chip_reg { + u_int32_t mr_base; + u_int32_t mr_size; +}; + +/* + * Per unin device structure. + */ +struct unin_chip_devinfo { + int udi_interrupts[6]; + int udi_ninterrupts; + int udi_base; + struct ofw_bus_devinfo udi_obdinfo; + struct resource_list udi_resources; +}; + +/* * Version register */ #define UNIN_VERS 0x0 @@ -81,7 +101,14 @@ struct unin_chip_softc { /* * Clock-control register */ -#define UNIN_CLOCKCNTL 0x20 -#define UNIN_CLOCKCNTL_GMAC 0x2 +#define UNIN_CLOCKCNTL 0x20 +#define UNIN_CLOCKCNTL_GMAC 0x2 + +/* + * Toggle registers + */ +#define UNIN_TOGGLE_REG 0xe0 +#define UNIN_MPIC_RESET 0x2 +#define UNIN_MPIC_OUTPUT_ENABLE 0x4 #endif /* _POWERPC_POWERMAC_UNINORTHVAR_H_ */ -- cgit v1.1