From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 21 Mar 2007 17:07:40 +0100 Subject: [U-Boot-Users] [Fwd: [PATCH] Add Uboot ASMP suport for MPC8641D] In-Reply-To: <1174489696.6595.467.camel@ld0161-tx32> References: <1174489696.6595.467.camel@ld0161-tx32> Message-ID: <200703211707.41158.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. > 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 =====================================================================