[PATCH v2 10/10] arm: zynq: Add cpuidle support

Michal Simek monstr at monstr.eu
Wed Mar 27 03:56:28 EDT 2013


2013/3/26 Arnd Bergmann <arnd at arndb.de>:
> On Tuesday 26 March 2013, Michal Simek wrote:
>> Add support for cpuidle.
>>
>> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
>> ---
>> v2: Fix file header
>> ---
>>  arch/arm/mach-zynq/Makefile  |    1 +
>>  arch/arm/mach-zynq/cpuidle.c |  133 ++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 134 insertions(+)
>>  create mode 100644 arch/arm/mach-zynq/cpuidle.c
>
> Can you move that file to drivers/cpuidle instead?

I can't see any problem in it right now.

>>+/* Initialize CPU idle by registering the idle states */
>>+static int xilinx_init_cpuidle(void)
>>+{
>>+       unsigned int cpu;
>>+       struct cpuidle_device *device;
>>+       int ret;
>>+
>>+       ret = cpuidle_register_driver(&xilinx_idle_driver);
>>+       if (ret) {
>>+               pr_err("Registering Xilinx CpuIdle Driver failed.\n");
>>+               return ret;
>>+       }
>
> I think you have to check that you actually run on a Zynq system before
> registering the driver.

Is there any elegant way how to do it?
I see that Rob is checking compatible machine with of_machine_is_compatible().

Thanks,
Michal



-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



More information about the linux-arm-kernel mailing list