FreeBSD/sys/arm/at91/at91_pmc.c
/*
 * The following is unused currently since we don't ever set the PLLA
 * frequency of the device.  If we did, we'd have to also pay attention
 * to the ICPLLA bit in the PMC_PLLICPR register for frequencies lower
 * than ~600MHz, which the PMC code doesn't do right now.
 */
The following is unused currently since we don't ever set the PLLA
frequency of the device.  If we did, we'd have to also pay attention
to the ICPLLA bit in the PMC_PLLICPR register for frequencies lower
than ~600MHz, which the PMC code doesn't do right now.
The following is unused currently since we don ' t ever set the PLLA frequency of the device . If we did we ' d have to also pay attention to the ICPLLA bit in the PMC_PLLICPR register for frequencies lower than ~600MHz which the PMC code doesn ' t do right now .
uint32_t
at91_pmc_800mhz_plla_outb(int freq)
{
	uint32_t outa;
	freq /= 1000000;		
	if (freq >= 800)
		freq = 800;
	freq += 3;			
	outa = 3 - ((freq / 50) & 3);	
	return (1 << 29)| (outa << 14);
}
uint32_t at91_pmc_800mhz_plla_outb ( int freq ) { uint32_t outa ; freq /= 1000000 ; if ( freq >= 800 ) freq = 800 ; freq += 3 ; outa = 3 - ( ( freq / 50 ) & 3 ) ; return ( 1 << 29 ) | ( outa << 14 ) ; }
The following is unused currently since we don't ever set the PLLA
 frequency of the device.
The following is unused currently since we don ' t ever set the PLLA frequency of the device .
/*
	 * Set OUTA, per the data sheet.  See Table 46-16 titled
	 * PLLA Frequency Regarding ICPLLA and OUTA in the SAM9X25 doc,
	 * Table 46-17 in the SAM9G20 doc, or Table 46-16 in the SAM9G45 doc.
	 * Note: the frequencies overlap by 5MHz, so we add 3 here to
	 * center shoot the transition.
	 */ /* MHz */ /* Allow for overlap. */ /* 750 / 50 = 7, see table */