All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [Fwd: [PATCH] Add Uboot ASMP suport for MPC8641D]
Date: Wed, 21 Mar 2007 17:07:40 +0100	[thread overview]
Message-ID: <200703211707.41158.sr@denx.de> (raw)
In-Reply-To: <1174489696.6595.467.camel@ld0161-tx32>

Hi Jon,

On Wednesday 21 March 2007 16:08, Jon Loeliger wrote:
> As I indicated to you on IRC a few days ago, here is the
> U-Boot patch to support Asymmetric Multi-Processors on 8641 HPCN.
> This corresponds to the patch I also just posted to the
> linuxppc-dev list as well.

<snip>

> diff --git a/drivers/serial.c b/drivers/serial.c
> index 76425d8..15cf0ae 100644
> --- a/drivers/serial.c
> +++ b/drivers/serial.c
> @@ -153,6 +153,11 @@ int serial_init (void)
>  {
>  	int clock_divisor;
>
> +#ifdef CONFIG_ASMP
> +	if (gd->pir ==1)
> +		return 0;
> +#endif
> +
>  #ifdef CFG_NS87308
>  	initialise_ns87308();
>  #endif
> @@ -233,7 +238,11 @@ serial_putc_dev(unsigned int dev_index,const char c)
>  void
>  serial_putc(const char c)
>  {
> +#ifdef CONFIG_ASMP
> +	_serial_putc(c,CONFIG_CONS_INDEX + gd->pir);
> +#else
>  	_serial_putc(c,CONFIG_CONS_INDEX);
> +#endif
>  }
>  #endif

Isn't there a clever way not to add all those new #ifdef's?

o We could always use gd->pir, even if CONFIG_ASMP is
  not enabled and initialize it to 0. This of course would
  increase the size for all targets a little which generally
  not good.

o Use a macro which doesn't generate any additional code

Any good ideas?

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
=====================================================================

      reply	other threads:[~2007-03-21 16:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 15:08 [U-Boot-Users] [Fwd: [PATCH] Add Uboot ASMP suport for MPC8641D] Jon Loeliger
2007-03-21 16:07 ` Stefan Roese [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=200703211707.41158.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 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.