/* Switch main clock source selection to internal fast RC.  */
void pmc_switch_mainck_to_fastrc(uint32_t ul_moscrcf)
/* Switch main clock source selection to internal fast RC.  */
void pmc_switch_mainck_to_fastrc(uint32_t ul_moscrcf)
{
	PMC->CKGR_MOR |= (CKGR_MOR_KEY_PASSWD | CKGR_MOR_MOSCRCEN);
	while (!(PMC->PMC_SR & PMC_SR_MOSCRCS));
	PMC->CKGR_MOR = (PMC->CKGR_MOR & ~CKGR_MOR_MOSCRCF_Msk) |
			CKGR_MOR_KEY_PASSWD | ul_moscrcf;
	while (!(PMC->PMC_SR & PMC_SR_MOSCRCS));
	PMC->CKGR_MOR = (PMC->CKGR_MOR & ~CKGR_MOR_MOSCSEL) |
			CKGR_MOR_KEY_PASSWD;
}