summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-sunxi
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-12-27 17:56:59 +0100
committerHans de Goede <hdegoede@redhat.com>2015-01-14 14:56:37 +0100
commit25508ab26cb9ceb8ac9cdf12a851b7047fa791b2 (patch)
treec472b895a16a2ca13c3a625cd83bbf4ac8013019 /arch/arm/include/asm/arch-sunxi
parentc3d2b963c6a0b85a60c918b970db59c5b210fc98 (diff)
downloadu-boot-imx-25508ab26cb9ceb8ac9cdf12a851b7047fa791b2.zip
u-boot-imx-25508ab26cb9ceb8ac9cdf12a851b7047fa791b2.tar.gz
u-boot-imx-25508ab26cb9ceb8ac9cdf12a851b7047fa791b2.tar.bz2
sunxi: Fix PLL1 running at half speed on sun8i
PLL1 on sun6i / sun8i also has a p factor which divides the clock by 2^p (to the power p). On sun6i the p factor is ignored, but on sun8i it is used and we were setting it to 1, resulting in the CPU running at 504 MHz instead of 1008 MHz, this commit fixes this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi')
-rw-r--r--arch/arm/include/asm/arch-sunxi/clock_sun6i.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
index f2119f3..1beeff3 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun6i.h
@@ -173,7 +173,7 @@ struct sunxi_ccm_reg {
#define CCM_PLL1_CTRL_M(n) ((((n) - 1) & 0x3) << 0)
#define CCM_PLL1_CTRL_K(n) ((((n) - 1) & 0x3) << 4)
#define CCM_PLL1_CTRL_N(n) ((((n) - 1) & 0x1f) << 8)
-#define CCM_PLL1_CTRL_MAGIC (0x1 << 16)
+#define CCM_PLL1_CTRL_P(n) (((n) & 0x3) << 16)
#define CCM_PLL1_CTRL_EN (0x1 << 31)
#define CCM_PLL3_CTRL_M(n) ((((n) - 1) & 0xf) << 0)