All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [83xx] [RFC] Widening the scope of u-boot/cpu/mpc83xx/cpu.c : upmconfig
@ 2008-10-15 21:35 richardretanubun
  2008-10-15 22:47 ` Kim Phillips
  0 siblings, 1 reply; 2+ messages in thread
From: richardretanubun @ 2008-10-15 21:35 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] [83xx] [RFC] Widening the scope of u-boot/cpu/mpc83xx/cpu.c : upmconfig
  2008-10-15 21:35 [U-Boot] [83xx] [RFC] Widening the scope of u-boot/cpu/mpc83xx/cpu.c : upmconfig richardretanubun
@ 2008-10-15 22:47 ` Kim Phillips
  0 siblings, 0 replies; 2+ messages in thread
From: Kim Phillips @ 2008-10-15 22:47 UTC (permalink / raw)
  To: u-boot

On Wed, 15 Oct 2008 17:35:39 -0400
richardretanubun <richardretanubun@ruggedcom.com> wrote:

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-15 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 21:35 [U-Boot] [83xx] [RFC] Widening the scope of u-boot/cpu/mpc83xx/cpu.c : upmconfig richardretanubun
2008-10-15 22:47 ` Kim Phillips

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.