|
@@ -0,0 +1,98 @@
|
|
|
+#ifndef __ALPHA_CIA__H__
|
|
|
+#define __ALPHA_CIA__H__
|
|
|
+
|
|
|
+/* Define to experiment with fitting everything into one 512MB HAE window. */
|
|
|
+#define CIA_ONE_HAE_WINDOW 1
|
|
|
+
|
|
|
+#include <linux/types.h>
|
|
|
+#include <asm/compiler.h>
|
|
|
+
|
|
|
+/*
|
|
|
+ * CIA is the internal name for the 21171 chipset which provides
|
|
|
+ * memory controller and PCI access for the 21164 chip based systems.
|
|
|
+ * Also supported here is the 21172 (CIA-2) and 21174 (PYXIS).
|
|
|
+ *
|
|
|
+ * The lineage is a bit confused, since the 21174 was reportedly started
|
|
|
+ * from the 21171 Pass 1 mask, and so is missing bug fixes that appear
|
|
|
+ * in 21171 Pass 2 and 21172, but it also contains additional features.
|
|
|
+ *
|
|
|
+ * This file is based on:
|
|
|
+ *
|
|
|
+ * DECchip 21171 Core Logic Chipset
|
|
|
+ * Technical Reference Manual
|
|
|
+ *
|
|
|
+ * EC-QE18B-TE
|
|
|
+ *
|
|
|
+ * david.rusling@reo.mts.dec.com Initial Version.
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+/*
|
|
|
+ * CIA ADDRESS BIT DEFINITIONS
|
|
|
+ *
|
|
|
+ * 3333 3333 3322 2222 2222 1111 1111 11
|
|
|
+ * 9876 5432 1098 7654 3210 9876 5432 1098 7654 3210
|
|
|
+ * ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
|
|
|
+ * 1 000
|
|
|
+ * ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
|
|
|
+ * | |\|
|
|
|
+ * | Byte Enable --+ |
|
|
|
+ * | Transfer Length --+
|
|
|
+ * +-- IO space, not cached
|
|
|
+ *
|
|
|
+ * Byte Transfer
|
|
|
+ * Enable Length Transfer Byte Address
|
|
|
+ * adr<6:5> adr<4:3> Length Enable Adder
|
|
|
+ * ---------------------------------------------
|
|
|
+ * 00 00 Byte 1110 0x000
|
|
|
+ * 01 00 Byte 1101 0x020
|
|
|
+ * 10 00 Byte 1011 0x040
|
|
|
+ * 11 00 Byte 0111 0x060
|
|
|
+ *
|
|
|
+ * 00 01 Word 1100 0x008
|
|
|
+ * 01 01 Word 1001 0x028 <= Not supported in this code.
|
|
|
+ * 10 01 Word 0011 0x048
|
|
|
+ *
|
|
|
+ * 00 10 Tribyte 1000 0x010
|
|
|
+ * 01 10 Tribyte 0001 0x030
|
|
|
+ *
|
|
|
+ * 10 11 Longword 0000 0x058
|
|
|
+ *
|
|
|
+ * Note that byte enables are asserted low.
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+#define CIA_MEM_R1_MASK 0x1fffffff /* SPARSE Mem region 1 mask is 29 bits */
|
|
|
+#define CIA_MEM_R2_MASK 0x07ffffff /* SPARSE Mem region 2 mask is 27 bits */
|
|
|
+#define CIA_MEM_R3_MASK 0x03ffffff /* SPARSE Mem region 3 mask is 26 bits */
|
|
|
+
|
|
|
+/*
|
|
|
+ * 21171-CA Control and Status Registers
|
|
|
+ */
|
|
|
+#define CIA_IOC_CIA_REV (IDENT_ADDR + 0x8740000080UL)
|
|
|
+# define CIA_REV_MASK 0xff
|
|
|
+#define CIA_IOC_PCI_LAT (IDENT_ADDR + 0x87400000C0UL)
|
|
|
+#define CIA_IOC_CIA_CTRL (IDENT_ADDR + 0x8740000100UL)
|
|
|
+# define CIA_CTRL_PCI_EN (1 << 0)
|
|
|
+# define CIA_CTRL_PCI_LOCK_EN (1 << 1)
|
|
|
+# define CIA_CTRL_PCI_LOOP_EN (1 << 2)
|
|
|
+# define CIA_CTRL_FST_BB_EN (1 << 3)
|
|
|
+# define CIA_CTRL_PCI_MST_EN (1 << 4)
|
|
|
+# define CIA_CTRL_PCI_MEM_EN (1 << 5)
|
|
|
+# define CIA_CTRL_PCI_REQ64_EN (1 << 6)
|
|
|
+# define CIA_CTRL_PCI_ACK64_EN (1 << 7)
|
|
|
+# define CIA_CTRL_ADDR_PE_EN (1 << 8)
|
|
|
+# define CIA_CTRL_PERR_EN (1 << 9)
|
|
|
+# define CIA_CTRL_FILL_ERR_EN (1 << 10)
|
|
|
+# define CIA_CTRL_MCHK_ERR_EN (1 << 11)
|
|
|
+# define CIA_CTRL_ECC_CHK_EN (1 << 12)
|
|
|
+# define CIA_CTRL_ASSERT_IDLE_BC (1 << 13)
|
|
|
+# define CIA_CTRL_COM_IDLE_BC (1 << 14)
|
|
|
+# define CIA_CTRL_CSR_IOA_BYPASS (1 << 15)
|
|
|
+# define CIA_CTRL_IO_FLUSHREQ_EN (1 << 16)
|
|
|
+# define CIA_CTRL_CPU_FLUSHREQ_EN (1 << 17)
|
|
|
+# define CIA_CTRL_ARB_CPU_EN (1 << 18)
|
|
|
+# define CIA_CTRL_EN_ARB_LINK (1 << 19)
|
|
|
+# define CIA_CTRL_RD_TYPE_SHIFT 20
|
|
|
+# define CIA_CTRL_RL_TYPE_SHIFT 24
|
|
|
+# define CIA_CTRL_RM_TYPE_SHIFT 28
|