/* Invalidate the data cache within the specified region. */
void v7m_dma_inv_range(const void *start, const void *end)
/* Invalidate the data cache within the specified region. */
void v7m_dma_inv_range(const void *start, const void *end)
{
	u32	s = (u32)start, e = (u32)end;
	asm("dsb");
	if (s & (L1_CACHE_BYTES - 1)) {
		DCCIMVAC(s);
		s = (s + L1_CACHE_BYTES) & ~(L1_CACHE_BYTES - 1);
	}
	if (e & (L1_CACHE_BYTES - 1)) {
		DCCIMVAC(e);
		e &= ~(L1_CACHE_BYTES - 1);
	}
	for ( ; s < e; s += L1_CACHE_BYTES)
		DCIMVAC(s);
	asm("dsb");
}