public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [v2 PATCH 10/12] arm, spl, at91: add at91sam9260 and at91sam9g45 spl support
Date: Fri, 31 Oct 2014 07:03:37 +0100	[thread overview]
Message-ID: <54532639.9050304@denx.de> (raw)
In-Reply-To: <5452EAD4.7080903@atmel.com>

Hello Bo,

Am 31.10.2014 02:50, schrieb Bo Shen:
> Hi Heiko,
>
> On 10/30/2014 04:15 PM, Heiko Schocher wrote:
>> diff --git a/arch/arm/cpu/at91-common/spl.c b/arch/arm/cpu/at91-common/spl.c
>> index 674a470..5c9a3ad 100644
>> --- a/arch/arm/cpu/at91-common/spl.c
>> +++ b/arch/arm/cpu/at91-common/spl.c
>
> I am thinking, whether it be better to keep this file as two copy? This will remove #ifdef, although a little code duplication.
>
> If this solution acceptable, some suggestion as following:
> - for armv5 (arm926ejs, now at91 series), named it spl_at91.c,
> - for armv7 (cortex-a5, now, sama5d3), named it spl_atmel.c?
> (As for arm9 series, we have at91 prefix for SoC name, and for armv7 SoC, we don't have at91 prefix, and it now changed to Atmel Smart)

Ok, I look into this.

[...]
>> @@ -57,77 +91,134 @@ static void switch_to_main_crystal_osc(void)
[...]
>> - /* disable watchdog */
>> +void spl_board_init(void)
>> +{
>> + struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
>> +
>> + lowlevel_clock_init();
>> at91_disable_wdt();
>>
>> - /* PMC configuration */
>> - at91_pmc_init();
>> + /*
>> + * At this stage the main oscillator is supposed to be enabled
>> + * PCK = MCK = MOSC
>> + */
>> + writel(0x00, &pmc->pllicpr);
>>
>> - at91_clock_init(CONFIG_SYS_AT91_MAIN_CLOCK);
>> + /* Configure PLLA = MOSC * (PLL_MULA + 1) / PLL_DIVA */
>> + at91_plla_init(CONFIG_SYS_AT91_PLLA);
>>
>> - timer_init();
>> + /* PCK = PLLA = 2 * MCK */
>> + at91_mck_init(CONFIG_SYS_MCKR);
>>
>> - board_early_init_f();
>> + /* Switch MCK on PLLA output */
>> + at91_mck_init(CONFIG_SYS_MCKR_CSS);
>> +
>> +#if defined(CONFIG_SYS_AT91_PLLB)
>> + /* Configure PLLB */
>> + at91_pllb_init(CONFIG_SYS_AT91_PLLB);
>> +#endif
>> +
>> + /* Enable External Reset */
>> + enable_ext_reset();
>>
>> +#if defined(CONFIG_ATMEL_MATRIX_INIT)
>> + /* Initialize matrix */
>> + matrix_init();
>> +#endif
>
> Can this also be weak function? And put matrix_init() code to SoC/board related file.

Changed.

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2014-10-31  6:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30  8:14 [U-Boot] [v2 PATCH 0/12] arm, at91, spl: add spl support for the taurus and corvus boards Heiko Schocher
2014-10-30  8:14 ` [U-Boot] [v2 PATCH 01/12] spi, atmel: move CONFIG_SYS_SPI_WRITE_TOUT into common header Heiko Schocher
2014-10-30  8:14 ` [U-Boot] [v2 PATCH 02/12] arm, at91: add spi dataflash support for the taurus board Heiko Schocher
2014-10-30  8:14 ` [U-Boot] [v2 PATCH 03/12] arm, at91, mpddrc: fix typo in ddr2_init() Heiko Schocher
2014-10-31  1:55   ` Bo Shen
2014-10-31  5:33     ` Heiko Schocher
2014-10-30  8:14 ` [U-Boot] [v2 PATCH 04/12] arm, at91: compile mpddrc ram init code also for AT91SAM9M10G45 Heiko Schocher
2014-10-30  8:14 ` [U-Boot] [v2 PATCH 05/12] arm, at91: add missing ddr2 cr register MPDDRC_CR_EBISHARE define Heiko Schocher
2014-10-30  8:15 ` [U-Boot] [v2 PATCH 06/12] spl, nand: add option to boot raw u-boot.bin image only Heiko Schocher
2014-10-30  8:15 ` [U-Boot] [v2 PATCH 07/12] mtd: atmel_nand: add missign include Heiko Schocher
2014-10-30  8:15 ` [U-Boot] [v2 PATCH 08/12] spl, nand, atmel_nand: add erase one block function Heiko Schocher
2014-10-30 23:16   ` Scott Wood
2014-10-30  8:15 ` [U-Boot] [v2 PATCH 09/12] spl, mtd, nand, atmel_nand: invert device ready pin logic Heiko Schocher
2014-10-30 23:18   ` Scott Wood
2014-10-30  8:15 ` [U-Boot] [v2 PATCH 10/12] arm, spl, at91: add at91sam9260 and at91sam9g45 spl support Heiko Schocher
2014-10-30 10:17   ` Bo Shen
2014-10-30 11:41     ` Heiko Schocher
2014-10-31  1:55       ` Bo Shen
2014-10-31  1:50   ` Bo Shen
2014-10-31  6:03     ` Heiko Schocher [this message]
2014-10-31  6:08     ` Wolfgang Denk
2014-10-30  8:15 ` [U-Boot] [v2 PATCH 11/12] arm, at91, spl: add spl support for the taurus board Heiko Schocher
2014-10-30  8:15 ` [U-Boot] [v2 PATCH 12/12] arm, spl, at91: add spl support for the corvus board Heiko Schocher

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=54532639.9050304@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