From: Rickard Andersson <rickard.andersson@stericsson.com>
To: rjw@sisk.pl, linux-pm@vger.kernel.org
Cc: daniel.lezcano@linaro.org, hongbo.zhang@linaro.org,
khilman@linaro.org, ulf.hansson@linaro.org,
linus.walleij@stericsson.com, rickard.andersson@stericsson.com
Subject: [RFC PATCH 1/8] mfd: db8500: Add IO force function
Date: Fri, 22 Mar 2013 17:20:05 +0100 [thread overview]
Message-ID: <1363969212-14864-2-git-send-email-rickard.andersson@stericsson.com> (raw)
In-Reply-To: <1363969212-14864-1-git-send-email-rickard.andersson@stericsson.com>
The IO force signal needs to be controlled when
the system enters/exits the sleep state ApSleep.
This hardware signal tells the system that some
pins could be driven by GPIO settings instead of
directly from the hardware block.
Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com>
---
drivers/mfd/db8500-prcmu.c | 9 +++++++++
include/linux/mfd/db8500-prcmu.h | 1 +
include/linux/mfd/dbx500-prcmu.h | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 268f45d..7f32575 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -879,6 +879,15 @@ bool db8500_prcmu_pending_irq(void)
return false;
}
+void db8500_prcmu_set_ioforce(bool enable)
+{
+ u32 val = readl(PRCM_IOCR) & ~PRCM_IOCR_IOFORCE;
+
+ if (enable)
+ val |= PRCM_IOCR_IOFORCE;
+ writel(val, PRCM_IOCR);
+}
+
/*
* This function checks if the specified cpu is in in WFI. It's usage
* makes sense only if the gic is decoupled with the db8500_prcmu_gic_decouple
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 6ee4247..21660f6 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -547,6 +547,7 @@ int db8500_prcmu_gic_recouple(void);
int db8500_prcmu_copy_gic_settings(void);
bool db8500_prcmu_gic_pending_irq(void);
bool db8500_prcmu_pending_irq(void);
+void db8500_prcmu_set_ioforce(bool enable);
bool db8500_prcmu_is_cpu_in_wfi(int cpu);
void db8500_prcmu_enable_wakeups(u32 wakeups);
int db8500_prcmu_set_epod(u16 epod_id, u8 epod_state);
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index c202d6c..2909546 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -267,6 +267,11 @@ static inline bool prcmu_pending_irq(void)
return db8500_prcmu_pending_irq();
}
+static inline void prcmu_set_ioforce(bool force)
+{
+ return db8500_prcmu_set_ioforce(force);
+}
+
static inline int prcmu_set_epod(u16 epod_id, u8 epod_state)
{
return db8500_prcmu_set_epod(epod_id, epod_state);
--
1.8.2
next prev parent reply other threads:[~2013-03-22 16:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 16:20 [RFC PATCH 0/8] ux500 suspend-resume Rickard Andersson
2013-03-22 16:20 ` Rickard Andersson [this message]
2013-03-22 16:20 ` [RFC PATCH 2/8] ARM: ux500: Add platform suspend ops Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 3/8] PM / Domains: Add on-off notifiers Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 4/8] PM / Domains: Lookup domain by name Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 5/8] ARM: ux500: Create APE generic power domain Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 6/8] clk: ux500: Add PRCC power management Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 7/8] ARM: ux500: Create u8500-clk device Rickard Andersson
2013-03-22 16:20 ` [RFC PATCH 8/8] ARM: ux500: Add ApSleep state to suspend Rickard Andersson
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=1363969212-14864-2-git-send-email-rickard.andersson@stericsson.com \
--to=rickard.andersson@stericsson.com \
--cc=daniel.lezcano@linaro.org \
--cc=hongbo.zhang@linaro.org \
--cc=khilman@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=ulf.hansson@linaro.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).