All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 4/5] Add suspend/resume support for rx1950
@ 2009-09-26 21:04 Vasily Khoruzhick
  2009-09-27  6:19 ` Ben Dooks
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2009-09-26 21:04 UTC (permalink / raw)
  To: linux-arm-kernel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Add-suspend-resume-support-for-rx1950.patch
Type: text/x-patch
Size: 2784 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20090927/b9b8e42a/attachment.bin>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 4/5] Add suspend/resume support for rx1950
  2009-09-26 21:04 [PATCH v2 4/5] Add suspend/resume support for rx1950 Vasily Khoruzhick
@ 2009-09-27  6:19 ` Ben Dooks
  2009-09-27  7:01   ` Vasily Khoruzhick
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Dooks @ 2009-09-27  6:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Sep 27, 2009 at 12:04:57AM +0300, Vasily Khoruzhick wrote:
> 

> From d80afd66257a726995981c5376ab2d4854e8b120 Mon Sep 17 00:00:00 2001
> From: Vasily Khoruzhick <anarsoul@gmail.com>
> Date: Tue, 22 Sep 2009 20:59:04 +0300
> Subject: [PATCH v2 4/5] Add suspend/resume support for rx1950
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
>  arch/arm/mach-s3c2410/pm.c |   23 +++++++++++++++++++++--
>  arch/arm/mm/mmu.c          |    5 +++--
>  2 files changed, 24 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
> index 966119c..f2f3235 100644
> --- a/arch/arm/mach-s3c2410/pm.c
> +++ b/arch/arm/mach-s3c2410/pm.c
> @@ -60,10 +60,10 @@ static void s3c2410_pm_prepare(void)
>  		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
>  	}
>  
> -	/* the RX3715 uses similar code and the same H1940 and the
> +	/* RX3715 and RX1950 use similar to H1940 code and the
>  	 * same offsets for resume and checksum pointers */
>  
> -	if (machine_is_rx3715()) {
> +	if (machine_is_rx3715() || machine_is_rx1950()) {
>  		void *base = phys_to_virt(H1940_SUSPEND_CHECK);
>  		unsigned long ptr;
>  		unsigned long calc = 0;
> @@ -74,6 +74,19 @@ static void s3c2410_pm_prepare(void)
>  			calc += __raw_readl(base+ptr);
>  
>  		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
> +		if (machine_is_rx1950()) {
> +			/* According to S3C2442 user's manual, page 7-17,
> +			 * when the system is operating in NAND boot mode,
> +			 * the hardware pin configuration - EINT[23:21] ???
> +			 * must be set as input for starting up after
> +			 * wakeup from sleep mode */

given this is generic to the s3c2442, why put this here? it also holds
for the s3c2440 too... think about an implementation for the cpu's
sysdev for all nand-booting systems.

> +			s3c2410_gpio_cfgpin(S3C2410_GPG(15),
> +				S3C2410_GPIO_INPUT);
> +			s3c2410_gpio_cfgpin(S3C2410_GPG(14),
> +				S3C2410_GPIO_INPUT);
> +			s3c2410_gpio_cfgpin(S3C2410_GPG(13),
> +				S3C2410_GPIO_INPUT);
> +		}
>  	}
>  
>  	if ( machine_is_aml_m5900() )
> @@ -94,6 +107,12 @@ static int s3c2410_pm_resume(struct sys_device *dev)
>  	if ( machine_is_aml_m5900() )
>  		s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
>  
> +	if (machine_is_rx1950()) {
> +		s3c2410_gpio_cfgpin(S3C2410_GPG(15), S3C2410_GPG15_EINT23);
> +		s3c2410_gpio_cfgpin(S3C2410_GPG(14), S3C2410_GPG14_EINT22);
> +		s3c2410_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPG13_EINT21);
> +	}
> +
>  	return 0;
>  }
>  
> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> index 4426ee6..a13923e 100644
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -827,9 +827,10 @@ void __init reserve_node_zero(pg_data_t *pgdat)
>  	if (machine_is_p720t())
>  		res_size = 0x00014000;
>  
> -	/* H1940 and RX3715 need to reserve this for suspend */
> +	/* H1940, RX3715 and RX1950 need to reserve this for suspend */
>  
> -	if (machine_is_h1940() || machine_is_rx3715()) {
> +	if (machine_is_h1940() || machine_is_rx3715()
> +		|| machine_is_rx1950()) {
>  		reserve_bootmem_node(pgdat, 0x30003000, 0x1000,
>  				BOOTMEM_DEFAULT);
>  		reserve_bootmem_node(pgdat, 0x30081000, 0x1000,
> -- 
> 1.6.5.rc1
> 

> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 4/5] Add suspend/resume support for rx1950
  2009-09-27  6:19 ` Ben Dooks
@ 2009-09-27  7:01   ` Vasily Khoruzhick
  2009-09-27  7:08     ` Ben Dooks
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2009-09-27  7:01 UTC (permalink / raw)
  To: linux-arm-kernel

? ????????? ?? 27 ???????? 2009 09:19:51 ????? Ben Dooks ???????:
> >  		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
> > +		if (machine_is_rx1950()) {
> > +			/* According to S3C2442 user's manual, page 7-17,
> > +			 * when the system is operating in NAND boot mode,
> > +			 * the hardware pin configuration - EINT[23:21] ???
> > +			 * must be set as input for starting up after
> > +			 * wakeup from sleep mode */
> 
> given this is generic to the s3c2442, why put this here? it also holds
> for the s3c2440 too... think about an implementation for the cpu's
> sysdev for all nand-booting systems.

Well, actually I thought that suspend for h1940 and rx3000 works without these 
tricks... Ok, I'll make it generic for s3c2442 CPU.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20090927/1a0fe903/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 4/5] Add suspend/resume support for rx1950
  2009-09-27  7:01   ` Vasily Khoruzhick
@ 2009-09-27  7:08     ` Ben Dooks
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2009-09-27  7:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Sep 27, 2009 at 10:01:08AM +0300, Vasily Khoruzhick wrote:
> ?? ?????????????????? ???? 27 ???????????????? 2009 09:19:51 ?????????? Ben Dooks ??????????????:
> > >  		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
> > > +		if (machine_is_rx1950()) {
> > > +			/* According to S3C2442 user's manual, page 7-17,
> > > +			 * when the system is operating in NAND boot mode,
> > > +			 * the hardware pin configuration - EINT[23:21] ???
> > > +			 * must be set as input for starting up after
> > > +			 * wakeup from sleep mode */
> > 
> > given this is generic to the s3c2442, why put this here? it also holds
> > for the s3c2440 too... think about an implementation for the cpu's
> > sysdev for all nand-booting systems.
> 
> Well, actually I thought that suspend for h1940 and rx3000 works without these 
> tricks... Ok, I'll make it generic for s3c2442 CPU.

The h1940 is a s3c2410 and all the boot pins on it are specific function
for boot. No idea if the rx3xxx series use the upper EINT lines for
anything.

Anyway, please include the s3c2440 in this change as I belive it
also has the saem note.

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 4/5] Add suspend/resume support for RX1950
  2010-05-11  6:55 [PATCH v2 0/5] HP iPAQ RX1950 patch series Vasily Khoruzhick
@ 2010-05-11  6:55 ` Vasily Khoruzhick
  0 siblings, 0 replies; 5+ messages in thread
From: Vasily Khoruzhick @ 2010-05-11  6:55 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 arch/arm/mach-s3c2410/pm.c |    4 ++--
 arch/arm/mm/mmu.c          |    5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
index 966119c..6a61486 100644
--- a/arch/arm/mach-s3c2410/pm.c
+++ b/arch/arm/mach-s3c2410/pm.c
@@ -60,10 +60,10 @@ static void s3c2410_pm_prepare(void)
 		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
 	}
 
-	/* the RX3715 uses similar code and the same H1940 and the
+	/* RX3715 and RX1950 use similar to H1940 code and the
 	 * same offsets for resume and checksum pointers */
 
-	if (machine_is_rx3715()) {
+	if (machine_is_rx3715() || machine_is_rx1950()) {
 		void *base = phys_to_virt(H1940_SUSPEND_CHECK);
 		unsigned long ptr;
 		unsigned long calc = 0;
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 241c24a..45a1bc2 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -869,9 +869,10 @@ void __init reserve_node_zero(pg_data_t *pgdat)
 	if (machine_is_p720t())
 		res_size = 0x00014000;
 
-	/* H1940 and RX3715 need to reserve this for suspend */
+	/* H1940, RX3715 and RX1950 need to reserve this for suspend */
 
-	if (machine_is_h1940() || machine_is_rx3715()) {
+	if (machine_is_h1940() || machine_is_rx3715()
+		|| machine_is_rx1950()) {
 		reserve_bootmem_node(pgdat, 0x30003000, 0x1000,
 				BOOTMEM_DEFAULT);
 		reserve_bootmem_node(pgdat, 0x30081000, 0x1000,
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-11  6:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-26 21:04 [PATCH v2 4/5] Add suspend/resume support for rx1950 Vasily Khoruzhick
2009-09-27  6:19 ` Ben Dooks
2009-09-27  7:01   ` Vasily Khoruzhick
2009-09-27  7:08     ` Ben Dooks
2010-05-11  6:55 [PATCH v2 0/5] HP iPAQ RX1950 patch series Vasily Khoruzhick
2010-05-11  6:55 ` [PATCH v2 4/5] Add suspend/resume support for RX1950 Vasily Khoruzhick

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.