* IMX: board hardware macro
@ 2013-03-26 22:31 Daniel Lezcano
2013-03-27 6:33 ` Shawn Guo
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Lezcano @ 2013-03-26 22:31 UTC (permalink / raw)
To: linux-arm-kernel
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
--
<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
^ permalink raw reply [flat|nested] 5+ messages in thread
* IMX: board hardware macro
2013-03-26 22:31 IMX: board hardware macro Daniel Lezcano
@ 2013-03-27 6:33 ` Shawn Guo
2013-03-27 9:13 ` Daniel Lezcano
0 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2013-03-27 6:33 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 26, 2013 at 11:31:26PM +0100, Daniel Lezcano wrote:
> 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);
The global initcall is something that we are removing for multiplatform
build. Please do not add it back.
Shawn
^ permalink raw reply [flat|nested] 5+ messages in thread
* IMX: board hardware macro
2013-03-27 6:33 ` Shawn Guo
@ 2013-03-27 9:13 ` Daniel Lezcano
2013-03-27 12:34 ` Shawn Guo
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Lezcano @ 2013-03-27 9:13 UTC (permalink / raw)
To: linux-arm-kernel
On 03/27/2013 07:33 AM, Shawn Guo wrote:
> On Tue, Mar 26, 2013 at 11:31:26PM +0100, Daniel Lezcano wrote:
>> 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);
>
> 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
--
<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
^ permalink raw reply [flat|nested] 5+ messages in thread
* IMX: board hardware macro
2013-03-27 9:13 ` Daniel Lezcano
@ 2013-03-27 12:34 ` Shawn Guo
2013-03-27 13:53 ` Daniel Lezcano
0 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2013-03-27 12:34 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 27, 2013 at 10:13:17AM +0100, Daniel Lezcano wrote:
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* IMX: board hardware macro
2013-03-27 12:34 ` Shawn Guo
@ 2013-03-27 13:53 ` Daniel Lezcano
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Lezcano @ 2013-03-27 13:53 UTC (permalink / raw)
To: linux-arm-kernel
On 03/27/2013 01:34 PM, Shawn Guo wrote:
> On Wed, Mar 27, 2013 at 10:13:17AM +0100, Daniel Lezcano wrote:
>> 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?
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
--
<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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-27 13:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-26 22:31 IMX: board hardware macro Daniel Lezcano
2013-03-27 6:33 ` Shawn Guo
2013-03-27 9:13 ` Daniel Lezcano
2013-03-27 12:34 ` Shawn Guo
2013-03-27 13:53 ` Daniel Lezcano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.