All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] 86xx: Cleanup MP support
Date: Wed, 01 Apr 2009 21:00:11 +0200	[thread overview]
Message-ID: <20090401190011.C2C5883797DC@gemini.denx.de> (raw)
In-Reply-To: <1238601989-6251-1-git-send-email-galak@kernel.crashing.org>

Dear Kumar Gala,

In message <1238601989-6251-1-git-send-email-galak@kernel.crashing.org> you wrote:
> * Use CONFIG_MP instead of CONFIG_NUM_CPUS to match 85xx
> * Introduce determine_mp_bootpg() helper.  We'll need this to address a
>   bug introduced in v2009.03 with 86xx MP booting.  We have to make sure
>   to reserve the region of memory used for the MP bootpg() so other
>   u-boot code doesn't use it.
> * Added dummy versions of cpu_status() & cpu_release() to allow cmd_mp.c
>   to build and work.  In the future we should look at implementing
>   cpu_release().  This could be common w/85xx if we use spin tables on
>   86xx.
...
> diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
> index 1e35dfa..ef0095a 100644
> --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
> +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
> @@ -375,7 +375,7 @@ void board_reset(void)
>  		;
>  }
>  
> -#if (CONFIG_NUM_CPUS > 1)
> +#ifdef CONFIG_MP
>  extern void cpu_mp_lmb_reserve(struct lmb *lmb);

We should have a prototype somewhere, and get rid of this extern.

...
> diff --git a/cpu/mpc86xx/Makefile b/cpu/mpc86xx/Makefile
> index 34a9755..f1af64e 100644
> --- a/cpu/mpc86xx/Makefile
> +++ b/cpu/mpc86xx/Makefile
> @@ -31,10 +31,9 @@ LIB	= $(obj)lib$(CPU).a
>  START	= start.o
>  SOBJS	= cache.o
>  
> -ifneq ($(CONFIG_NUM_CPUS),1)
> -COBJS-y += mp.o
> -SOBJS += release.o
> -endif
> +SOBJS-$(CONFIG_MP) += release.o
> +SOBJS	+= $(SOBJS-y)
> +COBJS-$(CONFIG_MP) += mp.o
>  COBJS-y	+= traps.o
>  COBJS-y	+= cpu.o
>  COBJS-y	+= cpu_init.o

Please keep list sorted.

...
> diff --git a/cpu/mpc86xx/mp.c b/cpu/mpc86xx/mp.c
> index 5014401..e17f5e1 100644
> --- a/cpu/mpc86xx/mp.c
> +++ b/cpu/mpc86xx/mp.c
> @@ -8,16 +8,42 @@
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> -#if (CONFIG_NUM_CPUS > 1)
> -void cpu_mp_lmb_reserve(struct lmb *lmb)
> +int cpu_reset(int nr)
> +{
> +	volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
> +	volatile ccsr_pic_t *pic = &immr->im_pic;
> +	out_be32(&pic->pir, 1 << nr);
> +	(void)in_be32(&pic->pir);
> +	out_be32(&pic->pir, 0x0);

Please add some comment to explain what you are doing here, and why.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An age is called Dark not because  the  light  fails  to  shine,  but
because people refuse to see it.           -- James Michener, "Space"

  parent reply	other threads:[~2009-04-01 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 16:06 [U-Boot] [PATCH v2 1/3] 86xx: Cleanup MP support Kumar Gala
2009-04-01 16:06 ` [U-Boot] [PATCH 2/3] 85xx: Introduce determine_mp_bootpg() helper Kumar Gala
2009-04-01 16:06   ` [U-Boot] [PATCH 3/3] 85xx/86xx: Ensure MP boot page is not used Kumar Gala
2009-04-01 19:00     ` Wolfgang Denk
2009-04-01 18:35   ` [U-Boot] [PATCH 2/3] 85xx: Introduce determine_mp_bootpg() helper Becky Bruce
2009-04-01 18:34 ` [U-Boot] [PATCH v2 1/3] 86xx: Cleanup MP support Becky Bruce
2009-04-01 19:00 ` Wolfgang Denk [this message]
2009-04-01 20:11 ` Kim Phillips
2009-04-01 20:15   ` Kumar Gala

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=20090401190011.C2C5883797DC@gemini.denx.de \
    --to=wd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.