Skip to content

Rework MPC512x Support

Wolfgang Denk u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest29 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/29mpc512x: change cpu/mpc512x/Makefile to use Kconfig stylecpu/mpc512x/Makefile+3 -40 replies
2/29mpc512x: Move common files to share them by several boardsboard/ads5121/Makefile board/ads5121/ads5121.c board/ads5121/ads5121_diu.c +7 more+533 -5330 replies
3/29cpu/mpc512x/pci.c: minor coding style cleanupcpu/mpc512x/pci.c+3 -60 replies
4/29cpu/mpc512x/diu.c: fix warning: assignment from incompatible pointer typecpu/mpc512x/diu.c+1 -10 replies
5/29Rename ads5121 board into mpc5121adsMAKEALL Makefile board/ads5121/Makefile +9 more+1070 -10701 reply
5/29Rename ads5121 board into mpc5121ads+0 -00 replies
6/29MPC512x: add more hardware description to immap_512x.hboard/freescale/mpc5121ads/mpc5121ads.c cpu/mpc512x/iopin.c include/asm-ppc/immap_512x.h+251 -80 replies
7/29mpc5121ads: use I/O accessors instead of pointer accessesboard/freescale/mpc5121ads/mpc5121ads.c+107 -1010 replies
8/29MPC512x: add support for ARIA boardMAINTAINERS MAKEALL Makefile +4 more+1043 -12 replies
8/29MPC512x: add support for ARIA board+0 -00 replies
8/29MPC512x: add support for ARIA board+0 -00 replies
9/29cpu/mpc512x/iopin.c: convert to use I/O acessors.cpu/mpc512x/iopin.c+3 -20 replies
10/29cpu/mpc512x/iopin.c: remove redundant include of <asm/immap_512x.h>cpu/mpc512x/iopin.c+0 -10 replies
11/29MPC512x: prepare removal of include/mpc512x.hcpu/mpc512x/asm-offsets.h cpu/mpc512x/start.S include/asm-ppc/immap_512x.h +1 more+341 -3190 replies
12/29include/configs/mpc5121ads.h: prepare removal of include/mpc512x.hinclude/configs/mpc5121ads.h+2 -20 replies
13/29include/configs/aria.h: prepare removal of include/mpc512x.hinclude/configs/aria.h+2 -20 replies
14/29common/cmd_ide.c: prepare removal of include/mpc512x.hcommon/cmd_ide.c+0 -40 replies
15/29cpu/mpc512x/cpu.c: prepare removal of include/mpc512x.hcpu/mpc512x/cpu.c+0 -10 replies
16/29cpu/mpc512x/cpu_init.c: prepare removal of include/mpc512x.hcpu/mpc512x/cpu_init.c+0 -10 replies
17/29cpu/mpc512x/cpu_init.c: use I/O accessors instead of pointer accessescpu/mpc512x/cpu_init.c+15 -90 replies
18/29cpu/mpc512x/speed.c: prepare removal of include/mpc512x.hcpu/mpc512x/speed.c+0 -10 replies
19/29cpu/mpc512x/speed.c: use I/O accessors instead of pointer accessescpu/mpc512x/speed.c+15 -60 replies
20/29cpu/mpc512x/serial.c: use I/O accessors instead of pointer accessescpu/mpc512x/serial.c+32 -300 replies
21/29cpu/mpc512x/i2c.c: prepare removal of include/mpc512x.hcpu/mpc512x/i2c.c+0 -11 reply
22/29cpu/mpc512x/i2c.c: use immr offsets from C struct instead of #definecpu/mpc512x/i2c.c+20 -131 reply
22/29cpu/mpc512x/i2c.c: use immr offsets from C struct instead of #define+0 -01 reply
22/29cpu/mpc512x/i2c.c: use immr offsets from C struct instead of #define+0 -00 replies
23/29cpu/mpc512x/i2c.c: use I/O accessors instead of pointer accessescpu/mpc512x/i2c.c+11 -141 reply
24/29cpu/mpc512x/pci.c: use I/O accessors instead of pointer accessescpu/mpc512x/pci.c+43 -270 replies
25/29drivers/net/mpc512x_fec.c: prepare removal of include/mpc512x.hdrivers/net/mpc512x_fec.c+12 -50 replies
26/29MPC512x FEC: remove duplicated code and data typesdrivers/net/mpc512x_fec.c drivers/net/mpc512x_fec.h+148 -1540 replies
27/29drivers/net/mpc512x_fec.c: use I/O accessors instead of pointer accessesdrivers/net/mpc512x_fec.c+64 -490 replies
28/29MPC512x FEC: get rid of duplicated struct ethernet_regsdrivers/net/mpc512x_fec.c drivers/net/mpc512x_fec.h+5 -1320 replies
29/29Remove include/mpc512x.hinclude/common.h include/mpc512x.h+0 -3860 replies

Reviews trailers per patch

2 of 34 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchHeiko SchocherBen Warren
SeriesA-b
1/29
2/29
3/29
4/29
5/29
5/29
6/29
7/29
8/29
8/29
8/29
9/29
10/29
11/29
12/29
13/29
14/29
15/29
16/29
17/29
18/29
19/29
20/29
21/29A-b
22/29
22/29
22/29
23/29A-b
24/29
25/29
26/29
27/29
28/29
29/29

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [U-Boot] [PATCH 00/29] Rework MPC512x Support

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 thesame 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.

Note: It might seem a good idea to squash related patches (like all I/O accessors patches into one, and all mpc512x.h removal patches into another one) to reduce the number of commits. I decided against doing this, as the amount of changes carries the risk that, inspite of pretty careful testing, some errors have not been discovered yet. The current one-step-at-a-time approach is more git-bisect friendly.

Patches are agains v2009.06-rc1; they have been tested on the "mpc5121ads" and the "aria" boards.

Patch overview:

[PATCH 01/29] mpc512x: change cpu/mpc512x/Makefile to use Kconfig style [PATCH 02/29] mpc512x: Move common files to share them by several boards [PATCH 03/29] cpu/mpc512x/pci.c: minor coding style cleanup
[PATCH 04/29] cpu/mpc512x/diu.c: fix warning: assignment from incompatible pointer type [PATCH 05/29] Rename ads5121 board into mpc5121ads
[PATCH 06/29] MPC512x: add more hardware description to immap_512x.h [PATCH 07/29] mpc5121ads: use I/O accessors instead of pointer accesses [PATCH 08/29] MPC512x: add support for ARIA board
[PATCH 09/29] cpu/mpc512x/iopin.c: convert to use I/O acessors.
[PATCH 10/29] cpu/mpc512x/iopin.c: remove redundant include of <asm/immap_512x.h> [PATCH 11/29] MPC512x: prepare removal of include/mpc512x.h
[PATCH 12/29] include/configs/mpc5121ads.h: prepare removal of include/mpc512x.h [PATCH 13/29] include/configs/aria.h: prepare removal of include/mpc512x.h [PATCH 14/29] common/cmd_ide.c: prepare removal of include/mpc512x.h [PATCH 15/29] cpu/mpc512x/cpu.c: prepare removal of include/mpc512x.h [PATCH 16/29] cpu/mpc512x/cpu_init.c: prepare removal of include/mpc512x.h [PATCH 17/29] cpu/mpc512x/cpu_init.c: use I/O accessors instead of pointer accesses [PATCH 18/29] cpu/mpc512x/speed.c: prepare removal of include/mpc512x.h [PATCH 19/29] cpu/mpc512x/speed.c: use I/O accessors instead of pointer accesses [PATCH 20/29] cpu/mpc512x/serial.c: use I/O accessors instead of pointer accesses [PATCH 21/29] cpu/mpc512x/i2c.c: prepare removal of include/mpc512x.h [PATCH 22/29] cpu/mpc512x/i2c.c: use immr offsets from C struct instead of #define [PATCH 23/29] cpu/mpc512x/i2c.c: use I/O accessors instead of pointer accesses [PATCH 24/29] cpu/mpc512x/pci.c: use I/O accessors instead of pointer accesses [PATCH 25/29] drivers/net/mpc512x_fec.c: prepare removal of include/mpc512x.h [PATCH 26/29] MPC512x FEC: remove duplicated code and data types
[PATCH 27/29] drivers/net/mpc512x_fec.c: use I/O accessors instead of pointer accesses [PATCH 28/29] MPC512x FEC: get rid of duplicated struct ethernet_regs [PATCH 29/29] Remove include/mpc512x.h

---
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              |  418 ++++++++++++++++++
 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 |  438 +++++++++++++++++++
 common/cmd_ide.c                        |    4 -
 cpu/mpc512x/Makefile                    |   13 +-
 cpu/mpc512x/asm-offsets.h               |   15 +
 cpu/mpc512x/config.mk                   |    4 +
 cpu/mpc512x/cpu.c                       |    1 -
 cpu/mpc512x/cpu_init.c                  |   25 +-
 cpu/mpc512x/diu.c                       |  189 +++++++++
 cpu/mpc512x/i2c.c                       |   55 ++--
 cpu/mpc512x/iopin.c                     |   10 +-
 cpu/mpc512x/pci.c                       |  226 ++++++++++
 cpu/mpc512x/serial.c                    |   62 ++--
 cpu/mpc512x/speed.c                     |   22 +-
 cpu/mpc512x/start.S                     |    4 +-
 cpu/mpc512x/u-boot.lds                  |  121 ++++++
 drivers/net/mpc512x_fec.c               |  168 ++++----
 drivers/net/mpc512x_fec.h               |  153 +------
 include/asm-ppc/immap_512x.h            |  575 +++++++++++++++++++++++++-
 include/common.h                        |    1 -
 include/configs/ads5121.h               |  551 ------------------------
 include/configs/aria.h                  |  543 ++++++++++++++++++++++++
 include/configs/mpc5121ads.h            |  551 ++++++++++++++++++++++++
 include/mpc512x.h                       |  702 -------------------------------
 39 files changed, 3456 insertions(+), 2615 deletions(-)