|
@@ -183,3 +183,53 @@
|
|
|
#define MCPCIA_IO_BIAS MCPCIA_IO(4)
|
|
|
#define MCPCIA_MEM_BIAS MCPCIA_DENSE(4)
|
|
|
|
|
|
+/* Offset between ram physical addresses and pci64 DAC bus addresses. */
|
|
|
+#define MCPCIA_DAC_OFFSET (1UL << 40)
|
|
|
+
|
|
|
+/*
|
|
|
+ * Data structure for handling MCPCIA machine checks:
|
|
|
+ */
|
|
|
+struct el_MCPCIA_uncorrected_frame_mcheck {
|
|
|
+ struct el_common header;
|
|
|
+ struct el_common_EV5_uncorrectable_mcheck procdata;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+#ifdef __KERNEL__
|
|
|
+
|
|
|
+#ifndef __EXTERN_INLINE
|
|
|
+#define __EXTERN_INLINE extern inline
|
|
|
+#define __IO_EXTERN_INLINE
|
|
|
+#endif
|
|
|
+
|
|
|
+/*
|
|
|
+ * I/O functions:
|
|
|
+ *
|
|
|
+ * MCPCIA, the RAWHIDE family PCI/memory support chipset for the EV5 (21164)
|
|
|
+ * and EV56 (21164a) processors, can use either a sparse address mapping
|
|
|
+ * scheme, or the so-called byte-word PCI address space, to get at PCI memory
|
|
|
+ * and I/O.
|
|
|
+ *
|
|
|
+ * Unfortunately, we can't use BWIO with EV5, so for now, we always use SPARSE.
|
|
|
+ */
|
|
|
+
|
|
|
+/*
|
|
|
+ * Memory functions. 64-bit and 32-bit accesses are done through
|
|
|
+ * dense memory space, everything else through sparse space.
|
|
|
+ *
|
|
|
+ * For reading and writing 8 and 16 bit quantities we need to
|
|
|
+ * go through one of the three sparse address mapping regions
|
|
|
+ * and use the HAE_MEM CSR to provide some bits of the address.
|
|
|
+ * The following few routines use only sparse address region 1
|
|
|
+ * which gives 1Gbyte of accessible space which relates exactly
|
|
|
+ * to the amount of PCI memory mapping *into* system address space.
|
|
|
+ * See p 6-17 of the specification but it looks something like this:
|
|
|
+ *
|
|
|
+ * 21164 Address:
|
|
|
+ *
|
|
|
+ * 3 2 1
|
|
|
+ * 9876543210987654321098765432109876543210
|
|
|
+ * 1ZZZZ0.PCI.QW.Address............BBLL
|
|
|
+ *
|
|
|
+ * ZZ = SBZ
|
|
|
+ * BB = Byte offset
|