svn commit: r271055 - head/sys/arm/freescale/imx

Ian Lepore ian at FreeBSD.org
Wed Sep 3 21:45:41 UTC 2014


Author: ian
Date: Wed Sep  3 21:45:39 2014
New Revision: 271055
URL: http://svnweb.freebsd.org/changeset/base/271055

Log:
  Add a function to get the frequency of the AHB bus.  Another stopgap
  function until we have full clock support for imx6.

Modified:
  head/sys/arm/freescale/imx/imx51_ccm.c
  head/sys/arm/freescale/imx/imx6_ccm.c
  head/sys/arm/freescale/imx/imx_ccmvar.h

Modified: head/sys/arm/freescale/imx/imx51_ccm.c
==============================================================================
--- head/sys/arm/freescale/imx/imx51_ccm.c	Wed Sep  3 21:25:36 2014	(r271054)
+++ head/sys/arm/freescale/imx/imx51_ccm.c	Wed Sep  3 21:45:39 2014	(r271055)
@@ -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));
+}

Modified: head/sys/arm/freescale/imx/imx6_ccm.c
==============================================================================
--- head/sys/arm/freescale/imx/imx6_ccm.c	Wed Sep  3 21:25:36 2014	(r271054)
+++ head/sys/arm/freescale/imx/imx6_ccm.c	Wed Sep  3 21:45:39 2014	(r271055)
@@ -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),

Modified: head/sys/arm/freescale/imx/imx_ccmvar.h
==============================================================================
--- head/sys/arm/freescale/imx/imx_ccmvar.h	Wed Sep  3 21:25:36 2014	(r271054)
+++ head/sys/arm/freescale/imx/imx_ccmvar.h	Wed Sep  3 21:45:39 2014	(r271055)
@@ -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);


More information about the svn-src-head mailing list