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] [PATCH v2 1/2] APM82xxx: Add CPU and other peripheral support
Date: Fri, 3 Sep 2010 09:46:22 +0200	[thread overview]
Message-ID: <201009030946.22440.sr@denx.de> (raw)
In-Reply-To: <20100902190137.5AEB9153781@gemini.denx.de>

Hi Wolfgang,

On Thursday 02 September 2010 21:01:37 Wolfgang Denk wrote:
> Hm.., the whole CPU ID code in "arch/powerpc/cpu/ppc4xx/cpu.c" has
> become a mess.
> 
> Stefan:
> 
> is there any deeper logic for the repeated #ifdef's there, when we
> finally do a switch on the PVR anyway?
> 
> Instead of painstakingly concatenating  "AMCC PowerPC 4" with "05"
> and later "GP Rev. B" we could shrink this into a plain
> 
> 	case PVR_405GP_RB:
> 		puts("AMCC PowerPC 405GP Rev. B");
> 		break;
> 
> Or am I missing something?

IIRC, then the main reason for this is the code size reduction. Using your 
version would increase the code size quite a bit. But I concur, it would be 
much better readable. So just let me know, and I'll try to come up with a 
patch cleaning this up a bit.

> Let's get rid of all these nested #ifdef's...

As described in some comments, the problem is that some SoC's have the same 
PVR (for example 440EP rev C and 440GR rev B have same PVR). I have no idea 
how this identification could be solved without such ifdef's.

But you are right. Some of the ifdef's can be removed. Again, this would also 
result in a bigger image size though.

Cheers,
Stefan

--
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-09-03  7:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02  1:16 [U-Boot] [PATCH v2 1/2] APM82xxx: Add CPU and other peripheral support tmarri at apm.com
2010-09-02 11:55 ` Wolfgang Denk
2010-09-02 18:01   ` Tirumala Marri
2010-09-02 19:01     ` Wolfgang Denk
2010-09-03  7:46       ` Stefan Roese [this message]
2010-09-03  8:32         ` Wolfgang Denk
2010-09-03 11:26           ` Stefan Roese
2010-09-03  1:48   ` Tirumala Marri
2010-09-03  7:18     ` Stefan Roese

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=201009030946.22440.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.