[U-Boot] [PATCH v2 00/10] Rework MPC512x Support

Wolfgang Denk wd at denx.de
Sat May 16 10:47:36 CEST 2009


The following patch series includes a heavy rework of the existing
code for MPC512x processors.  The changes include especially:

- move common files from mpc5121ads (so far ads5121) board to common
  directory so they can be reused by other boards based on the same
  CPU
- rename "ads5121" into "freescale/mpc5121ads" so the same board name
  as in Linux is used, and the vendor directory is correct
- rework the whole MPC512x related code to use I/O acessors (i. e.
  in_*() and out_*() functions) instead of deprecated pointer accesses
- Don't #define register offsets, but use the offset from the
  respective C structs instead [1]
- remove include/mpc512x.h to avoid duplication of the same
  information in include/asm-ppc/immap_512x.h
- add support for the ARIA board, a MPC5121e based COM Express module

[1] Note: It was not possible to get completely rid of #define'd
register offsets yet, as some are used in cpu/mpc512x/start.S, and in
assembly the available options are limited. In Linux, the required
header files with the respective #define's are auto-generated from the
C struct definitions. We intend to do the same, but this needs
co-ordinations across architectures - for example, Blackfin already
uses such an approach. For now, we created cpu/mpc512x/asm-offsets.h;
this file will be removed again as soon as auto-generation works.


Patches are against current "next" branch; each commit has been
compile and run-time tested on the "mpc5121ads" board; the last patch
(adding support for ARIA) has been compile and run-time tested on
both the "mpc5121ads" and the "aria" boards. Run-time testing inclu-
ded at least serial console, network, flash, cold boot (power-on) and
warm boot (reset).

Changes since V1: only organizational, i. e. squashing related
patches into one, reducing the total number of commits from 29 to 10.
The resulting code is still exactly the same (except for one line
difference in a comment).

Patch overview:

[PATCH 01/10] mpc512x: change cpu/mpc512x/Makefile to use Kconfig style
[PATCH 02/10] mpc512x: Move common files to share them by several boards
[PATCH 03/10] cpu/mpc512x/pci.c: minor coding style cleanup
[PATCH 04/10] cpu/mpc512x/diu.c: fix warning: assignment from incompatible pointer type
[PATCH 05/10] Rename ads5121 board into mpc5121ads
[PATCH 06/10] MPC512x: add more hardware description to immap_512x.h
[PATCH 07/10] MPC512x: use I/O accessors instead of pointer accesses
[PATCH 08/10] MPC512x FEC: get rid of duplicated struct ethernet_regs
[PATCH 09/10] MPC512x: remove include/mpc512x.h
[PATCH 10/10] MPC512x: add support for ARIA board

Signed-off-by: Wolfgang Denk <wd at denx.de>
Cc: John Rigby <jcrigby at gmail.com>
---
Summary statistics:

 MAINTAINERS                             |    2 +
 MAKEALL                                 |    3 +-
 Makefile                                |   10 +-
 board/ads5121/Makefile                  |   57 ---
 board/ads5121/README                    |    7 -
 board/ads5121/ads5121.c                 |  432 -------------------
 board/ads5121/ads5121_diu.c             |  193 ---------
 board/ads5121/config.mk                 |   23 -
 board/ads5121/pci.c                     |  213 ----------
 board/ads5121/u-boot.lds                |  121 ------
 board/davedenx/aria/Makefile            |   53 +++
 board/davedenx/aria/aria.c              |  317 ++++++++++++++
 board/davedenx/aria/config.mk           |   23 +
 board/freescale/mpc5121ads/Makefile     |   53 +++
 board/freescale/mpc5121ads/README       |    7 +
 board/freescale/mpc5121ads/config.mk    |   23 +
 board/freescale/mpc5121ads/mpc5121ads.c |  339 +++++++++++++++
 common/cmd_ide.c                        |    4 -
 cpu/mpc512x/Makefile                    |   16 +-
 cpu/mpc512x/asm-offsets.h               |   15 +
 cpu/mpc512x/config.mk                   |    6 +-
 cpu/mpc512x/cpu.c                       |    1 -
 cpu/mpc512x/cpu_init.c                  |   27 +-
 cpu/mpc512x/diu.c                       |  189 +++++++++
 cpu/mpc512x/i2c.c                       |   57 ++--
 cpu/mpc512x/ide.c                       |  128 ++++++
 cpu/mpc512x/iopin.c                     |   10 +-
 cpu/mpc512x/pci.c                       |  227 ++++++++++
 cpu/mpc512x/serial.c                    |   64 ++--
 cpu/mpc512x/speed.c                     |   24 +-
 cpu/mpc512x/start.S                     |    6 +-
 cpu/mpc512x/u-boot.lds                  |  121 ++++++
 drivers/net/mpc512x_fec.c               |  170 ++++----
 drivers/net/mpc512x_fec.h               |  155 +-------
 include/asm-ppc/immap_512x.h            |  577 +++++++++++++++++++++++++-
 include/common.h                        |    3 +-
 include/configs/ads5121.h               |  550 ------------------------
 include/configs/aria.h                  |  554 ++++++++++++++++++++++++
 include/configs/mpc5121ads.h            |  550 ++++++++++++++++++++++++
 include/mpc512x.h                       |  702 -------------------------------
 40 files changed, 3407 insertions(+), 2625 deletions(-)



More information about the U-Boot mailing list