]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: atmel: clean up the PMC_PLLICPR init code
authorWenyou Yang <wenyou.yang@atmel.com>
Tue, 2 Feb 2016 04:46:14 +0000 (12:46 +0800)
committerAndreas Bießmann <andreas.devel@googlemail.com>
Thu, 18 Feb 2016 20:34:41 +0000 (21:34 +0100)
Due to introducing the PMC_PLLICPR init function, use this
function to clean up the code.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Tested-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
board/atmel/sama5d3_xplained/sama5d3_xplained.c
board/atmel/sama5d3xek/sama5d3xek.c
board/atmel/sama5d4_xplained/sama5d4_xplained.c
board/atmel/sama5d4ek/sama5d4ek.c

index c8a5795b1d9b8a8f137ffc0759e7e98513dd9092..2b9da91b2d1e3c2bc81752b96e030f4ad230552a 100644 (file)
@@ -10,7 +10,6 @@
 #include <asm/io.h>
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/at91_common.h>
-#include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
@@ -198,7 +197,6 @@ void mem_init(void)
 
 void at91_pmc_init(void)
 {
-       struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
        u32 tmp;
 
        tmp = AT91_PMC_PLLAR_29 |
@@ -207,7 +205,7 @@ void at91_pmc_init(void)
              AT91_PMC_PLLXR_DIV(1);
        at91_plla_init(tmp);
 
-       writel(0x3 << 8, &pmc->pllicpr);
+       at91_pllicpr_init(AT91_PMC_IPLL_PLLA(0x3));
 
        tmp = AT91_PMC_MCKR_MDIV_4 |
              AT91_PMC_MCKR_CSS_PLLA;
index 8576560ee56745d17c69cc691aa4c2a7a528c897..e8ee612036d42a3e0a14d3ede66c89fb523258e2 100644 (file)
@@ -10,7 +10,6 @@
 #include <asm/io.h>
 #include <asm/arch/sama5d3_smc.h>
 #include <asm/arch/at91_common.h>
-#include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/clk.h>
@@ -457,7 +456,6 @@ void mem_init(void)
 
 void at91_pmc_init(void)
 {
-       struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
        u32 tmp;
 
        tmp = AT91_PMC_PLLAR_29 |
@@ -466,7 +464,7 @@ void at91_pmc_init(void)
              AT91_PMC_PLLXR_DIV(1);
        at91_plla_init(tmp);
 
-       writel(0x3 << 8, &pmc->pllicpr);
+       at91_pllicpr_init(AT91_PMC_IPLL_PLLA(0x3));
 
        tmp = AT91_PMC_MCKR_MDIV_4 |
              AT91_PMC_MCKR_CSS_PLLA;
index e154aa9322d7a29202240640d819eec1c6a4a371..f4eef9609fec17237e5674d0e6ec268093255fba 100644 (file)
@@ -8,7 +8,6 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
-#include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/atmel_mpddrc.h>
 #include <asm/arch/atmel_usba_udc.h>
@@ -397,7 +396,6 @@ void mem_init(void)
 
 void at91_pmc_init(void)
 {
-       struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
        u32 tmp;
 
        tmp = AT91_PMC_PLLAR_29 |
@@ -406,7 +404,7 @@ void at91_pmc_init(void)
              AT91_PMC_PLLXR_DIV(1);
        at91_plla_init(tmp);
 
-       writel(0x0 << 8, &pmc->pllicpr);
+       at91_pllicpr_init(AT91_PMC_IPLL_PLLA(0x0));
 
        tmp = AT91_PMC_MCKR_H32MXDIV |
              AT91_PMC_MCKR_PLLADIV_2 |
index f174cf5ba497d303ae78e49ee4675f8f4e8c2a5b..aee621789e99f856b7045b47f68b5822dca1cbe7 100644 (file)
@@ -8,7 +8,6 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/at91_common.h>
-#include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/atmel_mpddrc.h>
 #include <asm/arch/atmel_usba_udc.h>
@@ -393,7 +392,6 @@ void mem_init(void)
 
 void at91_pmc_init(void)
 {
-       struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
        u32 tmp;
 
        tmp = AT91_PMC_PLLAR_29 |
@@ -402,7 +400,7 @@ void at91_pmc_init(void)
              AT91_PMC_PLLXR_DIV(1);
        at91_plla_init(tmp);
 
-       writel(0x0 << 8, &pmc->pllicpr);
+       at91_pllicpr_init(AT91_PMC_IPLL_PLLA(0x0));
 
        tmp = AT91_PMC_MCKR_H32MXDIV |
              AT91_PMC_MCKR_PLLADIV_2 |