Replace a magic number with the proper register name.

Sponsored by:	Rubicon Communications, LLC (Netgate)
This commit is contained in:
Luiz Otavio O Souza 2016-08-31 06:46:47 +00:00
parent 4bddf0c813
commit a089112fdf
2 changed files with 4 additions and 4 deletions

View File

@ -619,10 +619,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:

View File

@ -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