Can't call printf() in functions called via function pointers?
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?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 13 lines · Timur Tabi
On and 8323E-MDS, I added a
printf()tofdt_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)); }
Quoted 7 lines
Adding this
printf()causes the system to reset. The odd thing is that I can
add all the printfs I want toft_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