barnie82
barnie82

Reputation: 161

u-boot: mpc5xxx.h does not support mpc55xx?

I'm new to u-boot and currently trying to port it to a mpc5554 board (from phytec) for fun.

I was happy to find the mpc5xxx.h file indicating that it would be usable in my case. However, the more I look into it, it seems that file is not as generic as the name suggests. It does not seem to be usable in my case.

  1. Am I mistaken?
  2. Has anyone tried something similar?
  3. Will I need to create my own mpc555x.h etc?
  4. Should the file(s) be re-named in the distribution?

Any thoughts are appreciated, thanks!

Upvotes: 0

Views: 338

Answers (1)

sawdust
sawdust

Reputation: 17067

  1. Am I mistaken?

Maybe. There are two levels of customization you will have to do for U-Boot (and Linux).
First level is the architecture (PowerPC) and processor (???) of the SoC (MPC5554).
Second level is the board (Phytec SOM ?) on which that SoC is installed on.

Apparently you are using a Freescale MPC5554 SoC rather than a Motorola MPC5200. You will need to verify that the #defines and register/port declarations in that mpc5xxx.h file all match the specifications for your SoC.

Then you need to obtain or write modules for your board. The board is a specific implementation of configurable options of an SoC that are now hardwired on the board side of the pins. These modules have to written to configure the SoC peripherals and GPIOs on the chip side of the pins to match the board.

2 Has anyone tried something similar?

I've customized U-Boot for a board.
You should try to obtain board support from the board's manufacturer and SoC support from the chip manufacturer.
The more popular SoC boards (especially "evaluation boards" from chip vendors) come with demo Linux kernels and bootstrap programs.
You could try searching the Internet for U-Boot, Linux on PowerPc, Freescale and/or Phytec developer web sites and/or mailing lists.

3 Will I need to create my own mpc555x.h etc?

Maybe.
If the #definesand register/port declarations in that mpc5xxx.h files do not match the specifications for your SoC and you cannot find one from another developer, then you could generate a mpc5554.h file. Or, depending on the ratio of matching versus different specs, you could augment that existing file with declarations for the MPC5444 using conditional compilation directives (e.g. #ifdef CPU_IS_MPC5444 ... #else ... #endif).

If you only have a MPC5554 to test with, then be careful about expanding the code to encompass other MPC555x devices or the Qorivva MPC55xx family.

4 Should the file(s) be re-named in the distribution?

Probably not, as that would break builds of those who do use that file.

Upvotes: 2

Related Questions