From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH V2 2/4] ARM: tegra: pmc: add power on function for secondary CPUs
Date: Wed, 27 Feb 2013 11:57:26 -0700 [thread overview]
Message-ID: <512E5716.1050708@wwwdotorg.org> (raw)
In-Reply-To: <1361932087-13372-3-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 02/26/2013 07:28 PM, Joseph Lo wrote:
> Adding the power on function for secondary CPUs in PMC driver, this can
> help us to remove legacy powergate driver and add generic power domain
> support later.
>
> Signed-off-by: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> V2:
> * Don't use ISS_ERR_VALUE for checking error return code
> * the CPU power on function only available for secondary CPU which means
> we don't care (cpuid <= 0 || cpuid >= num_possible_cpus())
s/don't care/don't support/, I think.
> diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
> +static int tegra_pmc_powergate_set(int id, bool new_state)
> + reg = tegra_pmc_readl(PMC_PWRGATE_STATUS);
> +
> + old_state = (reg >> id) & 1;
You could actually replace those last to lines with:
old_state = tegra_pmc_powergate_is_powered_id();
> +static bool tegra_pmc_powergate_is_powered(int id)
> +{
> + u32 status;
> +
> + status = tegra_pmc_readl(PMC_PWRGATE_STATUS) & (1 << id);
> + return !!status;
That might be simpler as:
return (tegra_pmc_readl(PMC_PWRGATE_STATUS) >> id) & 1;
(i.e. the code that's currently part of tegra_pmc_powergate_set to
calculate old_status)
next prev parent reply other threads:[~2013-02-27 18:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 2:28 [PATCH V2 0/4] ARM: tegra114: bring up secondary CPU for SMP Joseph Lo
[not found] ` <1361932087-13372-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-27 2:28 ` [PATCH V2 1/4] ARM: tegra: pmc: convert PMC driver to support DT only Joseph Lo
[not found] ` <1361932087-13372-2-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-27 18:53 ` Stephen Warren
2013-02-27 2:28 ` [PATCH V2 2/4] ARM: tegra: pmc: add power on function for secondary CPUs Joseph Lo
[not found] ` <1361932087-13372-3-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-27 18:57 ` Stephen Warren [this message]
2013-02-27 2:28 ` [PATCH V2 3/4] ARM: tegra30: platsmp: replace the CPU power on function in PMC driver Joseph Lo
2013-02-27 2:28 ` [PATCH V2 4/4] ARM: tegra114: bring up secondary CPU for SMP Joseph Lo
[not found] ` <1361932087-13372-5-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-27 18:58 ` Stephen Warren
2013-03-06 21:56 ` [PATCH V2 0/4] " Stephen Warren
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=512E5716.1050708@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.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