lib/sw_apps/zynq_dram_test/src/test01.c
void L2CacheInvalidate(void)
{
  register unsigned int L2CCReg;

  /* Invalidate the caches */
  Xil_Out32(XPS_L2CC_BASEADDR + XPS_L2CC_CACHE_INVLD_WAY_OFFSET,
      0x0000FFFF);

  /* Wait for the invalidate to complete */
  do
  {
    L2CCReg = Xil_In32(XPS_L2CC_BASEADDR +
        XPS_L2CC_CACHE_SYNC_OFFSET);
  }
  while (L2CCReg != 0);

  /* synchronize the processor */
  dsb();
}
/****************************************************************************
 * Function: L2CacheInvalidate
 * Description: Invalidate the level 2 cache.
 ****************************************************************************/
L2CacheInvalidate
Description: Invalidate the level 2 cache.
L2CacheInvalidate Description : Invalidate the level 2 cache .
void L2CacheInvalidate(void)
{
  register unsigned int L2CCReg;
  Xil_Out32(XPS_L2CC_BASEADDR + XPS_L2CC_CACHE_INVLD_WAY_OFFSET,
      0x0000FFFF);
  do
  {
    L2CCReg = Xil_In32(XPS_L2CC_BASEADDR +
        XPS_L2CC_CACHE_SYNC_OFFSET);
  }
  while (L2CCReg != 0);
  dsb();
}
void L2CacheInvalidate ( void ) { register unsigned int L2CCReg ; Xil_Out32 ( XPS_L2CC_BASEADDR + XPS_L2CC_CACHE_INVLD_WAY_OFFSET , 0x0000FFFF ) ; do { L2CCReg = Xil_In32 ( XPS_L2CC_BASEADDR + XPS_L2CC_CACHE_SYNC_OFFSET ) ; } while ( L2CCReg != 0 ) ; dsb ( ) ; }
Function: L2CacheInvalidate
 Description: Invalidate the level 2 cache.
Function : L2CacheInvalidate Description : Invalidate the level 2 cache .
/* Invalidate the caches */ /* Wait for the invalidate to complete */ /* synchronize the processor */