Add a function to get the frequency of the AHB bus. Another stopgap

function until we have full clock support for imx6.
This commit is contained in:
Ian Lepore 2014-09-03 21:45:39 +00:00
parent 7a969f2e05
commit f14514a385
3 changed files with 14 additions and 0 deletions

View File

@ -580,3 +580,10 @@ imx_ccm_uart_hz(void)
return (imx51_get_clock(IMX51CLK_UART_CLK_ROOT));
}
uint32_t
imx_ccm_ahb_hz(void)
{
return (imx51_get_clock(IMX51CLK_AHB_CLK_ROOT));
}

View File

@ -238,6 +238,12 @@ imx_ccm_uart_hz(void)
return (80000000);
}
uint32_t
imx_ccm_ahb_hz(void)
{
return (132000000);
}
static device_method_t ccm_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ccm_probe),

View File

@ -47,6 +47,7 @@ uint32_t imx_ccm_ipg_hz(void);
uint32_t imx_ccm_perclk_hz(void);
uint32_t imx_ccm_sdhci_hz(void);
uint32_t imx_ccm_uart_hz(void);
uint32_t imx_ccm_ahb_hz(void);
void imx_ccm_usb_enable(device_t _usbdev);
void imx_ccm_usbphy_enable(device_t _phydev);