[U-Boot-Users] Can't call printf() in functions called via function pointers?
Kumar Gala
galak at kernel.crashing.org
Fri Dec 7 22:50:21 CET 2007
On Dec 7, 2007, at 2:43 PM, Timur Tabi wrote:
> On and 8323E-MDS, I added a printf() to fdt_set_qe_busfreq():
>
> static int fdt_set_qe_busfreq(void *blob, int nodeoffset, const char
> *name, bd_t
> *bd)
> {
> u32 tmp;
> /* Create or update the property */
> printf("%s:%u\n", __FUNCTION__, __LINE__);
> tmp = cpu_to_be32(gd->qe_clk);
> return fdt_setprop(blob, nodeoffset, name, &tmp, sizeof(tmp));
> }
>
> Adding this printf() causes the system to reset. The odd thing is
> that I can
> add all the printfs I want to ft_cpu_setup().
>
> Is this because fdt_set_qe_busfreq() is being called via function
> pointer, and
> these calls are screwed up because of the relocation?
That's exactly correct.
Someone should really look at converting 83xx over to the way 5xxx and
85xx are doing fixups.
- k
More information about the U-Boot
mailing list