IMX: board hardware macro
HI all,
is there a macro to tell if the board is iMX51 and iMX6Q ?
I would like to do the same as:
static int __init tegra_cpuidle_init(void)
{
int ret;
switch (tegra_chip_id) {
case TEGRA20:
ret = tegra20_cpuidle_init();
break;
case TEGRA30:
ret = tegra30_cpuidle_init();
break;
case TEGRA114:
ret = tegra114_cpuidle_init();
break;
default:
ret = -ENODEV;
break;
}
return ret;
}device_initcall(tegra_cpuidle_init);
Thanks in advance
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Quoted 25 lines · Daniel Lezcano
HI all,
is there a macro to tell if the board is iMX51 and iMX6Q ?
I would like to do the same as:
static int
__inittegra_cpuidle_init(void)
{
int ret;switch (
tegra_chip_id) {
case TEGRA20:
ret =tegra20_cpuidle_init();
break;
case TEGRA30:
ret =tegra30_cpuidle_init();
break;
case TEGRA114:
ret =tegra114_cpuidle_init();
break;
default:
ret =-ENODEV;
break;
}
Quoted 3 lines
return ret;
}device_initcall(tegra_cpuidle_init);
The global initcall is something that we are removing for multiplatform build. Please do not add it back.
Shawn
Quoted 26 lines · Shawn Guo
Quoted 25 lines · Daniel Lezcano
HI all,
is there a macro to tell if the board is iMX51 and iMX6Q ?
I would like to do the same as:
static int
__inittegra_cpuidle_init(void)
{
int ret;switch (
tegra_chip_id) {
case TEGRA20:
ret =tegra20_cpuidle_init();
break;
case TEGRA30:
ret =tegra30_cpuidle_init();
break;
case TEGRA114:
ret =tegra114_cpuidle_init();
break;
default:
ret =-ENODEV;
break;
}
Quoted 6 lines
Quoted 3 lines
return ret;
}device_initcall(tegra_cpuidle_init);The global initcall is something that we are removing for multiplatform build. Please do not add it back.
Ok, sure. I won't add it back.
Do these macros exist ?
Thanks
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Quoted 1 line · Daniel Lezcano
Do these macros exist ?
There is cpu_is_mx51(), but no cpu_is_mx6() stuff. I do not understand why these are needed. The cpuidle initialization should be done in SoC specific hook like how it's done for imx6q right now. So why do you need such macros?
Shawn
Quoted 7 lines · Shawn Guo
Quoted 1 line · Daniel Lezcano
Do these macros exist ?
There is
cpu_is_mx51(), but nocpu_is_mx6()stuff. I do not understand why these are needed. The cpuidle initialization should be done in SoC specific hook like how it's done for imx6q right now. So why do you need such macros?
Well I am sure that will fit, but I wanted to create a single cpuidle init function for all the platforms in order to encapsulate the cpuidle drivers and then with the incoming patchset, factor out the code.
I will send a RFC for the changes, so we can discuss about it and choose the direction you think more convenient to unify the code across the different cpuidle drivers.
Thanks
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog