patch-1.3.71 linux/include/asm-sparc/cypress.h

Next file: linux/include/asm-sparc/delay.h
Previous file: linux/include/asm-sparc/bitops.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.70/linux/include/asm-sparc/cypress.h linux/include/asm-sparc/cypress.h
@@ -35,18 +35,41 @@
  * ME: MmuEnable -- Is the MMU doing translations? 0=no 1=yes
  */
 
-/* NEEDS TO BE FIXED */
-#define CYPRESS_MCABITS   0x01800000
-#define CYPRESS_MCMBITS   0x00600000
-#define CYPRESS_MVALID    0x00040000
-#define CYPRESS_MIDMASK   0x0003c000   /* Only on 605 */
-#define CYPRESS_BMODE     0x00002000
-#define CYPRESS_ACENABLE  0x00001000
+#define CYPRESS_MCA       0x00c00000
+#define CYPRESS_MCM       0x00300000
+#define CYPRESS_MVALID    0x00080000
+#define CYPRESS_MIDMASK   0x00078000   /* Only on 605 */
+#define CYPRESS_BMODE     0x00004000
+#define CYPRESS_ACENABLE  0x00002000
 #define CYPRESS_MRFLCT    0x00000800   /* Only on 605 */
 #define CYPRESS_CMODE     0x00000400
 #define CYPRESS_CLOCK     0x00000200   /* Only on 604 */
 #define CYPRESS_CENABLE   0x00000100
 #define CYPRESS_NFAULT    0x00000002
 #define CYPRESS_MENABLE   0x00000001
+
+extern inline void cypress_flush_page(unsigned long page)
+{
+	__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
+			     "r" (page), "i" (ASI_M_FLUSH_PAGE));
+}
+
+extern inline void cypress_flush_segment(unsigned long addr)
+{
+	__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
+			     "r" (addr), "i" (ASI_M_FLUSH_SEG));
+}
+
+extern inline void cypress_flush_region(unsigned long addr)
+{
+	__asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
+			     "r" (addr), "i" (ASI_M_FLUSH_REGION));
+}
+
+extern inline void cypress_flush_context(void)
+{
+	__asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" : :
+			     "i" (ASI_M_FLUSH_CTX));
+}
 
 #endif /* !(_SPARC_CYPRESS_H) */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this