linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: R Sricharan <r.sricharan@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	santosh.shilimkar@ti.com, b-cousson@ti.com
Subject: Re: [PATCH 08/13] ARM: OMAP5: Add the WakeupGen IP updates.
Date: Fri, 4 May 2012 15:55:11 -0700	[thread overview]
Message-ID: <20120504225511.GA5613@atomide.com> (raw)
In-Reply-To: <1336029982-31898-9-git-send-email-r.sricharan@ti.com>

* R Sricharan <r.sricharan@ti.com> [120503 00:30]:
> --- a/arch/arm/mach-omap2/omap-hotplug.c
> +++ b/arch/arm/mach-omap2/omap-hotplug.c
> @@ -17,8 +17,10 @@
>  #include <linux/kernel.h>
>  #include <linux/errno.h>
>  #include <linux/smp.h>
> +#include <linux/io.h>
>  
>  #include <asm/cacheflush.h>
> +#include <mach/omap-wakeupgen.h>
>  
>  #include "common.h"
>  
> @@ -35,7 +37,8 @@ int platform_cpu_kill(unsigned int cpu)
>   */
>  void __ref platform_cpu_die(unsigned int cpu)
>  {
> -	unsigned int this_cpu;
> +	unsigned int boot_cpu = 0;
> +	void __iomem *base = omap_get_wakeupgen_base();
>  
>  	flush_cache_all();
>  	dsb();
> @@ -43,16 +46,27 @@ void __ref platform_cpu_die(unsigned int cpu)
>  	/*
>  	 * we're ready for shutdown now, so do it
>  	 */
> -	if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
> -		pr_err("Secure clear status failed\n");
> +	if (cpu_is_omap44xx()) {
> +		if (omap_modify_auxcoreboot0(0x0, 0x200) != 0x0)
> +			pr_err("Secure clear status failed\n");
> +	} else {
> +		__raw_writel(0, base + OMAP_AUX_CORE_BOOT_0);
> +	}
> +
>  
>  	for (;;) {
>  		/*
>  		 * Enter into low power state
>  		 */
>  		omap4_hotplug_cpu(cpu, PWRDM_POWER_OFF);
> -		this_cpu = smp_processor_id();
> -		if (omap_read_auxcoreboot0() == this_cpu) {
> +
> +		if (cpu_is_omap44xx())
> +			boot_cpu = omap_read_auxcoreboot0();
> +		else
> +			boot_cpu =
> +				__raw_readl(base + OMAP_AUX_CORE_BOOT_0) >> 5;
> +
> +		if (boot_cpu == smp_processor_id()) {
>  			/*
>  			 * OK, proper wakeup, we're done
>  			 */

These should use variables set up during init instead of cpu_is_omapxxx
checks.

> @@ -85,7 +89,11 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
>  	 * the AuxCoreBoot1 register is updated with cpu state
>  	 * A barrier is added to ensure that write buffer is drained
>  	 */
> -	omap_modify_auxcoreboot0(0x200, 0xfffffdff);
> +	if (cpu_is_omap44xx())
> +		omap_modify_auxcoreboot0(0x200, 0xfffffdff);
> +	else
> +		__raw_writel(0x20, base + OMAP_AUX_CORE_BOOT_0);
> +
>  	flush_cache_all();
>  	smp_wmb();
>  
> @@ -124,13 +132,20 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
>  
>  static void __init wakeup_secondary(void)
>  {
> +	void __iomem *base = omap_get_wakeupgen_base();
> +
>  	/*
>  	 * Write the address of secondary startup routine into the
>  	 * AuxCoreBoot1 where ROM code will jump and start executing
>  	 * on secondary core once out of WFE
>  	 * A barrier is added to ensure that write buffer is drained
>  	 */
> -	omap_auxcoreboot_addr(virt_to_phys(omap_secondary_startup));
> +	if (cpu_is_omap44xx())
> +		omap_auxcoreboot_addr(virt_to_phys(omap_secondary_startup));
> +	else
> +		__raw_writel(virt_to_phys(omap5_secondary_startup),
> +						base + OMAP_AUX_CORE_BOOT_1);
> +
>  	smp_wmb();
>  
>  	/*

Probably these too could be set up during init while at it.

Regards,

Tony

  reply	other threads:[~2012-05-04 22:55 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03  7:26 [PATCH 00/13] ARM: OMAP5: Add minimal OMAP5 SOC support R Sricharan
2012-05-03  7:26 ` [PATCH 01/13] ARM: OMAP5: id: Add cpu id for ES versions R Sricharan
2012-05-10 11:18   ` Roger Quadros
2012-05-10 11:22     ` R, Sricharan
2012-05-10 13:06   ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-10 13:15     ` R, Sricharan
2012-05-03  7:26 ` [PATCH 02/13] ARM: OMAP5: Add minimal support for OMAP5430 SOC R Sricharan
2012-05-04 22:39   ` Tony Lindgren
2012-05-04 22:47     ` Tony Lindgren
2012-05-06  7:36     ` R, Sricharan
2012-05-07 17:33       ` Tony Lindgren
2012-05-09  9:06         ` R, Sricharan
2012-05-09 16:00           ` Tony Lindgren
2012-05-10  9:49             ` R, Sricharan
2012-05-07 19:07     ` Paul Walmsley
2012-05-07 19:18       ` Tony Lindgren
2012-05-07 19:35         ` Tony Lindgren
2012-05-08  5:32           ` Paul Walmsley
2012-05-08  5:49           ` Hiremath, Vaibhav
2012-05-08 15:48             ` Tony Lindgren
2012-05-08 17:00               ` Hiremath, Vaibhav
2012-05-08 19:07                 ` Tony Lindgren
2012-05-08  5:31         ` Paul Walmsley
2012-05-08 15:47           ` Tony Lindgren
2012-05-10 11:58   ` Roger Quadros
2012-05-03  7:26 ` [PATCH 03/13] TEMP: ARM: OMAP5: Add cpu_is_omap54xx() checks R Sricharan
2012-05-03  7:26 ` [PATCH 04/13] ARM: OMAP5: timer: Add clocksource, clockevent support R Sricharan
2012-05-03  7:26 ` [PATCH 05/13] TEMP: ARM: OMAP5: Update the base address of the 32k-counter R Sricharan
2012-05-03  7:26 ` [PATCH 06/13] ARM: OMAP5: gpmc: Update gpmc_init() R Sricharan
2012-05-03  7:26 ` [PATCH 07/13] ARM: OMAP5: l3: Add l3 error handler support for omap5 R Sricharan
2012-05-04 22:51   ` Tony Lindgren
2012-05-06  7:38     ` R, Sricharan
2012-05-07 17:34       ` Tony Lindgren
2012-05-08  6:04         ` R, Sricharan
2012-05-03  7:26 ` [PATCH 08/13] ARM: OMAP5: Add the WakeupGen IP updates R Sricharan
2012-05-04 22:55   ` Tony Lindgren [this message]
2012-05-07  9:06     ` Santosh Shilimkar
2012-05-10 11:36   ` Roger Quadros
2012-05-10 11:42     ` Shilimkar, Santosh
2012-05-10 11:48       ` Roger Quadros
2012-05-10 11:52         ` Santosh Shilimkar
2012-05-03  7:26 ` [PATCH 09/13] ARM: OMAP5: Add SMP support R Sricharan
2012-05-08 12:47   ` Will Deacon
2012-05-08 13:00     ` Santosh Shilimkar
2012-05-03  7:26 ` [PATCH 10/13] ARM: OMAP5: board-generic: Add device tree support R Sricharan
2012-05-07 13:27   ` Cousson, Benoit
2012-05-07 14:08     ` R, Sricharan
2012-05-07 17:35       ` Tony Lindgren
2012-05-03  7:26 ` [PATCH 11/13] arm/dts: OMAP5: Add omap5 dts files R Sricharan
2012-05-03  7:26 ` [PATCH 12/13] ARM: OMAP5: Add the build support R Sricharan
2012-05-04 22:58   ` Tony Lindgren
2012-05-07  3:35     ` R, Sricharan
2012-05-07 17:37       ` Tony Lindgren
2012-05-08  9:19         ` Cousson, Benoit
2012-05-08 15:57           ` Tony Lindgren
2012-05-03  7:26 ` [PATCH 13/13] ARM: Kconfig update to support additional GPIOs in OMAP5 R Sricharan
2012-05-07  9:49 ` [PATCH 00/13] ARM: OMAP5: Add minimal OMAP5 SOC support Santosh Shilimkar
2012-05-07 22:26   ` Tony Lindgren
2012-05-08  7:24     ` Santosh Shilimkar
2012-05-08 15:58       ` Tony Lindgren
2012-05-10 17:43 ` Sricharan R
2012-05-11 20:11   ` Tony Lindgren
2012-05-14  4:50     ` R, Sricharan

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=20120504225511.GA5613@atomide.com \
    --to=tony@atomide.com \
    --cc=b-cousson@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=r.sricharan@ti.com \
    --cc=santosh.shilimkar@ti.com \
    /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).