#ident "$Id: flush.i,v 1.7 2006/05/23 21:32:08 craig Exp $"
/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */

/*
 * Inlined functions to flush caches and buffers
 */


#ifdef RVL
#include "arm_stdint.h"
#include "ios.h"
#include "iostypes.h"


/* ---------------------------------------------------------------------- */

/*
 * Do necessary flushes so that the data pointed to by
 * 'ptr' and of length 'numBytes' that IOP has written
 * is flushed so other units see it.
 */
static inline void
flushIOPwrite(void* const ptr, const uint32_t numBytes)
{
    IOS_FlushDCache(ptr, numBytes);
    IOS_FlushMem(IOS_WB_IOD);
}

/* ---------------------------------------------------------------------- */

#else

#define flushDItoIOP(x,y)       
#define flushDItoAES()
#endif // ifdef RVL
