All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 3/3] mpc83xx: cleanup System Part and Revision ID Register (SPRIDR) code
Date: Fri, 28 Mar 2008 21:01:30 +0100	[thread overview]
Message-ID: <013901c8910e$8416b730$8c442590$@Tjernlund@transmode.se> (raw)
In-Reply-To: <20080328122933.d0489663.kim.phillips@freescale.com>

> -----Original Message-----
> From: Kim Phillips [mailto:kim.phillips at freescale.com]
> Sent: den 28 mars 2008 18:30
> To: joakim.tjernlund at transmode.se
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] [PATCH 3/3] mpc83xx: cleanup System Part and Revision ID Register (SPRIDR)
> code
> 
> On Fri, 28 Mar 2008 16:34:23 +0100
> Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> 
> >
> > Global data, could become a problem if/when full relocation is impl. Not
> > a big deal, just figured I should mention it.
> 
> would you rather something like this then? :
> 
> diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
> index c878268..36de78d 100644
> --- a/cpu/mpc83xx/cpu.c
> +++ b/cpu/mpc83xx/cpu.c
> @@ -35,32 +35,6 @@
> 
>  DECLARE_GLOBAL_DATA_PTR;
> 
> -struct cpu_type {
> -	char name[15];
> -	u32 partid;
> -};
> -
> -#define CPU_TYPE_ENTRY(x) {#x, SPR_##x}
> -
> -struct cpu_type cpu_type_list [] = {
> -	CPU_TYPE_ENTRY(8311),
> -	CPU_TYPE_ENTRY(8313),
> -	CPU_TYPE_ENTRY(8314),
> -	CPU_TYPE_ENTRY(8315),
> -	CPU_TYPE_ENTRY(8321),
> -	CPU_TYPE_ENTRY(8323),
> -	CPU_TYPE_ENTRY(8343),
> -	CPU_TYPE_ENTRY(8347_TBGA_),
> -	CPU_TYPE_ENTRY(8347_PBGA_),
> -	CPU_TYPE_ENTRY(8349),
> -	CPU_TYPE_ENTRY(8358_TBGA_),
> -	CPU_TYPE_ENTRY(8358_PBGA_),
> -	CPU_TYPE_ENTRY(8360),
> -	CPU_TYPE_ENTRY(8377),
> -	CPU_TYPE_ENTRY(8378),
> -	CPU_TYPE_ENTRY(8379),
> -};
> -
>  int checkcpu(void)
>  {
>  	volatile immap_t *immr;
> @@ -70,6 +44,29 @@ int checkcpu(void)
>  	char buf[32];
>  	int i;
> 
> +#define CPU_TYPE_ENTRY(x) {#x, SPR_##x}
> +	const struct cpu_type {
> +		char name[15];
> +		u32 partid;
> +	} cpu_type_list [] = {
> +		CPU_TYPE_ENTRY(8311),
> +		CPU_TYPE_ENTRY(8313),
> +		CPU_TYPE_ENTRY(8314),
> +		CPU_TYPE_ENTRY(8315),
> +		CPU_TYPE_ENTRY(8321),
> +		CPU_TYPE_ENTRY(8323),
> +		CPU_TYPE_ENTRY(8343),
> +		CPU_TYPE_ENTRY(8347_TBGA_),
> +		CPU_TYPE_ENTRY(8347_PBGA_),
> +		CPU_TYPE_ENTRY(8349),
> +		CPU_TYPE_ENTRY(8358_TBGA_),
> +		CPU_TYPE_ENTRY(8358_PBGA_),
> +		CPU_TYPE_ENTRY(8360),
> +		CPU_TYPE_ENTRY(8377),
> +		CPU_TYPE_ENTRY(8378),
> +		CPU_TYPE_ENTRY(8379),
> +	};
> +
>  	immr = (immap_t *)CFG_IMMR;
> 
>  	puts("CPU:   ");
> 
> Kim

It is still global data, but the const makes it smaller and should
be there if accepted. Like I said, it is just a minor comment as
u-boot isn't ready for full relocation yet.

BTW, what happened to relocation stuff Grant was doing? It is
still disabled, I never had any problems so perhaps time to
turn it on again? it might even make u-boot smaller once all the
old manuel relocation code has been properly disabled.

 Jocke

  reply	other threads:[~2008-03-28 20:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 15:19 [U-Boot-Users] [PATCH 3/3] mpc83xx: cleanup System Part and Revision ID Register (SPRIDR) code Kim Phillips
2008-03-28 15:34 ` Joakim Tjernlund
2008-03-28 17:29   ` Kim Phillips
2008-03-28 20:01     ` Joakim Tjernlund [this message]
2008-03-28 22:41       ` Kim Phillips
2008-03-28 23:12         ` Grant Likely
2008-03-28 23:27           ` Joakim Tjernlund

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='013901c8910e$8416b730$8c442590$@Tjernlund@transmode.se' \
    --to=joakim.tjernlund@transmode.se \
    --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.