]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
clock_am43xx:Set the MAC clock to /5 for OPP100
authorSteve Kipisz <s-kipisz2@ti.com>
Wed, 11 Feb 2015 23:54:28 +0000 (18:54 -0500)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 11:52:20 +0000 (13:52 +0200)
When EMAC is in the boot order, the boot ROM sets OPP50 and the
MAC clock is set to /2. SPL needs to change it to /5 for Ethernet
to generate the correct txclk. This patch sets it correctly.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
arch/arm/cpu/armv7/am33xx/clock_am43xx.c
arch/arm/include/asm/arch-am33xx/cpu.h

index 31188c85bccb7fcd69644c185494752993551ea8..529a11951401764696bfb3d5006573c95509f329 100644 (file)
@@ -118,4 +118,7 @@ void enable_basic_clocks(void)
 
        /* Select the Master osc clk as Timer2 clock source */
        writel(0x1, &cmdpll->clktimer2clk);
+
+       /* For OPP100 the mac clock should be /5. */
+       writel(0x4, &cmdpll->clkselmacclk);
 }
index 3f1da852e55c687e55b2d352e8963e1a3956b49c..56e84a9c97f5a2c6ae4010738c557e09f1e06c81 100644 (file)
@@ -402,6 +402,8 @@ struct prm_device_inst {
 struct cm_dpll {
        unsigned int resv1;
        unsigned int clktimer2clk;      /* offset 0x04 */
+       unsigned int resv2[11];
+       unsigned int clkselmacclk;      /* offset 0x34 */ 
 };
 #endif /* CONFIG_AM43XX */