SUPERH platform development
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH/RFC] ARM: shmobile: r8a7740 without PM domains prototype
Date: Sun, 11 May 2014 23:16:52 +0000	[thread overview]
Message-ID: <20140511231652.19926.53110.sendpatchset@w520> (raw)

From: Magnus Damm <damm+renesas@opensource.se>

This is a prototype patch to allow building r8a7740 for 
multiplatform when CONFIG_PM_GENERIC_DOMAINS is unset.

It may perhaps be better to simply select PM_GENERIC_DOMAINS
for r8a7740 in case of multiplatform. Same applies to sh73a0.

Not for merge. Need to figure out how to do this properly first.

Not-yet-signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 arch/arm/mach-shmobile/include/mach/pm-rmobile.h |    4 ++--
 arch/arm/mach-shmobile/include/mach/r8a7740.h    |    4 ++--
 arch/arm/mach-shmobile/pm-r8a7740.c              |    4 ++--
 arch/arm/mach-shmobile/pm-rmobile.c              |    4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

--- 0001/arch/arm/mach-shmobile/include/mach/pm-rmobile.h
+++ work/arch/arm/mach-shmobile/include/mach/pm-rmobile.h	2014-04-24 19:07:59.000000000 +0900
@@ -36,7 +36,7 @@ struct pm_domain_device {
 	struct platform_device *pdev;
 };
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && defined(CONFIG_PM_GENERIC_DOMAINS)
 extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
 extern void rmobile_add_device_to_domain_td(const char *domain_name,
 					    struct platform_device *pdev,
@@ -58,6 +58,6 @@ extern void rmobile_add_devices_to_domai
 
 static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[],
 						  int size) {}
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && CONFIG_PM_GENERIC_DOMAINS */
 
 #endif /* PM_RMOBILE_H */
--- 0006/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7740.h	2014-04-24 19:08:49.000000000 +0900
@@ -56,10 +56,10 @@ extern void r8a7740_clock_init(u8 md_ck)
 extern void r8a7740_pinmux_init(void);
 extern void r8a7740_pm_init(void);
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && defined(CONFIG_PM_GENERIC_DOMAINS)
 extern void __init r8a7740_init_pm_domains(void);
 #else
 static inline void r8a7740_init_pm_domains(void) {}
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && CONFIG_PM_GENERIC_DOMAINS */
 
 #endif /* __ASM_R8A7740_H__ */
--- 0001/arch/arm/mach-shmobile/pm-r8a7740.c
+++ work/arch/arm/mach-shmobile/pm-r8a7740.c	2014-04-24 19:13:23.000000000 +0900
@@ -13,7 +13,7 @@
 #include <mach/pm-rmobile.h>
 #include <mach/common.h>
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && defined(CONFIG_PM_GENERIC_DOMAINS)
 static int r8a7740_pd_a4s_suspend(void)
 {
 	/*
@@ -59,7 +59,7 @@ void __init r8a7740_init_pm_domains(void
 	pm_genpd_add_subdomain_names("A4S", "A3SP");
 }
 
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && CONFIG_PM_GENERIC_DOMAINS */
 
 #ifdef CONFIG_SUSPEND
 static int r8a7740_enter_suspend(suspend_state_t suspend_state)
--- 0001/arch/arm/mach-shmobile/pm-rmobile.c
+++ work/arch/arm/mach-shmobile/pm-rmobile.c	2014-04-24 19:09:08.000000000 +0900
@@ -27,7 +27,7 @@
 #define PSTR_RETRIES	100
 #define PSTR_DELAY_US	10
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && defined(CONFIG_PM_GENERIC_DOMAINS)
 static int rmobile_pd_power_down(struct generic_pm_domain *genpd)
 {
 	struct rmobile_pm_domain *rmobile_pd = to_rmobile_pd(genpd);
@@ -183,4 +183,4 @@ void rmobile_add_devices_to_domains(stru
 		rmobile_add_device_to_domain_td(data[j].domain_name,
 						data[j].pdev, &latencies);
 }
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && CONFIG_PM_GENERIC_DOMAINS */

             reply	other threads:[~2014-05-11 23:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-11 23:16 Magnus Damm [this message]
2014-05-12  7:50 ` [PATCH/RFC] ARM: shmobile: r8a7740 without PM domains prototype Geert Uytterhoeven

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=20140511231652.19926.53110.sendpatchset@w520 \
    --to=magnus.damm@gmail.com \
    --cc=linux-sh@vger.kernel.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