/* Restore a previous state of Kinetis Processor System (PS) cache  */
void kinetis_ps_cache_restore(unsigned long *flags)
/* Restore a previous state of Kinetis Processor System (PS) cache  */
void kinetis_ps_cache_restore(unsigned long *flags)
{
	KINETIS_LMEM_PSCCR =
		KINETIS_LMEM_CCR_GO_MSK |
		KINETIS_LMEM_CCR_INVW1_MSK | KINETIS_LMEM_CCR_INVW0_MSK |
		(*flags);
	while (KINETIS_LMEM_PSCCR & KINETIS_LMEM_CCR_GO_MSK);
}