linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] ARM: SAMSUNG: Make the sleep code common for S3C64XX and newer SoCs
Date: Wed, 7 Sep 2011 10:55:13 +0100	[thread overview]
Message-ID: <20110907095513.GQ6619@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1313144787-30666-3-git-send-email-a.kesavan@samsung.com>

On Fri, Aug 12, 2011 at 03:56:24PM +0530, Abhilash Kesavan wrote:
> +ENTRY(s3c_cpu_resume)
> +#if defined(CONFIG_S3C_PM_DEBUG_LED_SMDK)
> +
> +#undef S3C64XX_VA_GPIO
> +#define S3C64XX_VA_GPIO (0x0)
> +#define S3C64XX_GPNCON			(S3C64XX_GPN_BASE + 0x00)
> +#define S3C64XX_GPNDAT			(S3C64XX_GPN_BASE + 0x04)
> +
> +#define S3C64XX_GPN_CONMASK(__gpio)	(0x3 << ((__gpio) * 2))
> +#define S3C64XX_GPN_OUTPUT(__gpio)	(0x1 << ((__gpio) * 2))
> +
> +	/* Initialise the GPIO state if we are debugging via the SMDK LEDs,
> +	 * as the uboot version supplied resets these to inputs during the
> +	 * resume checks.
> +	*/
> +
> +	ldr	r3, =S3C64XX_PA_GPIO
> +	ldr	r0, [ r3, #S3C64XX_GPNCON ]
> +	bic	r0, r0, #(S3C64XX_GPN_CONMASK(12) | S3C64XX_GPN_CONMASK(13) | \
> +			  S3C64XX_GPN_CONMASK(14) | S3C64XX_GPN_CONMASK(15))
> +	orr	r0, r0, #(S3C64XX_GPN_OUTPUT(12) | S3C64XX_GPN_OUTPUT(13) | \
> +			  S3C64XX_GPN_OUTPUT(14) | S3C64XX_GPN_OUTPUT(15))
> +	str	r0, [ r3, #S3C64XX_GPNCON ]
> +
> +	ldr	r0, [ r3, #S3C64XX_GPNDAT ]
> +	bic	r0, r0, #0xf << 12			@ GPN12..15
> +	orr	r0, r0, #1 << 15			@ GPN15
> +	str	r0, [ r3, #S3C64XX_GPNDAT ]
> +#endif

This is incompatible with the aim of a single kernel booting on many ARM
platforms.

Rather than consolidating down to just one implementation, how about
consolidating to two - one for everything but SMDK, and one for the SMDK
with the LED stuff.  You can then chose which you want - either the
s3c_generic_resume (which is just the magic code plus the branch)
or s3c_smdk_leds_resume (which would be the magic code plus the LEDS
stuff plus the branch.)

  parent reply	other threads:[~2011-09-07  9:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 10:26 [PATCH 0/5] S5P64X0 PM Support Abhilash Kesavan
2011-08-12 10:26 ` [PATCH 1/5] ARM: S5P: Make the common S5P PM code conditionally compile Abhilash Kesavan
2011-08-12 10:26 ` [PATCH 2/5] ARM: SAMSUNG: Make the sleep code common for S3C64XX and newer SoCs Abhilash Kesavan
2011-08-26  1:40   ` Kukjin Kim
2011-08-26  2:10     ` Abhilash Kesavan
2011-09-07  6:01       ` Kukjin Kim
2011-09-07  6:34         ` Abhilash Kesavan
2011-09-07  9:55   ` Russell King - ARM Linux [this message]
2011-09-07 11:30     ` Abhilash Kesavan
2011-08-12 10:26 ` [PATCH 3/5] ARM: S5P64X0: Add pm save/restore functions for GPIO banks Abhilash Kesavan
2011-09-07  6:01   ` Kukjin Kim
2011-09-07  6:36     ` Abhilash Kesavan
2011-08-12 10:26 ` [PATCH 4/5] ARM: S5P64X0: Fix incorrect serial clock name Abhilash Kesavan
2011-09-07  6:01   ` Kukjin Kim
2011-09-07  6:31     ` Abhilash Kesavan
2011-08-12 10:26 ` [PATCH 5/5] ARM: S5P64X0: Add Power Management support Abhilash Kesavan
2011-09-07  6:01   ` Kukjin Kim
2011-09-07  6:33     ` Abhilash Kesavan
2011-08-19 14:02 ` [PATCH 0/5] S5P64X0 PM Support Kukjin Kim
2011-09-21 12:39 ` Kukjin Kim

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=20110907095513.GQ6619@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).