devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Abhilash Kesavan <a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	thomas.ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	inderpal.s-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
	nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	Dave.Martin-5wv7dgnIgG8@public.gmane.org,
	t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org
Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	will.deacon-5wv7dgnIgG8@public.gmane.org,
	arnd-r2nGTMty4D4@public.gmane.org
Subject: [PATCH 2/5] drivers/bus: arm-cci: Add common control interface for ACE ports
Date: Fri, 11 Apr 2014 23:31:48 +0530	[thread overview]
Message-ID: <1397239311-27717-3-git-send-email-a.kesavan@samsung.com> (raw)
In-Reply-To: <1397239311-27717-1-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

From: Andrew Bresticker <abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

cci_disable_port_by_cpu() can be used to disable an arbitrary
ACE port, but there is no C-callable way to enable an ACE port.
Change cci_disable_port_by_cpu() to cci_control_port_by_cpu()
to allow us to disable and enable a CPU's ACE port.

Signed-off-by: Andrew Bresticker <abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Signed-off-by: Abhilash Kesavan <a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/bus/arm-cci.c   |   13 +++++++------
 include/linux/arm-cci.h |    7 +++++--
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index 5a86da9..5668b40 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -763,10 +763,11 @@ static void notrace cci_port_control(unsigned int port, bool enable)
 }
 
 /**
- * cci_disable_port_by_cpu() - function to disable a CCI port by CPU
+ * cci_control_port_by_cpu() - function to control a CCI port by CPU
  *			       reference
  *
- * @mpidr: mpidr of the CPU whose CCI port should be disabled
+ * @mpidr: mpidr of the CPU whose CCI port should be enabled/disabled
+ * @enable: if true enables the port, if false disables it
  *
  * Disabling a CCI port for a CPU implies disabling the CCI port
  * controlling that CPU cluster. Code disabling CPU CCI ports
@@ -777,20 +778,20 @@ static void notrace cci_port_control(unsigned int port, bool enable)
  *	0 on success
  *	-ENODEV on port look-up failure
  */
-int notrace cci_disable_port_by_cpu(u64 mpidr)
+int notrace cci_control_port_by_cpu(u64 mpidr, bool enable)
 {
 	int cpu;
 	bool is_valid;
 	for (cpu = 0; cpu < nr_cpu_ids; cpu++) {
 		is_valid = cpu_port_is_valid(&cpu_port[cpu]);
 		if (is_valid && cpu_port_match(&cpu_port[cpu], mpidr)) {
-			cci_port_control(cpu_port[cpu].port, false);
+			cci_port_control(cpu_port[cpu].port, enable);
 			return 0;
 		}
 	}
 	return -ENODEV;
 }
-EXPORT_SYMBOL_GPL(cci_disable_port_by_cpu);
+EXPORT_SYMBOL_GPL(cci_control_port_by_cpu);
 
 /**
  * cci_enable_port_for_self() - enable a CCI port for calling CPU
@@ -936,7 +937,7 @@ int notrace __cci_control_port_by_index(u32 port, bool enable)
 	/*
 	 * CCI control for ports connected to CPUS is extremely fragile
 	 * and must be made to go through a specific and controlled
-	 * interface (ie cci_disable_port_by_cpu(); control by general purpose
+	 * interface (ie cci_control_port_by_cpu(); control by general purpose
 	 * indexing is therefore disabled for ACE ports.
 	 */
 	if (ports[port].type == ACE_PORT)
diff --git a/include/linux/arm-cci.h b/include/linux/arm-cci.h
index 79d6edf..c6c3ed0 100644
--- a/include/linux/arm-cci.h
+++ b/include/linux/arm-cci.h
@@ -29,7 +29,7 @@ struct device_node;
 #ifdef CONFIG_ARM_CCI
 extern bool cci_probed(void);
 extern int cci_ace_get_port(struct device_node *dn);
-extern int cci_disable_port_by_cpu(u64 mpidr);
+extern int cci_control_port_by_cpu(u64 mpidr, bool enable);
 extern int __cci_control_port_by_device(struct device_node *dn, bool enable);
 extern int __cci_control_port_by_index(u32 port, bool enable);
 #else
@@ -38,7 +38,10 @@ static inline int cci_ace_get_port(struct device_node *dn)
 {
 	return -ENODEV;
 }
-static inline int cci_disable_port_by_cpu(u64 mpidr) { return -ENODEV; }
+static inline int cci_disable_port_by_cpu(u64 mpidr, bool enable)
+{
+	return -ENODEV;
+}
 static inline int __cci_control_port_by_device(struct device_node *dn,
 					       bool enable)
 {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-04-11 18:01 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11 18:01 [PATCH 0/5] MCPM backend for Exynos5420 Abhilash Kesavan
     [not found] ` <1397239311-27717-1-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-11 18:01   ` [PATCH 1/5] ARM: bL_switcher: Don't enable bL switcher on systems without CCI Abhilash Kesavan
     [not found]     ` <1397239311-27717-2-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-11 18:14       ` Nicolas Pitre
     [not found]         ` <alpine.LFD.2.11.1404111406210.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-16 19:10           ` Abhilash Kesavan
2014-04-16 20:18             ` Nicolas Pitre
     [not found]               ` <alpine.LFD.2.11.1404161524050.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-21 15:57                 ` Abhilash Kesavan
     [not found]                   ` <CAM4voamv7CrGpnM_HgTsSU6jvb3TffC0BKKrvNh-VHj+u9EKOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-21 23:37                     ` Nicolas Pitre
2014-04-11 18:01   ` Abhilash Kesavan [this message]
     [not found]     ` <1397239311-27717-3-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-11 18:24       ` [PATCH 2/5] drivers/bus: arm-cci: Add common control interface for ACE ports Nicolas Pitre
     [not found]         ` <alpine.LFD.2.11.1404111419540.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-11 19:16           ` Abhilash Kesavan
2014-04-11 18:01   ` [PATCH 3/5] ARM: EXYNOS5420: Add IO mapping for non-secure SYSRAM Abhilash Kesavan
     [not found]     ` <1397239311-27717-4-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-14 11:25       ` Dave Martin
2014-04-14 11:47         ` Arnd Bergmann
2014-04-14 11:59           ` Dave Martin
     [not found]             ` <20140414115910.GD3844-M5GwZQ6tE7x5pKCnmE3YQBJ8xKzm50AiAL8bYrjMMd8@public.gmane.org>
2014-04-14 13:24               ` Arnd Bergmann
2014-04-16 19:10                 ` Abhilash Kesavan
2014-04-11 18:01   ` [PATCH 4/5] ARM: dts: exynos5420: add CCI node Abhilash Kesavan
     [not found]     ` <1397239311-27717-5-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-22  6:16       ` [PATCH v2 1/3] " Abhilash Kesavan
2014-04-11 18:01   ` [PATCH 5/5] arm: exynos: Add MCPM call-back functions Abhilash Kesavan
     [not found]     ` <1397239311-27717-6-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-11 20:23       ` Nicolas Pitre
     [not found]         ` <alpine.LFD.2.11.1404111426510.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-14 10:41           ` Dave Martin
     [not found]             ` <20140414104116.GA3844-M5GwZQ6tE7x5pKCnmE3YQBJ8xKzm50AiAL8bYrjMMd8@public.gmane.org>
2014-04-14 14:01               ` Nicolas Pitre
     [not found]                 ` <alpine.LFD.2.11.1404140956060.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-15  8:36                   ` Dave Martin
     [not found]                     ` <20140415083615.GC3596-M5GwZQ6tE7x5pKCnmE3YQBJ8xKzm50AiAL8bYrjMMd8@public.gmane.org>
2014-04-16 19:11                       ` Abhilash Kesavan
     [not found]                         ` <CAM4voamo5iiOQ5P1JyO8kekU6cuxoj4oAT+VpS14LNvWqw_T4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-17 10:03                           ` Dave Martin
     [not found]                             ` <20140417100302.GB18864-M5GwZQ6tE7x5pKCnmE3YQBJ8xKzm50AiAL8bYrjMMd8@public.gmane.org>
2014-04-21 15:57                               ` Abhilash Kesavan
     [not found]                                 ` <CAM4voamiJ-HZqz8Rgc-RTCjNRDaw5VQbs6GVfxPDxqCKKhm6XA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-22  2:11                                   ` Nicolas Pitre
2014-04-16 19:11               ` Abhilash Kesavan
     [not found]                 ` <CAM4voa=-29EsNRCebri1C9D5cWopTT4Ux_0UPGAvdjP60ADZZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-17  9:59                   ` Dave Martin
     [not found]                     ` <20140417095925.GA18864-M5GwZQ6tE7x5pKCnmE3YQBJ8xKzm50AiAL8bYrjMMd8@public.gmane.org>
2014-04-17 15:20                       ` Nicolas Pitre
     [not found]                         ` <alpine.LFD.2.11.1404171114370.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-17 15:38                           ` Dave Martin
     [not found]                             ` <20140417153812.GD18864-M5GwZQ6tE7x5pKCnmE3YQBJ8xKzm50AiAL8bYrjMMd8@public.gmane.org>
2014-04-21 15:57                               ` Abhilash Kesavan
2014-04-16 19:11           ` Abhilash Kesavan
2014-04-22  6:17       ` [PATCH v2 2/3] " Abhilash Kesavan
     [not found]         ` <1398147435-3122-1-git-send-email-a.kesavan-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-22 11:21           ` Daniel Lezcano
     [not found]             ` <535650AE.90501-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-22 15:40               ` Nicolas Pitre
     [not found]                 ` <alpine.LFD.2.11.1404221129150.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-22 19:21                   ` Daniel Lezcano
     [not found]                     ` <5356C134.8070707-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-22 19:56                       ` Nicolas Pitre
     [not found]                         ` <alpine.LFD.2.11.1404221540540.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-23 15:31                           ` Abhilash Kesavan
2014-04-23 16:13                           ` Lorenzo Pieralisi
     [not found]                             ` <20140423161325.GB1243-7AyDDHkRsp3ZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-06-17  2:38                               ` Abhilash Kesavan
     [not found]                                 ` <CAM4voa=Lv3xpHfHVcua1jpajEY1XPrXKK=vS4-_3r+etmB4DDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-19  8:56                                   ` Lorenzo Pieralisi
     [not found]                                     ` <20140619085607.GB5401-7AyDDHkRsp3ZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-06-19 12:23                                       ` Abhilash Kesavan
2014-04-23 15:31               ` Abhilash Kesavan
     [not found]                 ` <CAM4voa=WJiF-9wZB29JOFhz2kEE-TC0y6h-8GVwk3_JoXxpK+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-23 20:56                   ` Daniel Lezcano
2014-04-22 19:18           ` Nicolas Pitre
     [not found]             ` <alpine.LFD.2.11.1404221428070.980-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-04-23 15:31               ` Abhilash Kesavan
2014-04-22  6:16   ` [PATCH v2 0/3] MCPM backend for Exynos5420 Abhilash Kesavan

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=1397239311-27717-3-git-send-email-a.kesavan@samsung.com \
    --to=a.kesavan-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=Dave.Martin-5wv7dgnIgG8@public.gmane.org \
    --cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=inderpal.s-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=thomas.ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.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).