On Wed, May 02, 2012 at 03:11:35PM -0500, Rob Lee wrote:
Sascha,
mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
- arm_pm_idle = imx5_idle;
- arm_pm_idle = (void *)imx5_idle;
I don't like this. It will cover all warnings when the prototype of arm_pm_idle changes in future. Better add a static void imx5_idle which calls a static int imx5_do_idle, then you have an idle function which returns an int.
What about using the following:
arm_pm_idle = (void (*)(void))imx5_idle;
This will give warnings if arm_pm_idle prototype changes.
This surely works but will look suspicious for people looking at the code.
Sascha