public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Can't call printf() in functions called via function pointers?
@ 2007-12-07 20:43 Timur Tabi
  2007-12-07 21:50 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2007-12-07 20:43 UTC (permalink / raw)
  To: u-boot

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

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

end of thread, other threads:[~2007-12-07 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-07 20:43 [U-Boot-Users] Can't call printf() in functions called via function pointers? Timur Tabi
2007-12-07 21:50 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox