Skip to contentSkip to conversation

Widening the scope of u-boot/cpu/mpc83xx/cpu.c : upmconfig

RFC richardretanubun 2 participants 2 messages Oct 15, 2008

lore
Share & tools
lore
#0 lore raw

Hi Kim,

I recently tried calling the u-boot/cpu/mpc83xx/cpu.c : upmconfig function to configure one of my UPMs to work as a Compact flash controller.

When I tried the compile I am getting the error from the #else of this code

void upmconfig (uint upm, uint *table, uint size)
{
#if defined(CONFIG_MPC834X)
[snip]

#else
    printf("Error: %s() not defined for this configuration.\n", __FUNCTION__);
    hang();

#endif
}

Two questions:
1. Can the CONFIG_MPC834X limitation be relaxed? (I am using an MPC8360E), If so, what should it be? CONFIG_83XX?
2. Can the #else action be changed from a printf to a #error? Something like this, maybe?

#else
#error upmconfig function not defined for this configuration.
#endif

This alerts earlier during compile and not a hang during run time.

Please let me know what you think and I can submit a patch for it.

Thanks for your time

Regards,
- Richard Retanubun

#1 lore raw
Quoted 11 lines · On Wed, 15 Oct 2008 17:35:39 -0400 richardretanubun…

Two questions:
1. Can the CONFIG_MPC834X limitation be relaxed? (I am using an MPC8360E), If so, what should it be? CONFIG_83XX?
2. Can the #else action be changed from a printf to a #error? Something like this, maybe?

#else
#error upmconfig function not defined for this configuration.
#endif

This alerts earlier during compile and not a hang during run time.

Please let me know what you think and I can submit a patch for it.

I think upmconfig code should be common for 83xx, 85xx, and 86xx and put in a common area such as cpu/mpc8xxx once and for all.

but for now we (mpc83xx) can lose the #ifdef completely.

Patches addressing either of the above are welcome :).

Kim