/* Get the oscillator frequency, from the corresponding hardware configuration field. Note that T30 supports 3 new higher freqs, but we map back to the old T20 freqs. Support for the higher oscillators is TBD.  */
enum clock_osc_freq clock_get_osc_freq(void)
/* Get the oscillator frequency, from the corresponding hardware configuration field. Note that T30 supports 3 new higher freqs, but we map back to the old T20 freqs. Support for the higher oscillators is TBD.  */
enum clock_osc_freq clock_get_osc_freq(void)
{
	struct clk_rst_ctlr *clkrst =
			(struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE;
	u32 reg;
	reg = readl(&clkrst->crc_osc_ctrl);
	reg = (reg & OSC_FREQ_MASK) >> OSC_FREQ_SHIFT;
	if (reg & 1)
		printf("Warning: OSC_FREQ is unsupported! (%d)\n", reg);
	return reg >> 2;
}