From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Can't call printf() in functions called via function pointers?
Date: Fri, 07 Dec 2007 14:43:06 -0600 [thread overview]
Message-ID: <4759B05A.4090800@freescale.com> (raw)
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
next reply other threads:[~2007-12-07 20:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 20:43 Timur Tabi [this message]
2007-12-07 21:50 ` [U-Boot-Users] Can't call printf() in functions called via function pointers? Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4759B05A.4090800@freescale.com \
--to=timur@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox