From: Bo Shen <voice.shen@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] ARM: atmel: add sama5d4ek board support
Date: Wed, 29 Oct 2014 11:38:02 +0800 [thread overview]
Message-ID: <5450611A.5070401@atmel.com> (raw)
In-Reply-To: <54505E02.8090001@googlemail.com>
Hi Andreas,
On 10/29/2014 11:24 AM, Andreas Bie?mann wrote:
[snip]
>> >diff --git a/arch/arm/include/asm/arch-at91/clk.h b/arch/arm/include/asm/arch-at91/clk.h
>> >index 4076a78..21ce2db 100644
>> >--- a/arch/arm/include/asm/arch-at91/clk.h
>> >+++ b/arch/arm/include/asm/arch-at91/clk.h
>> >@@ -10,6 +10,7 @@
>> > #define __ASM_ARM_ARCH_CLK_H__
>> >
>> > #include <asm/arch/hardware.h>
>> >+#include <asm/arch/at91_pmc.h>
>> > #include <asm/global_data.h>
>> >
>> > static inline unsigned long get_cpu_clk_rate(void)
> Could we please rewrite this peace of code like this:
>
> #ifdef CPU_HAS_H32MXDIV
> static inline unsigned int get_h32mxdiv(void)
> {
> at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC;
> return readl(pmc->mckr) & (AT91_PMC_MCKR_H32MXDIV));
> }
> #else
> static inline unsigned int get_h32mxdiv(void)
> {
> return 0;
> }
> #endif
>
> static inline unsigned long get_macb_pclk_rate(unsigned int dev_id)
> {
> if (get_h32mxdiv())
> return get_mck_clk_rate() / 2;
> else
> return get_mck_clk_rate();
> }
>
> and so forth
>
> The 'if'-path should be optimized away anyway and I feel the single
> get_clk_X functions will look nicer then.
OK, I will change the code like this. Thanks.
> Rest of this series looks good and should be applied soon.
>
> Best Regards
>
> Andreas Bie?mann
>
Best Regards,
Bo Shen
prev parent reply other threads:[~2014-10-29 3:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 2:32 [U-Boot] [PATCH v2 0/3] ARM: atmel: add sama5d4ek board support Bo Shen
2014-10-29 2:32 ` [U-Boot] [PATCH v2 1/3] mtd: atmel_nand: runtime to build gf table for pmecc Bo Shen
2014-10-29 3:06 ` Andreas Bießmann
2014-10-29 2:32 ` [U-Boot] [PATCH v2 2/3] net: macb: enable GMAC IP without GE feature support Bo Shen
2014-10-29 2:32 ` [U-Boot] [PATCH v2 3/3] ARM: atmel: add sama5d4ek board support Bo Shen
2014-10-29 3:24 ` Andreas Bießmann
2014-10-29 3:27 ` Andreas Bießmann
2014-10-29 3:38 ` Bo Shen [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=5450611A.5070401@atmel.com \
--to=voice.shen@atmel.com \
--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