From: Kevin Hilman <khilman@ti.com>
To: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/17] OMAP2: add voltage domains and connect to powerdomains
Date: Wed, 30 Mar 2011 17:16:12 -0700 [thread overview]
Message-ID: <1301530580-12046-10-git-send-email-khilman@ti.com> (raw)
In-Reply-To: <1301530580-12046-1-git-send-email-khilman@ti.com>
Create basic voltagedomains for OMAP2 and associate OMAP2 powerdomains
with the newly created voltage domains.
Signed-off-by: Kevin Hilman <khilman@ti.com>
---
arch/arm/mach-omap2/Makefile | 3 +-
arch/arm/mach-omap2/io.c | 2 +
arch/arm/mach-omap2/powerdomains2xxx_data.c | 4 +++
arch/arm/mach-omap2/voltage.h | 1 +
arch/arm/mach-omap2/voltagedomains2xxx_data.c | 32 +++++++++++++++++++++++++
5 files changed, 41 insertions(+), 1 deletions(-)
create mode 100644 arch/arm/mach-omap2/voltagedomains2xxx_data.c
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index a45cd64..7907947 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -91,7 +91,8 @@ obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \
# OMAP voltage domains
ifeq ($(CONFIG_PM),y)
voltagedomain-common := voltage.o
-obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common)
+obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) \
+ voltagedomains2xxx_data.o
obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \
voltagedomains3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 44c2c3e..b5c8e80 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -356,10 +356,12 @@ void __init omap2_init_common_infrastructure(void)
u8 postsetup_state;
if (cpu_is_omap242x()) {
+ omap2xxx_voltagedomains_init();
omap2xxx_powerdomains_init();
omap2xxx_clockdomains_init();
omap2420_hwmod_init();
} else if (cpu_is_omap243x()) {
+ omap2xxx_voltagedomains_init();
omap2xxx_powerdomains_init();
omap2xxx_clockdomains_init();
omap2430_hwmod_init();
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_data.c b/arch/arm/mach-omap2/powerdomains2xxx_data.c
index cc389fb..274f64c 100644
--- a/arch/arm/mach-omap2/powerdomains2xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains2xxx_data.c
@@ -38,6 +38,7 @@ static struct powerdomain dsp_pwrdm = {
.pwrsts_mem_on = {
[0] = PWRSTS_ON,
},
+ .voltdm = { .name = "core" },
};
static struct powerdomain mpu_24xx_pwrdm = {
@@ -53,6 +54,7 @@ static struct powerdomain mpu_24xx_pwrdm = {
.pwrsts_mem_on = {
[0] = PWRSTS_ON,
},
+ .voltdm = { .name = "core" },
};
static struct powerdomain core_24xx_pwrdm = {
@@ -71,6 +73,7 @@ static struct powerdomain core_24xx_pwrdm = {
[1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
[2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */
},
+ .voltdm = { .name = "core" },
};
@@ -95,6 +98,7 @@ static struct powerdomain mdm_pwrdm = {
.pwrsts_mem_on = {
[0] = PWRSTS_ON, /* MEMONSTATE */
},
+ .voltdm = { .name = "core" },
};
#endif /* CONFIG_SOC_OMAP2430 */
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index 25cfb5c..cacd76e 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -180,6 +180,7 @@ static inline int omap_voltage_late_init(void)
}
#endif
+extern void omap2xxx_voltagedomains_init(void);
extern void omap3xxx_voltagedomains_init(void);
extern void omap44xx_voltagedomains_init(void);
diff --git a/arch/arm/mach-omap2/voltagedomains2xxx_data.c b/arch/arm/mach-omap2/voltagedomains2xxx_data.c
new file mode 100644
index 0000000..69ff261
--- /dev/null
+++ b/arch/arm/mach-omap2/voltagedomains2xxx_data.c
@@ -0,0 +1,32 @@
+/*
+ * OMAP3 voltage domain data
+ *
+ * Copyright (C) 2007, 2010 Texas Instruments, Inc.
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include "voltage.h"
+
+static struct voltagedomain omap2_voltdm_core = {
+ .name = "core",
+};
+
+static struct voltagedomain omap2_voltdm_wkup = {
+ .name = "wakeup",
+};
+
+static struct voltagedomain *voltagedomains_omap2[] __initdata = {
+ &omap2_voltdm_core,
+ &omap2_voltdm_wkup,
+ NULL,
+};
+
+void __init omap2xxx_voltagedomains_init(void)
+{
+ voltdm_init(voltagedomains_omap2);
+}
--
1.7.4
next prev parent reply other threads:[~2011-03-31 0:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 0:16 [PATCH 00/17] OMAP: voltage layer cleanup and restructure: part 1 Kevin Hilman
2011-03-31 0:16 ` [PATCH 01/17] OMAP2+: hwmod: remove unused voltagedomain pointer Kevin Hilman
2011-03-31 0:16 ` [PATCH 02/17] OMAP2+: voltage: move PRCM mod offets into VC/VP structures Kevin Hilman
2011-03-31 0:16 ` [PATCH 03/17] OMAP2+: voltage: move prm_irqst_reg from VP into voltage domain Kevin Hilman
2011-03-31 0:16 ` [PATCH 04/17] OMAP2+: voltage: start towards a new voltagedomain layer Kevin Hilman
2011-03-31 0:16 ` [PATCH 05/17] OMAP3: voltage: rename "mpu" voltagedomain to "mpu_iva" Kevin Hilman
2011-03-31 0:16 ` [PATCH 06/17] OMAP3: voltagedomain data: add wakeup domain Kevin Hilman
2011-03-31 0:16 ` [PATCH 07/17] OMAP3+: voltage: add scalable flag to voltagedomain Kevin Hilman
2011-03-31 0:16 ` [PATCH 08/17] OMAP2+: powerdomain: add voltagedomain to struct powerdomain Kevin Hilman
2011-03-31 0:16 ` Kevin Hilman [this message]
2011-03-31 0:16 ` [PATCH 10/17] OMAP3: powerdomain data: add voltage domains Kevin Hilman
2011-03-31 0:16 ` [PATCH 11/17] OMAP4: " Kevin Hilman
2011-03-31 0:16 ` [PATCH 12/17] OMAP2+: powerdomain: add voltage domain lookup during register Kevin Hilman
2011-03-31 0:16 ` [PATCH 13/17] OMAP2+: voltage: keep track of powerdomains in each voltagedomain Kevin Hilman
2011-03-31 0:16 ` [PATCH 14/17] OMAP2+: voltage: split voltage controller (VC) code into dedicated layer Kevin Hilman
2011-03-31 0:16 ` [PATCH 15/17] OMAP2+: voltage: move VC into struct voltagedomain, misc. renames Kevin Hilman
2011-03-31 0:16 ` [PATCH 16/17] OMAP2+: voltage: split out voltage processor (VP) code into new layer Kevin Hilman
2011-03-31 0:16 ` [PATCH 17/17] OMAP2+: VC: support PMICs with separate voltage and command registers Kevin Hilman
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=1301530580-12046-10-git-send-email-khilman@ti.com \
--to=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@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;
as well as URLs for NNTP newsgroup(s).