⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cache.c.svn-base

📁 Spearhead2000 的 USB驱动程序
💻 SVN-BASE
字号:
/*************************************************************************** * Copyright Intel Corporation, March 18th 1998.  All rights reserved. * Copyright ARM Limited 1998, 1999.  All rights reserved. ***************************************************************************//***************************************************************************  This file contains the routines to enable & disable the instruction & data  caches and the write-back buffer.****************************************************************************/// $Id: cache.c,v 1.1 2005/05/26 15:51:47 sp_head Exp $// $Log: cache.c,v $// Revision 1.1  2005/05/26 15:51:47  sp_head// user NI//// Revision 1.1.1.2  2004/12/03 15:34:24  spear// First import from CRD//// Revision 1.1.1.1  2004/12/02 11:07:22  spear// First import from CRD//// //  Revision: 1.1 Mon Sep 13 21:32:55 2004 gazzina//  freeze pre-AFE// //  Revision: 1.3 Thu Jul  3 12:37:59 2003 lert//  Turn On MPU on I/D Cache Functions  Enable MPU even for Icache Enable// //  Revision: 1.2 Fri Jan 31 10:54:29 2003 lert//  Another bug on Firmware suite ?....  EnableMMU Added on uHALr_EnableCache// //  Revision: 1.1 Thu Dec 19 15:47:54 2002 lert//  First Check In#include  "uhal.h"#include  "mmu_h.h"// Enable all cachingvoid uHALr_EnableCache(void){  int	mode = uHALir_ReadCacheMode() ;      // Active ICache/DCache/Write Buffer  uHALir_WriteCacheMode(mode | (IC_ON + DC_ON + WB_ON + EnableMMU)) ;}// Enable instruction cachevoid uHALir_EnableICache(void){  int mode = uHALir_ReadCacheMode();  uHALir_WriteCacheMode(mode | IC_ON + WB_ON + EnableMMU);}// Enable data cachevoid uHALir_EnableDCache(void){  int mode = uHALir_ReadCacheMode();    uHALir_WriteCacheMode(mode | DC_ON + WB_ON + EnableMMU);}// Enable write buffervoid uHALir_EnableWriteBuffer(void){   int mode = uHALir_ReadCacheMode();   uHALir_WriteCacheMode(mode | WB_ON);}// Disable all cachingvoid uHALr_DisableCache(void){  uHALir_DisableICache();  uHALir_DisableDCache();  uHALir_DisableWriteBuffer();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -