public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/8] APM82xxx: Add CPU support
Date: Fri, 27 Aug 2010 11:01:56 +0200	[thread overview]
Message-ID: <201008271101.56269.sr@denx.de> (raw)
In-Reply-To: <1282856744-24383-1-git-send-email-tmarri@apm.com>

Hi Marri,

On Thursday 26 August 2010 23:05:44 tmarri at apm.com wrote:
> From: Tirumala Marri <tmarri@apm.com>
> 
> APM82XXX is a new line of SoCs which are derivatives of
> PPC44X family of processors. This patch adds support of CPU, cache,
> tlb, 32k ocm, bootstraps, PLB and AHB bus.

Thanks. General comment: Please add me on Cc on these PPC4xx
related patches. More comments below.
 
> Signed-off-by: Tirumala R Marri <tmarri@apm.com>
> ---
>  arch/powerpc/cpu/ppc4xx/cpu.c        |   35
> +++++++++++++++++++++++++++++++-- arch/powerpc/cpu/ppc4xx/cpu_init.c   |  
>  9 ++++---
>  arch/powerpc/cpu/ppc4xx/start.S      |   10 +++++++-
>  arch/powerpc/include/asm/processor.h |    1 +
>  4 files changed, 46 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/powerpc/cpu/ppc4xx/cpu.c b/arch/powerpc/cpu/ppc4xx/cpu.c
> index 851065c..5fe5d8c 100644
> --- a/arch/powerpc/cpu/ppc4xx/cpu.c
> +++ b/arch/powerpc/cpu/ppc4xx/cpu.c
> @@ -80,7 +80,8 @@ static int pci_async_enabled(void)
>  #endif /* CONFIG_PCI */
> 
>  #if defined(CONFIG_PCI) && !defined(CONFIG_IOP480) && \
> -    !defined(CONFIG_405) && !defined(CONFIG_405EX)
> +    !defined(CONFIG_405) && !defined(CONFIG_405EX) && \
> +    !defined(CONFIG_APM82XXX)
>  int pci_arbiter_enabled(void)
>  {
>  #if defined(CONFIG_405GP)
> @@ -250,6 +251,21 @@ static char *bootstrap_str[] = {
>  };
>  static char bootstrap_char[] = { 'A', 'B', 'C', 'D', 'E', 'G', 'F', 'H' };
>  #endif
> +#if defined(CONFIG_APM82XXX)
> +#define SDR0_PINSTP_SHIFT       29
> +static char *bootstrap_str[] = {
> +	"RESERVED",
> +	"RESERVED",
> +	"RESERVED",
> +	"NAND (8 bits)",
> +	"NOR  (8 bits)",
> +	"NOR  (8 bits) w/PLL Bypassed",
> +	"I2C (Addr 0x54)",
> +	"I2C (Addr 0x52)",
> +};
> +static char bootstrap_char[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' };
> +#endif
> +
> 
>  #if defined(SDR0_PINSTP_SHIFT)
>  static int bootstrap_option(void)
> @@ -285,7 +301,7 @@ int checkcpu (void)
>  	uint pvr = get_pvr();
>  	ulong clock = gd->cpu_clk;
>  	char buf[32];
> -#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
> +#if defined(CONFIG_460EX) || defined(CONFIG_460GT) ||
> defined(CONFIG_APM82XXX) u32 reg;
>  #endif
> 
> @@ -304,6 +320,8 @@ int checkcpu (void)
> 
>  #if defined(CONFIG_XILINX_440)
>  	puts("IBM PowerPC 4");
> +#elif defined(CONFIG_APM82XXX)
> +	puts("APM PowerPC APM82");
>  #else
>  	puts("AMCC PowerPC 4");
>  #endif
> @@ -316,7 +334,7 @@ int checkcpu (void)
>  #if defined(CONFIG_440)
>  #if defined(CONFIG_460EX) || defined(CONFIG_460GT)
>  	puts("60");
> -#else
> +#elif !defined(CONFIG_APM82XXX)
>  	puts("40");
>  #endif
>  #endif
> @@ -598,7 +616,18 @@ int checkcpu (void)
>  		puts("GX Rev. A");
>  		strcpy(addstr, "No Security support");
>  		break;
> +#if defined(CONFIG_APM82XXX)
> +	case PVR_APM82XXX_RA:
> +		mfsdr(SDR0_ECID3, reg);
> +		if (reg & 0x00200000)
> +			puts("181 Rev. A");
> 
> +		if (reg & 0x00100000)
> +			strcpy(addstr, "No Security support");
> +		else
> +			strcpy(addstr, "Security support");
> +		break;
> +#endif
>  	case PVR_VIRTEX5:
>  		puts("x5 VIRTEX5");
>  		break;
> diff --git a/arch/powerpc/cpu/ppc4xx/cpu_init.c
> b/arch/powerpc/cpu/ppc4xx/cpu_init.c index c04eede..2308051 100644
> --- a/arch/powerpc/cpu/ppc4xx/cpu_init.c
> +++ b/arch/powerpc/cpu/ppc4xx/cpu_init.c
> @@ -35,7 +35,6 @@ DECLARE_GLOBAL_DATA_PTR;
>  #ifndef CONFIG_SYS_PLL_RECONFIG
>  #define CONFIG_SYS_PLL_RECONFIG	0
>  #endif
> -

Why did you remove this empty line?

Please fix and resubmit. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

  reply	other threads:[~2010-08-27  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 21:05 [U-Boot] [PATCH 1/8] APM82xxx: Add CPU support tmarri at apm.com
2010-08-27  9:01 ` Stefan Roese [this message]
2010-08-27  9:20   ` Stefan Roese
2010-08-30 17:17   ` Tirumala Marri

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=201008271101.56269.sr@denx.de \
    --to=sr@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