/* Select Main Crystal or internal RC as main clock source.  */
void pmc_mainck_osc_select(uint32_t ul_xtal_rc)
/* Select Main Crystal or internal RC as main clock source.  */
void pmc_mainck_osc_select(uint32_t ul_xtal_rc)
{
	uint32_t mor = PMC->CKGR_MOR;
	if (ul_xtal_rc) {
		mor |=  CKGR_MOR_MOSCSEL;
	} else {
		mor &= ~CKGR_MOR_MOSCSEL;
	}
	PMC->CKGR_MOR = CKGR_MOR_KEY_PASSWD | mor;
}