]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
ppc4xx: Cleanup of PVR detection code in cpu.c
authorStefan Roese <sr@denx.de>
Fri, 3 Sep 2010 11:27:02 +0000 (13:27 +0200)
committerStefan Roese <sr@denx.de>
Thu, 23 Sep 2010 07:02:06 +0000 (09:02 +0200)
commite02d44964407716104c78d72170a086052c64e86
tree9ece2861dad4076dbd231638d3b9edb500ea728a
parent5b9144638e7d4c86e0470e21869b341278e183c3
ppc4xx: Cleanup of PVR detection code in cpu.c

This patch cleans the PVR detection code in check_cpu() up a bit.
Basically the strings are better seperated, resulting in an easier
to understand and maintain code version.

The #ifdef's couldn't be removed easily because of two reasons:

- Some SoC revisions have the same PVR, so need a way to differentiate
  between those two SoC's.
- In some case statements registers only available in this SoC variant
  are referenced.

Instead I moved the CONFIG_440 #ifdef a bit, so that 405 platforms don't
add this 440 detection code and vice versa. Resulting in this U-Boot
image size change:

405EX (Kilauea):     408 bytes less
440EPx (Sequoia):    604 bytes less
460EX (Canyonlands): 564 bytes less

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
arch/powerpc/cpu/ppc4xx/cpu.c