svn commit: r305112 - head/sys/arm/ti/am335x
Luiz Otavio O Souza
loos at FreeBSD.org
Wed Aug 31 06:46:49 UTC 2016
Author: loos
Date: Wed Aug 31 06:46:47 2016
New Revision: 305112
URL: https://svnweb.freebsd.org/changeset/base/305112
Log:
Replace a magic number with the proper register name.
Sponsored by: Rubicon Communications, LLC (Netgate)
Modified:
head/sys/arm/ti/am335x/am335x_prcm.c
head/sys/arm/ti/am335x/am335x_scm.h
Modified: head/sys/arm/ti/am335x/am335x_prcm.c
==============================================================================
--- head/sys/arm/ti/am335x/am335x_prcm.c Wed Aug 31 06:00:20 2016 (r305111)
+++ head/sys/arm/ti/am335x/am335x_prcm.c Wed Aug 31 06:46:47 2016 (r305112)
@@ -619,10 +619,9 @@ am335x_clk_get_sysclk_freq(struct ti_clo
{
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:
Modified: head/sys/arm/ti/am335x/am335x_scm.h
==============================================================================
--- head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 06:00:20 2016 (r305111)
+++ head/sys/arm/ti/am335x/am335x_scm.h Wed Aug 31 06:46:47 2016 (r305112)
@@ -29,6 +29,7 @@
#define __AM335X_SCM_H__
/* AM335x-specific registers for control module (scm) */
+#define SCM_CTRL_STATUS 0x40
#define SCM_USB_CTRL0 0x620
#define SCM_USB_STS0 0x624
#define SCM_USB_CTRL1 0x628
More information about the svn-src-head
mailing list