From 11cca264ff57ad0b234bd1cd2c9a2366b967feb7 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 23 Apr 2010 15:32:50 +0000 Subject: i.MX31/Gigabeat S: Implement frequency and voltage scaling-- 1.6V for 528MHz, and 1.35V for 264MHz and 132MHz. Keep DPTC overdrive ( > 400MHz) voltage scaling off for now because of uncertainties. Simplify the (working) mess later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25699 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/imx31/ccm-imx31.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'firmware/target/arm/imx31/ccm-imx31.h') diff --git a/firmware/target/arm/imx31/ccm-imx31.h b/firmware/target/arm/imx31/ccm-imx31.h index e95891255d..400f6cad5d 100644 --- a/firmware/target/arm/imx31/ccm-imx31.h +++ b/firmware/target/arm/imx31/ccm-imx31.h @@ -93,11 +93,21 @@ enum IMX31_PLLS NUM_PLLS, }; + +/* Return the current source pll for MCU */ +enum IMX31_PLLS ccm_get_src_pll(void); + +/* Decode PLL output frequency from register value */ +unsigned int ccm_calc_pll_rate(unsigned int infreq, unsigned long regval); + /* Get the PLL reference clock frequency in HZ */ -unsigned int ccm_get_pll_ref_clk(void); +unsigned int ccm_get_pll_ref_clk_rate(void); /* Return PLL frequency in HZ */ -unsigned int ccm_get_pll(enum IMX31_PLLS pll); +unsigned int ccm_get_pll_rate(enum IMX31_PLLS pll); + +/* Return MCU frequency in HZ */ +unsigned int ccm_get_mcu_clk(void); /* Return ipg_clk in HZ */ unsigned int ccm_get_ipg_clk(void); @@ -108,4 +118,7 @@ unsigned int ccm_get_ahb_clk(void); /* Return the ATA frequency in HZ */ unsigned int ccm_get_ata_clk(void); +/* Write new values to the current PLL and post-dividers */ +void ccm_set_mcupll_and_pdr(unsigned long pllctl, unsigned long pdr); + #endif /* _CCM_IMX31_H_ */ -- cgit v1.2.3