18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * tsunami.h: Module specific definitions for Tsunami V8 Sparcs 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef _SPARC_TSUNAMI_H 98c2ecf20Sopenharmony_ci#define _SPARC_TSUNAMI_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <asm/asi.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* The MMU control register on the Tsunami: 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * ----------------------------------------------------------------------- 168c2ecf20Sopenharmony_ci * | implvers |SW|AV|DV|MV| RSV |PC|ITD|ALC| RSV |PE| RC |IE|DE|RSV|NF|ME| 178c2ecf20Sopenharmony_ci * ----------------------------------------------------------------------- 188c2ecf20Sopenharmony_ci * 31 24 23 22 21 20 19-18 17 16 14 13-12 11 10-9 8 7 6-2 1 0 198c2ecf20Sopenharmony_ci * 208c2ecf20Sopenharmony_ci * SW: Enable Software Table Walks 0=off 1=on 218c2ecf20Sopenharmony_ci * AV: Address View bit 228c2ecf20Sopenharmony_ci * DV: Data View bit 238c2ecf20Sopenharmony_ci * MV: Memory View bit 248c2ecf20Sopenharmony_ci * PC: Parity Control 258c2ecf20Sopenharmony_ci * ITD: ITBR disable 268c2ecf20Sopenharmony_ci * ALC: Alternate Cacheable 278c2ecf20Sopenharmony_ci * PE: Parity Enable 0=off 1=on 288c2ecf20Sopenharmony_ci * RC: Refresh Control 298c2ecf20Sopenharmony_ci * IE: Instruction cache Enable 0=off 1=on 308c2ecf20Sopenharmony_ci * DE: Data cache Enable 0=off 1=on 318c2ecf20Sopenharmony_ci * NF: No Fault, same as all other SRMMUs 328c2ecf20Sopenharmony_ci * ME: MMU Enable, same as all other SRMMUs 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#define TSUNAMI_SW 0x00800000 368c2ecf20Sopenharmony_ci#define TSUNAMI_AV 0x00400000 378c2ecf20Sopenharmony_ci#define TSUNAMI_DV 0x00200000 388c2ecf20Sopenharmony_ci#define TSUNAMI_MV 0x00100000 398c2ecf20Sopenharmony_ci#define TSUNAMI_PC 0x00020000 408c2ecf20Sopenharmony_ci#define TSUNAMI_ITD 0x00010000 418c2ecf20Sopenharmony_ci#define TSUNAMI_ALC 0x00008000 428c2ecf20Sopenharmony_ci#define TSUNAMI_PE 0x00001000 438c2ecf20Sopenharmony_ci#define TSUNAMI_RCMASK 0x00000C00 448c2ecf20Sopenharmony_ci#define TSUNAMI_IENAB 0x00000200 458c2ecf20Sopenharmony_ci#define TSUNAMI_DENAB 0x00000100 468c2ecf20Sopenharmony_ci#define TSUNAMI_NF 0x00000002 478c2ecf20Sopenharmony_ci#define TSUNAMI_ME 0x00000001 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_cistatic inline void tsunami_flush_icache(void) 508c2ecf20Sopenharmony_ci{ 518c2ecf20Sopenharmony_ci __asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" 528c2ecf20Sopenharmony_ci : /* no outputs */ 538c2ecf20Sopenharmony_ci : "i" (ASI_M_IC_FLCLEAR) 548c2ecf20Sopenharmony_ci : "memory"); 558c2ecf20Sopenharmony_ci} 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_cistatic inline void tsunami_flush_dcache(void) 588c2ecf20Sopenharmony_ci{ 598c2ecf20Sopenharmony_ci __asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" 608c2ecf20Sopenharmony_ci : /* no outputs */ 618c2ecf20Sopenharmony_ci : "i" (ASI_M_DC_FLCLEAR) 628c2ecf20Sopenharmony_ci : "memory"); 638c2ecf20Sopenharmony_ci} 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#endif /* !(_SPARC_TSUNAMI_H) */ 66