summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThor Thayer <thor.thayer@linux.intel.com>2019-03-11 23:18:03 +0100
committerLee Jones <lee.jones@linaro.org>2019-04-02 08:37:45 +0200
commitf36e789a1f8d0b75ee2b459dfac10efd7d299a6d (patch)
tree27571ad233594339795ba36a70d8e8c589ede1f6 /include
parentLinux 5.1-rc1 (diff)
downloadlinux-f36e789a1f8d0b75ee2b459dfac10efd7d299a6d.tar.xz
linux-f36e789a1f8d0b75ee2b459dfac10efd7d299a6d.zip
mfd: altera-sysmgr: Add SOCFPGA System Manager
The SOCFPGA System Manager register block aggregates different peripheral functions into one area. On 32 bit ARM parts, handle in the same way as syscon. On 64 bit ARM parts, the System Manager can only be accessed by EL3 secure mode. Since a SMC call to EL3 is required, this new driver uses regmaps similar to syscon to handle the SMC call. Since regmaps abstract out the underlying register access, the changes to drivers accessing the System Manager are minimal. Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/altera-sysmgr.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/mfd/altera-sysmgr.h b/include/linux/mfd/altera-sysmgr.h
new file mode 100644
index 000000000000..b1ef11a83872
--- /dev/null
+++ b/include/linux/mfd/altera-sysmgr.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2018-2019 Intel Corporation
+ * Copyright (C) 2012 Freescale Semiconductor, Inc.
+ * Copyright (C) 2012 Linaro Ltd.
+ */
+
+#ifndef __LINUX_MFD_ALTERA_SYSMGR_H__
+#define __LINUX_MFD_ALTERA_SYSMGR_H__
+
+#include <linux/err.h>
+#include <linux/errno.h>
+#include <linux/firmware/intel/stratix10-smc.h>
+
+struct device_node;
+
+#ifdef CONFIG_MFD_ALTERA_SYSMGR
+struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np,
+ const char *property);
+#else
+static inline struct regmap *
+altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np,
+ const char *property)
+{
+ return ERR_PTR(-ENOTSUPP);
+}
+#endif
+
+#endif /* __LINUX_MFD_ALTERA_SYSMGR_H__ */