diff options
author | loos <loos@FreeBSD.org> | 2016-12-30 20:18:50 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2016-12-30 20:18:50 +0000 |
commit | 61528a9f2e3a38f9daaf1542d9185276ea6ca492 (patch) | |
tree | 40270734e4821049e2468114f120da5cd1a0ff3b /sys/arm/ti/am335x/am335x_prcm.c | |
parent | 35ffcf6e171e537d673bb496db2e6d4ba08181ef (diff) | |
download | FreeBSD-src-61528a9f2e3a38f9daaf1542d9185276ea6ca492.zip FreeBSD-src-61528a9f2e3a38f9daaf1542d9185276ea6ca492.tar.gz |
MFC of r305112, r305113, r305119, r305141 and r305432:
Replace magic numbers with the proper register names.
Fix the build, revert r305119, move the control module register data to
am335x_scm.h and fix if_cpsw.c to include the correct header.
Sponsored by: Rubicon Communications, LLC (Netgate)
Diffstat (limited to 'sys/arm/ti/am335x/am335x_prcm.c')
-rw-r--r-- | sys/arm/ti/am335x/am335x_prcm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arm/ti/am335x/am335x_prcm.c b/sys/arm/ti/am335x/am335x_prcm.c index f72bb54..f793432 100644 --- a/sys/arm/ti/am335x/am335x_prcm.c +++ b/sys/arm/ti/am335x/am335x_prcm.c @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> +#include "am335x_scm.h" + #define CM_PER 0 #define CM_PER_L4LS_CLKSTCTRL (CM_PER + 0x000) #define CM_PER_L3S_CLKSTCTRL (CM_PER + 0x004) @@ -619,10 +621,9 @@ am335x_clk_get_sysclk_freq(struct ti_clock_dev *clkdev, unsigned int *freq) { uint32_t ctrl_status; - /* Read the input clock freq from the control module */ - /* control_status reg (0x40) */ - if (ti_scm_reg_read_4(0x40, &ctrl_status)) - return ENXIO; + /* Read the input clock freq from the control module. */ + if (ti_scm_reg_read_4(SCM_CTRL_STATUS, &ctrl_status)) + return (ENXIO); switch ((ctrl_status>>22) & 0x3) { case 0x0: |