All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/6] mpc5121: add support for PDM360NG board
Date: Wed, 24 Feb 2010 11:27:45 +0100	[thread overview]
Message-ID: <20100224112745.0b2f2d99@wker> (raw)
In-Reply-To: <m2iq9nxaso.fsf@ohwell.denx.de>

Hi Detlev,

Detlev Zundel <dzu@denx.de> wrote:

> > Signed-off-by: Michael Weiss michael.weiss at ifm.com
> 
> Please fix the e-mail format.

Ok.

> > @@ -820,6 +820,9 @@ aria_config:	unconfig
> >  mecp5123_config:	unconfig
> >  	@$(MKCONFIG) -a mecp5123 ppc mpc512x mecp5123 esd
> >  
> > +pdm360ng_config:	unconfig
> > +	@$(MKCONFIG) -a pdm360ng ppc mpc512x pdm360ng
> > +
> >  mpc5121ads_config \
> >  mpc5121ads_rev2_config	\
> >  	: unconfig
> 
> Keep the list of targets sorted in the Makefile please.

Ok!

> > +/*
> > + * Co-Processor communication POST
> > + */
> > +#if defined(CONFIG_POST) && defined(CONFIG_SERIAL_MULTI)
> 
> Why is this depending on SERIAL_MULTI?  The POST system as such is
> orthogonal, no?

Currently there is only Coprocessor POST only which depends
on SERIAL_MULTI. I think I should better do something like:

#if defined(CONFIG_POST)
#if defined(CONFIG_SERIAL_MULTI)
/* Co-Processor POST code */
...
#endif
#endif

Even better would be to move POST code to separate file, it seems.

> > +
> > +#if defined(CONFIG_SYS_POST_WORD_ADDR)
> > +# define _POST_ADDR	(CONFIG_SYS_POST_WORD_ADDR)
> > +#else
> > +#error echo "No POST word address defined"
> > +#endif
> > +
> > +void post_word_store(ulong a)
> > +{
> > +	volatile void *save_addr = (volatile void *)(_POST_ADDR);
> > +
> > +	out_be32(save_addr, a);
> > +}
> > +
> > +ulong post_word_load(void)
> > +{
> > +	volatile void *save_addr = (volatile void *)(_POST_ADDR);
> > +
> > +	return in_be32(save_addr);
> > +}
> 
> Can't we put this into 512x shared code?  I really dislike putting this
> into board code.  I know that 5200 set a precedent here, but they all
> have identical code.  One should rather fix 5200 also.

I'll move it to cpu/mpc512x/commproc.c.

...
> > +	ret = read_port(cop_port, buf, sizeof(buf));
> > +	close_port(1);
> > +	if (ret <= 0) {
> > +		post_log("Error: Can't read WD Coprocessor port.\n");
> > +		return -1;
> > +	}
> > +
> > +	if (strcmp(buf, alive)) {
> > +		post_log("Error: WD-Cop. resp.: %s\n", buf);
> > +		return -1;
> > +	}
> > +
> > +	return 0;
> > +}
> > +#endif	/* CONFIG_POST */
> 
> Wouldn't it be a good idea to split the POST stuff into a separate file?

I'll move it to a separate file.

> > +/* Use SRAM for initial stack */
> > +#define CONFIG_SYS_INIT_RAM_ADDR	CONFIG_SYS_SRAM_BASE	/* Initial RAM address */
> > +#define CONFIG_SYS_INIT_RAM_END		CONFIG_SYS_SRAM_SIZE	/* End of used area in RAM */
> > +
> > +#define CONFIG_SYS_GBL_DATA_SIZE	0x100			/* num bytes initial data */
> > +#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
> > +#define CONFIG_SYS_POST_WORD_ADDR	(CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
> > +#define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_POST_WORD_ADDR
> 
> Isn't this shared among the 512x implementations so we can put it in a
> common file?

Yes, we should put it in a common file.

Thanks,
Anatolij

--
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-02-24 10:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 22:37 [U-Boot] [PATCH 0/6] Add support for PDM360NG board Anatolij Gustschin
2010-02-23 22:37 ` [U-Boot] [PATCH 1/6] mpc512x: make MEM IO Control configuration a board config option Anatolij Gustschin
2010-02-23 22:37   ` [U-Boot] [PATCH 2/6] mpc512x: add multi serial PSC support Anatolij Gustschin
2010-02-23 22:37     ` [U-Boot] [PATCH 3/6] mpc5121: add PSC serial communication routines Anatolij Gustschin
2010-02-23 22:37       ` [U-Boot] [PATCH 4/6] fsl_diu_fb.c: add support for RLE8 bitmaps Anatolij Gustschin
2010-02-23 22:37         ` [U-Boot] [PATCH 5/6] fdt_support: add partitions fixup in mtd node Anatolij Gustschin
2010-02-23 22:37           ` [U-Boot] [PATCH 6/6] mpc5121: add support for PDM360NG board Anatolij Gustschin
2010-02-24  9:06             ` Detlev Zundel
2010-02-24 10:27               ` Anatolij Gustschin [this message]
2010-03-21 11:03             ` Wolfgang Denk
2010-03-21 10:33           ` [U-Boot] [PATCH 5/6] fdt_support: add partitions fixup in mtd node Wolfgang Denk
2010-03-21 17:49             ` Gerald Van Baren
2010-02-23 22:49         ` [U-Boot] [PATCH 4/6] fsl_diu_fb.c: add support for RLE8 bitmaps Wolfgang Denk
2010-02-24 10:03           ` Anatolij Gustschin
2010-03-22  2:32             ` Timur Tabi
2010-03-21 10:31         ` Wolfgang Denk
2010-03-21 10:26       ` [U-Boot] [PATCH 3/6] mpc5121: add PSC serial communication routines Wolfgang Denk
2010-03-21 10:25     ` [U-Boot] [PATCH 2/6] mpc512x: add multi serial PSC support Wolfgang Denk
2010-03-21 10:25   ` [U-Boot] [PATCH 1/6] mpc512x: make MEM IO Control configuration a board config option Wolfgang Denk

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=20100224112745.0b2f2d99@wker \
    --to=agust@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.