linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sudeep.holla@arm.com (Sudeep Holla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/5] cpuidle: ARM: Add cpuidle driver for K1879XB1YA
Date: Tue, 30 Jun 2015 17:24:31 +0100	[thread overview]
Message-ID: <5592C2BF.10200@arm.com> (raw)
In-Reply-To: <1435677307-6526-6-git-send-email-andrew@ncrmnt.org>



On 30/06/15 16:15, Andrew Andrianov wrote:
> Signed-off-by: Andrew Andrianov <andrew@ncrmnt.org>
> ---
>   drivers/cpuidle/Kconfig.arm            |  6 +++++
>   drivers/cpuidle/Makefile               |  1 +
>   drivers/cpuidle/cpuidle-rcm-k1879xb1.c | 48 ++++++++++++++++++++++++++++++++++
>   3 files changed, 55 insertions(+)
>   create mode 100644 drivers/cpuidle/cpuidle-rcm-k1879xb1.c
>
> diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
> index 21340e0..988bfa3 100644
> --- a/drivers/cpuidle/Kconfig.arm
> +++ b/drivers/cpuidle/Kconfig.arm
> @@ -74,3 +74,9 @@ config ARM_MVEBU_V7_CPUIDLE
>   	depends on ARCH_MVEBU && !ARM64
>   	help
>   	  Select this to enable cpuidle on Armada 370, 38x and XP processors.
> +
> +config ARM_RCM_K1879XB1_CPUIDLE
> +	bool "CPU Idle Driver for RC Module's K1879XB1YA SoC"
> +	depends on ARCH_RCM_K1879XB1 && !ARM64
> +	help
> +	  Select this to enable cpuidle on K1879XB1YA SoC.
> diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile
> index 3ba81b1..71b7e16 100644
> --- a/drivers/cpuidle/Makefile
> +++ b/drivers/cpuidle/Makefile
> @@ -17,6 +17,7 @@ obj-$(CONFIG_ARM_ZYNQ_CPUIDLE)		+= cpuidle-zynq.o
>   obj-$(CONFIG_ARM_U8500_CPUIDLE)         += cpuidle-ux500.o
>   obj-$(CONFIG_ARM_AT91_CPUIDLE)          += cpuidle-at91.o
>   obj-$(CONFIG_ARM_EXYNOS_CPUIDLE)        += cpuidle-exynos.o
> +obj-$(CONFIG_ARM_RCM_K1879XB1_CPUIDLE)  += cpuidle-rcm-k1879xb1.o
>   obj-$(CONFIG_ARM_CPUIDLE)		+= cpuidle-arm.o
>
>   ###############################################################################
> diff --git a/drivers/cpuidle/cpuidle-rcm-k1879xb1.c b/drivers/cpuidle/cpuidle-rcm-k1879xb1.c
> new file mode 100644
> index 0000000..7c621b6
> --- /dev/null
> +++ b/drivers/cpuidle/cpuidle-rcm-k1879xb1.c
> @@ -0,0 +1,48 @@
> +/*
> + * CPU idle for RC Module K1879XB1YA SoC
> + *
> + * Copyright (C) 2015 RC Module.
> + * http://www.module.ru/
> + *
> + * Andrew Andrianov <andrew@ncrmnt.org>
> + *
> + * Based on Davinci CPU idle code
> + * (arch/arm/mach-davinci/cpuidle.c)
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <linux/io.h>
> +#include <linux/platform_device.h>
> +#include <linux/cpuidle.h>
> +#include <asm/cpuidle.h>
> +
> +/*
> + * We only enable WFI here, since DDR will enter self-refresh
> + * on it's own when it can (bootloader takes care to configure that)
> + */
> +
> +static struct cpuidle_driver rcm_idle_driver = {
> +	.name			= "rcm_k1879xb1_idle",
> +	.states[0]		= ARM_CPUIDLE_WFI_STATE,

Do you plan to add more states in future ?
Otherwise default_idle_call will be sufficient to enter WFI
and you need not register any cpuidle driver.

Regards,
Sudeep

  reply	other threads:[~2015-06-30 16:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 15:50 [PATCH 0/4] [New SoC] Add support for RC Module's K1879XB1YA Andrew Andrianov
2015-06-23 15:50 ` [PATCH 1/4] ARM: rcm-k1879xb1: Add support for K1879XB1 SoC Andrew Andrianov
2015-06-23 16:11   ` Russell King - ARM Linux
2015-06-23 16:56     ` Andrew
2015-06-24  2:15   ` Rob Herring
2015-06-26 10:11     ` Andrew
2015-06-30 15:15     ` [PATCH v2 0/5] [New SoC] Add support for RC Module's K1879XB1YA Andrew Andrianov
2015-06-30 15:15       ` [PATCH v2 1/5] ARM: rcm-k1879xb1: Add support for K1879XB1 SoC Andrew Andrianov
2015-06-30 21:01         ` arnRe: " Arnd Bergmann
2015-06-30 15:15       ` [PATCH v2 2/5] of: Add vendor prefix for RC Module Andrew Andrianov
2015-06-30 15:15       ` [PATCH v2 3/5] ARM: dts: rcm-k1879xb1: Add dts files for K1879XB1YA Andrew Andrianov
2015-06-30 21:07         ` Arnd Bergmann
2015-06-30 15:15       ` [PATCH v2 4/5] ARM: Add defconfig for RC Module K1879XB1YA SoC Andrew Andrianov
2015-06-30 15:15       ` [PATCH v2 5/5] cpuidle: ARM: Add cpuidle driver for K1879XB1YA Andrew Andrianov
2015-06-30 16:24         ` Sudeep Holla [this message]
2015-06-30 21:09         ` Arnd Bergmann
2015-06-30 21:20           ` Andrew
2015-06-23 15:50 ` [PATCH 2/4] of: Add vendor prefix for RC Module Andrew Andrianov
2015-06-23 15:50 ` [PATCH 3/4] ARM: dts: rcm-k1879xb1: Add dts files for K1879XB1YA Andrew Andrianov
2015-06-23 15:50 ` [PATCH 4/4] ARM: Add defconfig for RC Module K1879XB1YA SoC Andrew Andrianov

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=5592C2BF.10200@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).