[U-Boot-Users] Can't call printf() in functions called via function pointers?

Timur Tabi timur at freescale.com
Fri Dec 7 21:43:06 CET 2007


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?

-- 
Timur Tabi
Linux kernel developer at Freescale




More information about the U-Boot mailing list