From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] board: atmel: clean up the PMC_PLLICPR init code
Date: Thu, 10 Dec 2015 10:35:59 +0100 [thread overview]
Message-ID: <5669477F.1040908@denx.de> (raw)
In-Reply-To: <1449646720-30057-4-git-send-email-wenyou.yang@atmel.com>
Hello Wenyou,
Am 09.12.2015 um 08:38 schrieb Wenyou Yang:
> 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>
> ---
>
> Changes in v2: None
>
> board/atmel/sama5d3_xplained/sama5d3_xplained.c | 4 +---
> board/atmel/sama5d3xek/sama5d3xek.c | 4 +---
> board/atmel/sama5d4_xplained/sama5d4_xplained.c | 4 +---
> board/atmel/sama5d4ek/sama5d4ek.c | 4 +---
> 4 files changed, 4 insertions(+), 12 deletions(-)
Tested on the smartweb board, see log:
http://xeidos.ddns.net/buildbot/builders/smartweb_dfu/builds/29/steps/shell/logs/tbotlog
Tested-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
>
> diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
> index d180b41..6532970 100644
> --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c
> +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c
> @@ -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;
> diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c
> index 777e57e..7a804e8 100644
> --- a/board/atmel/sama5d3xek/sama5d3xek.c
> +++ b/board/atmel/sama5d3xek/sama5d3xek.c
> @@ -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;
> diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
> index e95310c..3fec662 100644
> --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c
> +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c
> @@ -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 |
> diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c
> index c92e2588..6ccbc64 100644
> --- a/board/atmel/sama5d4ek/sama5d4ek.c
> +++ b/board/atmel/sama5d4ek/sama5d4ek.c
> @@ -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 |
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
prev parent reply other threads:[~2015-12-10 9:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 7:38 [U-Boot] [PATCH v2 0/3] ARM: at91: add PMC_PLLICPR init function Wenyou Yang
2015-12-09 7:38 ` [U-Boot] [PATCH v2 1/3] ARM: at91: clock: " Wenyou Yang
2015-12-10 9:35 ` Heiko Schocher
2015-12-09 7:38 ` [U-Boot] [PATCH v2 2/3] ARM: at91: clean up the PMC_PLLICPR init code Wenyou Yang
2015-12-10 9:35 ` Heiko Schocher
2015-12-09 7:38 ` [U-Boot] [PATCH v2 3/3] board: atmel: " Wenyou Yang
2015-12-10 9:35 ` Heiko Schocher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5669477F.1040908@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox