public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Allen Martin <amartin@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 11/14] tegra20: Remove CPU init code from tegra20 u-boot
Date: Mon, 11 Jun 2012 15:53:53 -0700	[thread overview]
Message-ID: <20120611225353.GI6633@nvidia.com> (raw)
In-Reply-To: <CAPnjgZ3SLuC_bg9cRAXGGmm6C14JvuKM=-b9HXfphKkFqmv90Q@mail.gmail.com>

On Sat, Jun 09, 2012 at 12:19:48PM -0700, Simon Glass wrote:
> Hi Allen,
> 
> On Fri, Jun 8, 2012 at 2:16 PM, Allen Martin <amartin at nvidia.com<mailto:amartin@nvidia.com>> wrote:
> This code is now included in the tegra20 SPL
> 
> Signed-off-by: Allen Martin <amartin at nvidia.com<mailto:amartin@nvidia.com>>
> ---
>  arch/arm/cpu/armv7/start.S          |    2 -
>  arch/arm/cpu/tegra20-common/ap20.c  |  258 +----------------------------------
>  arch/arm/cpu/tegra20-common/board.c |   23 +---
>  include/configs/tegra20-common.h    |    4 -
>  4 files changed, 4 insertions(+), 283 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
> index 5b88c55..786152f 100644
> --- a/arch/arm/cpu/armv7/start.S
> +++ b/arch/arm/cpu/armv7/start.S
> @@ -347,27 +114,8 @@ void init_pmc_scratch(void)
>        writel(odmdata, &pmc->pmc_scratch20);
>  }
> 
> -void tegra20_start(void)
> +void lowlevel_init(void)
>  {
> -       struct pmux_tri_ctlr *pmt = (struct pmux_tri_ctlr *)NV_PA_APB_MISC_BASE;
> -
> -       /* If we are the AVP, start up the first Cortex-A9 */
> -       if (!ap20_cpu_is_cortexa9()) {
> -               /* enable JTAG */
> -               writel(0xC0, &pmt->pmt_cfg_ctl);
> -
> -               /*
> -                * If we are ARM7 - give it a different stack. We are about to
> -                * start up the A9 which will want to use this one.
> -                */
> -               asm volatile("mov       sp, %0\n"
> -                       : : "r"(AVP_EARLY_BOOT_STACK_LIMIT));
> -
> -               start_cpu((u32)_start);
> -               halt_avp();
> -               /* not reached */
> -       }
> -
>        /* Init PMC scratch memory */
>        init_pmc_scratch();
> 
> There is a FIXME comment immediately after this:
> 
> /* FIXME: should have ap20's L2 disabled too? */
> 
> Does this still apply?

I'm not sure what the origin of that comment was, but AFAIK the L2
will always be disabled on reset until we explicitly enable it, so I'm
not sure what the comment is referring to.

> 
> diff --git a/arch/arm/cpu/tegra20-common/board.c b/arch/arm/cpu/tegra20-common/board.c
> index 70e5373..74610e5 100644
> --- a/arch/arm/cpu/tegra20-common/board.c
> +++ b/arch/arm/cpu/tegra20-common/board.c
> @@ -23,12 +23,12 @@
> 
>  #include <common.h>
>  #include <asm/io.h>
> -#include <asm/arch/ap20.h>
>  #include <asm/arch/clock.h>
>  #include <asm/arch/funcmux.h>
>  #include <asm/arch/pmc.h>
>  #include <asm/arch/sys_proto.h>
>  #include <asm/arch/tegra20.h>
> +#include <asm/arch/warmboot.h>
> 
>  DECLARE_GLOBAL_DATA_PTR;
> 
> @@ -85,27 +85,6 @@ int checkboard(void)
>  }
>  #endif /* CONFIG_DISPLAY_BOARDINFO */
> 
> -#ifdef CONFIG_ARCH_CPU_INIT
> -/*
> - * Note this function is executed by the ARM7TDMI AVP. It does not return
> - * in this case. It is also called once the A9 starts up, but does nothing in
> - * that case.
> - */
> -int arch_cpu_init(void)
> -{
> -       /* Fire up the Cortex A9 */
> -       tegra20_start();
> -
> -       /* We didn't do this init in start.S, so do it now */
> -       cpu_init_cp15();
> -
> -       /* Initialize essential common plls */
> -       clock_early_init();
> 
> What happens to clock_early_init() with this patch? Is it called somewhere else?

Yes, it gets called from the SPL now in board_init_r()
arch/arm/cpu/arm720t/tegra20/spl.c 

-Allen
-- 
nvpublic

  reply	other threads:[~2012-06-11 22:53 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 21:15 [U-Boot] [PATCH v3 0/14] split tegra20 arm7 code into separate SPL Allen Martin
2012-06-08 21:15 ` [U-Boot] [PATCH v3 01/14] tegra20: rename tegra2 -> tegra20 Allen Martin
2012-06-08 21:54   ` Tom Warren
2012-06-12 19:55     ` Allen Martin
2012-06-08 21:15 ` [U-Boot] [PATCH v3 02/14] tegra20: move tegra20 SoC code to arch/arm/cpu/tegra20-common Allen Martin
2012-06-08 21:15 ` [U-Boot] [PATCH v3 03/14] tegra20: rename CONFIG_MACH_TEGRA_GENERIC Allen Martin
2012-06-08 21:15 ` [U-Boot] [PATCH v3 04/14] mkconfig: add support for SPL CPU Allen Martin
2012-06-09 18:20   ` Simon Glass
2012-06-11 18:40     ` Allen Martin
2012-06-08 21:15 ` [U-Boot] [PATCH v3 05/14] ARM: Fix arm720t SPL build Allen Martin
2012-06-08 21:15 ` [U-Boot] [PATCH v3 06/14] tegra20: remove timer_init from " Allen Martin
2012-06-08 21:16 ` [U-Boot] [PATCH v3 07/14] ARM: add tegra20 support to arm720t Allen Martin
2012-06-08 21:48   ` Tom Warren
2012-06-09  5:15   ` Stephen Warren
2012-06-09 18:32   ` Simon Glass
2012-06-11 19:01     ` Allen Martin
2012-06-08 21:16 ` [U-Boot] [PATCH v3 08/14] tegra20: add SPL config options for tegra20 boards Allen Martin
2012-06-09  5:19   ` Stephen Warren
2012-06-09  6:30     ` Allen Martin
2012-06-09 18:35   ` Simon Glass
2012-06-11 19:05     ` Allen Martin
2012-06-11 20:17       ` Simon Glass
2012-06-08 21:16 ` [U-Boot] [PATCH v3 09/14] tegra20: add u-boot.t2 target Allen Martin
2012-06-09  5:21   ` Stephen Warren
2012-06-11 19:09     ` Allen Martin
2012-06-09 19:12   ` Simon Glass
2012-06-11 19:22     ` Allen Martin
2012-06-11 20:21       ` Simon Glass
2012-06-11 23:09         ` Allen Martin
2012-06-12  0:16           ` Simon Glass
2012-06-08 21:16 ` [U-Boot] [PATCH v3 10/14] tegra: move SDRAM param save to later in boot Allen Martin
2012-06-09 19:15   ` Simon Glass
2012-06-11 22:38     ` Allen Martin
2012-06-08 21:16 ` [U-Boot] [PATCH v3 11/14] tegra20: Remove CPU init code from tegra20 u-boot Allen Martin
2012-06-09 19:19   ` Simon Glass
2012-06-11 22:53     ` Allen Martin [this message]
2012-06-12  0:15       ` Simon Glass
2012-06-08 21:16 ` [U-Boot] [PATCH v3 12/14] tegra20: Remove armv4t build flags Allen Martin
2012-06-09  5:24   ` Stephen Warren
2012-06-09  6:34     ` Allen Martin
2012-06-09 19:23       ` Simon Glass
2012-06-09 19:23   ` Simon Glass
2012-06-08 21:16 ` [U-Boot] [PATCH v3 13/14] tegra20: plutux: change obj directory mkdir commands Allen Martin
2012-06-09  5:29   ` Stephen Warren
2012-06-09  6:36     ` Allen Martin
2012-06-09 19:26   ` Simon Glass
2012-06-08 21:16 ` [U-Boot] [PATCH v3 14/14] tegra20: tec: add tegra20-common-post.h Allen Martin
2012-06-11  9:23   ` Thierry Reding
2012-06-09  5:30 ` [U-Boot] [PATCH v3 0/14] split tegra20 arm7 code into separate SPL Stephen Warren
2012-06-09 19:44 ` Simon Glass

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=20120611225353.GI6633@nvidia.com \
    --to=amartin@nvidia.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