]> git.sur5r.net Git - u-boot/commitdiff
am43xx: Only read the MPU frequency bits of CTRL_DEV_ATTR
authorTom Rini <trini@ti.com>
Thu, 5 Jun 2014 15:15:27 +0000 (11:15 -0400)
committerTom Rini <trini@ti.com>
Fri, 6 Jun 2014 21:46:16 +0000 (17:46 -0400)
Signed-off-by: Tom Rini <trini@ti.com>
board/ti/am43xx/board.c

index 587fd76859a6755d334c461a7620246c7a292046..b635d691bfb6e3965adb5067c2e3bbb57b5b0d60 100644 (file)
@@ -302,7 +302,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);