diff mbox

[U-Boot,1/4] am43xx: Only read the MPU frequency bits of CTRL_DEV_ATTR

Message ID 1401981330-25101-1-git-send-email-trini@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini June 5, 2014, 3:15 p.m. UTC
Signed-off-by: Tom Rini <trini@ti.com>
---
 board/ti/am43xx/board.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Tom Rini June 6, 2014, 9:56 p.m. UTC | #1
On Thu, Jun 05, 2014 at 11:15:27AM -0400, Tom Rini wrote:

> Signed-off-by: Tom Rini <trini@ti.com>

Applied to u-boot-ti/master, thanks!
diff mbox

Patch

diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index d358ad8..e05a50b 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -464,7 +464,10 @@  static u32 get_sys_clk_index(void)
 static int get_opp_offset(int max_off, int min_off)
 {
 	struct ctrl_stat *ctrl = (struct ctrl_stat *)CTRL_BASE;
-	int opp = readl(&ctrl->dev_attr), offset, i;
+	int opp, offset, i;
+
+	/* Bits 0:11 are defined to be the MPU_MAX_FREQ */
+	opp = readl(&ctrl->dev_attr) & ~0xFFFFF000;
 
 	for (i = max_off; i >= min_off; i--) {
 		offset = opp & (1 << i);