From patchwork Tue Nov 13 16:06:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thor Thayer X-Patchwork-Id: 10681069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9AA114BA for ; Tue, 13 Nov 2018 16:05:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C519C2074F for ; Tue, 13 Nov 2018 16:05:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8908285DA; Tue, 13 Nov 2018 16:05:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CA7962074F for ; Tue, 13 Nov 2018 16:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DTVV37NHgs5p1uAcGOsLvnLXZX1Jy0hYphJjjaN6gys=; b=HkfT1xwN2Lz3r0tiKz4FKwG7Rn wnVMJ5Iia/plWGtYQAvYHmtm440OBQ2WfK6ttE/K3kBtyxWWDEvaVSp3LusyjLxb4BBiAnjBtRMK4 OSPKAtXoGQXOvaSBaJhXndrSxa9c3ONnh1qcG+eJ0tmHhb5VpvI7BRaLhhWaSwB4U0yQsmrpaOw1S 8RRTTBVoSJZcuSndN+rjviuH6MNmj8kz3mk7BQnOAYB9Te+XWN4xA5l7jeUoO+8BvmuDZ6QTATvpI FunopzMd55leVsSdP9qErHcM+0XR4+jT3hcMCpBA4oRGsFpywifnLO+39WGKu5AY4xQPmERHFjNMp VTVbtXlQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBn-00029m-Ks; Tue, 13 Nov 2018 16:05:19 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBl-00026S-Lv for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Nov 2018 16:05:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/vKeEGx0eKuEVW66ytEllCPnNg9KsaBb7EaxWCoxthY=; b=i9L6EOb+nagXREbyw5Q9/LtQ5 ZsIMiNpZZmNZhHqD3iOMK4JGSe0z92SGBcHTNLKuw6+1tpQst9PsgfXiM1qM0UR0h5Ud6TYqS/dmP HpMsuWBo7GMEjOVgTwPyLwSuUmZ7tjGuBnZX966/XjrrG43kCdeE453DrlXBrs7oHHvnNUiSbNHpd MAZxhAPc5htgQ+uhN5y15WHaFVZIhvFwtM+QoUfozPRKdXburIu3dQo/OHyIl/z+HUktu8lj2zQdL o4Gs3Rpp6/FicPFv0iQ0aQo1Nvz/QAXNsn5hUKrLYodqLkkZo3mkdWhKZdFX2UORnnbM9zjk3EwDv pa3ut5mKQ==; Received: from mga12.intel.com ([192.55.52.136]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBd-0003vp-JG for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 16:05:15 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 08:03:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,499,1534834800"; d="scan'208";a="280745434" Received: from tthayer-hp-z620.an.intel.com ([10.122.105.146]) by fmsmga006.fm.intel.com with ESMTP; 13 Nov 2018 08:03:53 -0800 From: thor.thayer@linux.intel.com To: lee.jones@linaro.org, dinguyen@kernel.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com Subject: [RESEND 1/4] mfd: altera-sysmgr: Add SOCFPGA System Manager abstraction Date: Tue, 13 Nov 2018 10:06:11 -0600 Message-Id: <1542125174-8204-2-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542125174-8204-1-git-send-email-thor.thayer@linux.intel.com> References: <1542125174-8204-1-git-send-email-thor.thayer@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_160510_125610_613B17F5 X-CRM114-Status: GOOD ( 36.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thor Thayer , arnd@arndb.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, olof@lixom.net, mcoquelin.stm32@gmail.com, mchehab+samsung@kernel.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thor Thayer The SOCFPGA System Manager register block aggregate different peripheral functions into one place. On 32 bit ARM parts, the syscon framework fits this problem well. On 64 bit ARM parts, the System Manager can only be accessed by EL3 secure mode. Since a SMC call to EL3 is required, a new driver using regmaps similar to syscon was created that handles the SMC call. Since regmaps abstract out the underlying register access, the changes to drivers using System Manager are minimal. Signed-off-by: Thor Thayer --- Resend - update use_single_rw to use_single_read and use_single_write which was added in 4.20. --- MAINTAINERS | 6 + drivers/mfd/Kconfig | 9 ++ drivers/mfd/Makefile | 1 + drivers/mfd/altera-sysmgr.c | 311 ++++++++++++++++++++++++++++++++++++++ include/linux/mfd/altera-sysmgr.h | 113 ++++++++++++++ 5 files changed, 440 insertions(+) create mode 100644 drivers/mfd/altera-sysmgr.c create mode 100644 include/linux/mfd/altera-sysmgr.h diff --git a/MAINTAINERS b/MAINTAINERS index f4855974f325..a6e997f6ea9d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -707,6 +707,12 @@ L: linux-gpio@vger.kernel.org S: Maintained F: drivers/gpio/gpio-altera.c +ALTERA SYSTEM MANAGER DRIVER +M: Thor Thayer +S: Maintained +F: drivers/mfd/altera-sysmgr.c +F: include/linux/mfd/altera-sysgmr.h + ALTERA SYSTEM RESOURCE DRIVER FOR ARRIA10 DEVKIT M: Thor Thayer S: Maintained diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index f461460a2aeb..e674d0bf3501 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -29,6 +29,15 @@ config MFD_ALTERA_A10SR accessing the external gpio extender (LEDs & buttons) and power supply alarms (hwmon). +config MFD_ALTERA_SYSMGR + bool "Altera SOCFPGA System Manager" + depends on (ARCH_SOCFPGA || ARCH_STRATIX10) && OF + select MFD_SYSCON + help + Select this to get System Manager support for all Altera branded + SOCFPGAs. The SOCFPGA System Manager handles all SOCFPGAs by + using syscon for ARM32 parts and SMC calls to EL3 for ARM64 parts. + config MFD_ACT8945A tristate "Active-semi ACT8945A" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 12980a4ad460..c649f6efed5f 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -233,6 +233,7 @@ obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI) += intel_soc_pmic_chtdc_ti.o obj-$(CONFIG_MFD_MT6397) += mt6397-core.o obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o +obj-$(CONFIG_MFD_ALTERA_SYSMGR) += altera-sysmgr.o obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o obj-$(CONFIG_MFD_STM32_LPTIMER) += stm32-lptimer.o diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c new file mode 100644 index 000000000000..3f1a45b99e66 --- /dev/null +++ b/drivers/mfd/altera-sysmgr.c @@ -0,0 +1,311 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2017-2018, Intel Corporation. + * Copyright (C) 2012 Freescale Semiconductor, Inc. + * Copyright (C) 2012 Linaro Ltd. + * + * Based on syscon driver. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static struct platform_driver sysmgr_driver; + +/** + * struct altr_sysmgr - Altera SOCFPGA System Manager + * @regmap: the regmap used for System Manager accesses. + * @base : the base address for the System Manager + */ +struct altr_sysmgr { + struct regmap *regmap; + void __iomem *base; +}; + +/** + * Only 1 instance of System Manager is needed but many + * consumers will want to access it with the matching + * functions below. + */ +static struct altr_sysmgr *p_sysmgr; + +/** + * s10_protected_reg_write + * Write to a protected SMC register. + * @base: Base address of System Manager + * @reg: Address offset of register + * @val: Value to write + * Return: INTEL_SIP_SMC_STATUS_OK (0) on success + * INTEL_SIP_SMC_REG_ERROR on error + * INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION if not supported + */ +static int s10_protected_reg_write(void __iomem *base, + unsigned int reg, unsigned int val) +{ + struct arm_smccc_res result; + unsigned long sysmgr_base = (unsigned long)base; + + arm_smccc_smc(INTEL_SIP_SMC_REG_WRITE, sysmgr_base + reg, + val, 0, 0, 0, 0, 0, &result); + + return (int)result.a0; +} + +/** + * s10_protected_reg_read + * Read the status of a protected SMC register + * @base: Base address of System Manager. + * @reg: Address of register + * @val: Value read. + * Return: INTEL_SIP_SMC_STATUS_OK (0) on success + * INTEL_SIP_SMC_REG_ERROR on error + * INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION if not supported + */ +static int s10_protected_reg_read(void __iomem *base, + unsigned int reg, unsigned int *val) +{ + struct arm_smccc_res result; + unsigned long sysmgr_base = (unsigned long)base; + + arm_smccc_smc(INTEL_SIP_SMC_REG_READ, sysmgr_base + reg, + 0, 0, 0, 0, 0, 0, &result); + + *val = (unsigned int)result.a1; + + return (int)result.a0; +} + +static const struct regmap_config s10_sysmgr_regmap_cfg = { + .name = "s10_sysmgr", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .reg_read = s10_protected_reg_read, + .reg_write = s10_protected_reg_write, + .fast_io = true, + .use_single_read = true, + .use_single_write = true, +}; + +/** + * socfpga_is_s10 + * Determine if running on Stratix10 platform. + * Return: True if running Stratix10, otherwise false. + */ +static int socfpga_is_s10(void) +{ + return of_machine_is_compatible("altr,socfpga-stratix10"); +} + +/** + * of_sysmgr_register + * Create and register the Altera System Manager regmap. + * Return: Pointer to new sysmgr on success. + * Pointer error on failure. + */ +static struct altr_sysmgr *of_sysmgr_register(struct device_node *np) +{ + struct altr_sysmgr *sysmgr; + struct regmap *regmap; + u32 reg_io_width; + int ret; + struct regmap_config sysmgr_config = s10_sysmgr_regmap_cfg; + struct resource res; + + if (!of_device_is_compatible(np, "altr,sys-mgr")) + return ERR_PTR(-EINVAL); + + sysmgr = kzalloc(sizeof(*sysmgr), GFP_KERNEL); + if (!sysmgr) + return ERR_PTR(-ENOMEM); + + if (of_address_to_resource(np, 0, &res)) { + ret = -ENOMEM; + goto err_map; + } + + /* Need physical address for SMCC call */ + sysmgr->base = (void __iomem *)res.start; + + /* + * search for reg-io-width property in DT. If it is not provided, + * default to 4 bytes. regmap_init will return an error if values + * are invalid so there is no need to check them here. + */ + ret = of_property_read_u32(np, "reg-io-width", ®_io_width); + if (ret) + reg_io_width = 4; + + sysmgr_config.reg_stride = reg_io_width; + sysmgr_config.val_bits = reg_io_width * 8; + sysmgr_config.max_register = resource_size(&res) - reg_io_width; + + regmap = regmap_init(NULL, NULL, sysmgr->base, &sysmgr_config); + if (IS_ERR(regmap)) { + pr_err("regmap init failed\n"); + ret = PTR_ERR(regmap); + goto err_map; + } + + sysmgr->regmap = regmap; + + p_sysmgr = sysmgr; + + return sysmgr; + +err_map: + kfree(sysmgr); + return ERR_PTR(ret); +} + +struct regmap *altr_sysmgr_node_to_regmap(struct device_node *np) +{ + struct altr_sysmgr *sysmgr = NULL; + + if (!socfpga_is_s10()) + return syscon_node_to_regmap(np); + + if (!p_sysmgr) + sysmgr = of_sysmgr_register(np); + else + sysmgr = p_sysmgr; + + if (IS_ERR_OR_NULL(sysmgr)) + return ERR_CAST(sysmgr); + + return sysmgr->regmap; +} +EXPORT_SYMBOL_GPL(altr_sysmgr_node_to_regmap); + +struct regmap *altr_sysmgr_regmap_lookup_by_compatible(const char *s) +{ + struct device_node *sysmgr_np; + struct regmap *regmap; + + if (!socfpga_is_s10()) + return syscon_regmap_lookup_by_compatible(s); + + sysmgr_np = of_find_compatible_node(NULL, NULL, s); + if (!sysmgr_np) + return ERR_PTR(-ENODEV); + + regmap = altr_sysmgr_node_to_regmap(sysmgr_np); + of_node_put(sysmgr_np); + + return regmap; +} +EXPORT_SYMBOL_GPL(altr_sysmgr_regmap_lookup_by_compatible); + +static int sysmgr_match_pdevname(struct device *dev, void *data) +{ + return !strcmp(dev_name(dev), (const char *)data); +} + +struct regmap *altr_sysmgr_regmap_lookup_by_pdevname(const char *s) +{ + struct device *dev; + struct altr_sysmgr *sysmgr; + + if (!socfpga_is_s10()) + return syscon_regmap_lookup_by_pdevname(s); + + dev = driver_find_device(&sysmgr_driver.driver, NULL, (void *)s, + sysmgr_match_pdevname); + if (!dev) + return ERR_PTR(-EPROBE_DEFER); + + sysmgr = dev_get_drvdata(dev); + + return sysmgr->regmap; +} +EXPORT_SYMBOL_GPL(altr_sysmgr_regmap_lookup_by_pdevname); + +struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np, + const char *property) +{ + struct device_node *sysmgr_np; + struct regmap *regmap; + + if (!socfpga_is_s10()) + return syscon_regmap_lookup_by_phandle(np, property); + + if (property) + sysmgr_np = of_parse_phandle(np, property, 0); + else + sysmgr_np = np; + + if (!sysmgr_np) + return ERR_PTR(-ENODEV); + + regmap = altr_sysmgr_node_to_regmap(sysmgr_np); + of_node_put(sysmgr_np); + + return regmap; +} +EXPORT_SYMBOL_GPL(altr_sysmgr_regmap_lookup_by_phandle); + +static int sysmgr_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct altr_sysmgr *sysmgr; + struct resource *res; + + if (!socfpga_is_s10()) + return -ENODEV; + + /* Skip Initialization if already created */ + if (p_sysmgr) + goto finish; + + sysmgr = of_sysmgr_register(pdev->dev.of_node); + if (IS_ERR_OR_NULL(sysmgr)) { + dev_err(dev, "regmap init failed\n"); + return -ENODEV; + } + +finish: + platform_set_drvdata(pdev, p_sysmgr); + + dev_dbg(dev, "regmap %pR registered\n", res); + + return 0; +} + +static const struct of_device_id altr_sysmgr_of_match[] = { + { .compatible = "altr,sys-mgr" }, + {}, +}; +MODULE_DEVICE_TABLE(of, altr_sysmgr_of_match); + +static struct platform_driver altr_sysmgr_driver = { + .probe = sysmgr_probe, + .driver = { + .name = "altr,system_manager", + .of_match_table = altr_sysmgr_of_match, + }, +}; + +static int __init altr_sysmgr_init(void) +{ + return platform_driver_register(&altr_sysmgr_driver); +} +core_initcall(altr_sysmgr_init); + +static void __exit altr_sysmgr_exit(void) +{ + platform_driver_unregister(&altr_sysmgr_driver); +} +module_exit(altr_sysmgr_exit); + +MODULE_AUTHOR("Thor Thayer <>"); +MODULE_DESCRIPTION("SOCFPGA System Manager driver"); +MODULE_LICENSE("GPL v2"); diff --git a/include/linux/mfd/altera-sysmgr.h b/include/linux/mfd/altera-sysmgr.h new file mode 100644 index 000000000000..b82116706319 --- /dev/null +++ b/include/linux/mfd/altera-sysmgr.h @@ -0,0 +1,113 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2018 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 +#include + +struct device_node; + +#ifdef CONFIG_MFD_ALTERA_SYSMGR +struct regmap *altr_sysmgr_node_to_regmap(struct device_node *np); +struct regmap *altr_sysmgr_regmap_lookup_by_compatible(const char *s); +struct regmap *altr_sysmgr_regmap_lookup_by_pdevname(const char *s); +struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np, + const char *property); + +/* + * Functions specified by ARM SMC Calling convention: + * + * FAST call executes atomic operations, returns when the requested operation + * has completed. + * STD call starts a operation which can be preempted by a non-secure + * interrupt. + * + * a0..a7 is used as register names in the descriptions below, on arm32 + * that translates to r0..r7 and on arm64 to w0..w7. + */ + +#define INTEL_SIP_SMC_STD_CALL_VAL(func_num) \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_STD_CALL, ARM_SMCCC_SMC_64, \ + ARM_SMCCC_OWNER_SIP, (func_num)) + +#define INTEL_SIP_SMC_FAST_CALL_VAL(func_num) \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, ARM_SMCCC_SMC_64, \ + ARM_SMCCC_OWNER_SIP, (func_num)) + +#define INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION 0xFFFFFFFF +#define INTEL_SIP_SMC_STATUS_OK 0x0 +#define INTEL_SIP_SMC_REG_ERROR 0x5 + +/* + * Request INTEL_SIP_SMC_REG_READ + * + * Read a protected register using SMCCC + * + * Call register usage: + * a0: INTEL_SIP_SMC_REG_READ. + * a1: register address. + * a2-7: not used. + * + * Return status: + * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_REG_ERROR, or + * INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION + * a1: Value in the register + * a2-3: not used. + */ +#define INTEL_SIP_SMC_FUNCID_REG_READ 7 +#define INTEL_SIP_SMC_REG_READ \ + INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_READ) + +/* + * Request INTEL_SIP_SMC_REG_WRITE + * + * Write a protected register using SMCCC + * + * Call register usage: + * a0: INTEL_SIP_SMC_REG_WRITE. + * a1: register address + * a2: value to program into register. + * a3-7: not used. + * + * Return status: + * a0: INTEL_SIP_SMC_STATUS_OK, INTEL_SIP_SMC_REG_ERROR, or + * INTEL_SIP_SMC_RETURN_UNKNOWN_FUNCTION + * a1-3: not used. + */ +#define INTEL_SIP_SMC_FUNCID_REG_WRITE 8 +#define INTEL_SIP_SMC_REG_WRITE \ + INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_REG_WRITE) + +#else +static inline struct regmap *altr_sysmgr_node_to_regmap(struct device_node *np) +{ + return ERR_PTR(-ENOTSUPP); +} + +static inline struct regmap * +altr_sysmgr_regmap_lookup_by_compatible(const char *s) +{ + return ERR_PTR(-ENOTSUPP); +} + +static inline struct regmap * +altr_sysmgr_regmap_lookup_by_pdevname(const char *s) +{ + return ERR_PTR(-ENOTSUPP); +} + +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__ */ From patchwork Tue Nov 13 16:06:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thor Thayer X-Patchwork-Id: 10681071 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 745561709 for ; Tue, 13 Nov 2018 16:05:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6135F2855E for ; Tue, 13 Nov 2018 16:05:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F45F285FF; Tue, 13 Nov 2018 16:05:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2732E2855E for ; Tue, 13 Nov 2018 16:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HaqicJ1z2KZ9gjlqORf3N0IoWxj+xEomx8/SyXpIjnc=; b=CPuAPhZVX/w78MnhfVAM3jrogj LzIEeI3Yd6z8fXFUN4LetdkOEvE4/ZW5i1n+A/Nh45eo4Uo0r0FlGeR6aBB05ZnlhiEt0dIwcXbu/ qc5jmvPFvem2fmuH+ceV1vzGT//QUOGHi/SKZRNw2pGA7l+JTtVhhYn4NYm9ufRY+aiZWGXcvTYRG ITGu85Ja8pjF2xrsMoENkFj9XuuwxABBYd+tkbMm8N35r7KvNZW4azBk44XeZrUtkLlYhSCxfMQ+w OtRYCJZs3FjMGNfZ+/waQLq9b4UJrirSdQhgCc4YxuIUfhv1KKdjQdlm9lBEIjAlanBZPZ0rYeoVz KH+TmlkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBx-0002M9-Hi; Tue, 13 Nov 2018 16:05:29 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBp-0002B5-B1 for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Nov 2018 16:05:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Mwbhxak3zXbJ1LBTpDiVTRxLhnlHCIB/Atjc+UICPqk=; b=tVvkTQoethdlyaVtXjuFM7cph z9XgVgVZuLKMzNP3R4e2Y2+6lLn2IufqWNASqhRX/zOTrPOzEnIIX2+OA0d7aRUa9BuMkkT+Gzq/Z jCgFb4/Fw4Nt2j5VIrvqHjT1SSg5sF2TDhGc8ltujXdmrvGpqUaUNo+cROWIEeVCtTOIiaG9S6+xv f1Kr6S6ahWxrYzV6PZZN/2lSZYnc6kIbVvHau44t7Nun+33D9I2jP4xx9s7WeCanH9RrMv+6XSKOR wn+6WnVWT/nJF+QfvwY8a6Cp1dbXrA+zzWmDQNeIKf9n2jWRDU5HXo5UI5K3JFj5CdUmvnmxjcVe/ RXEKoL1Qw==; Received: from mga12.intel.com ([192.55.52.136]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBk-0003vp-My for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 16:05:19 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 08:03:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,499,1534834800"; d="scan'208";a="280745436" Received: from tthayer-hp-z620.an.intel.com ([10.122.105.146]) by fmsmga006.fm.intel.com with ESMTP; 13 Nov 2018 08:03:55 -0800 From: thor.thayer@linux.intel.com To: lee.jones@linaro.org, dinguyen@kernel.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com Subject: [RESEND 2/4] ARM: socfpga_defconfig: Enable CONFIG_MTD_ALTERA_SYSMGR Date: Tue, 13 Nov 2018 10:06:12 -0600 Message-Id: <1542125174-8204-3-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542125174-8204-1-git-send-email-thor.thayer@linux.intel.com> References: <1542125174-8204-1-git-send-email-thor.thayer@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_160517_129339_ED596E44 X-CRM114-Status: GOOD ( 10.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thor Thayer , arnd@arndb.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, olof@lixom.net, mcoquelin.stm32@gmail.com, mchehab+samsung@kernel.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thor Thayer Add System Manager driver by default for SOCFPGA ARM32 platforms. Signed-off-by: Thor Thayer --- arch/arm/configs/socfpga_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/socfpga_defconfig b/arch/arm/configs/socfpga_defconfig index 371fca4e1ab7..c510a32f9f0d 100644 --- a/arch/arm/configs/socfpga_defconfig +++ b/arch/arm/configs/socfpga_defconfig @@ -109,6 +109,7 @@ CONFIG_SENSORS_LTC2978_REGULATOR=y CONFIG_WATCHDOG=y CONFIG_DW_WATCHDOG=y CONFIG_MFD_ALTERA_A10SR=y +CONFIG_MFD_ALTERA_SYSMGR=y CONFIG_MFD_STMPE=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y From patchwork Tue Nov 13 16:06:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thor Thayer X-Patchwork-Id: 10681073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 22FAF1709 for ; Tue, 13 Nov 2018 16:05:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D7012855E for ; Tue, 13 Nov 2018 16:05:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00402285FF; Tue, 13 Nov 2018 16:05:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AE2C62855E for ; Tue, 13 Nov 2018 16:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=y7uzuYtasRfkpBy5uqIBQBEkf+3nEpVWsDchSvCZpts=; b=Te5lMBQi1YjxkjZHYinoNf5cQ/ T0PtqC01da1iees1ywL9vzHeze6bMVOUo3ghdibeTBeNLvZ+bNqYWZy6dIA+HKmXX+G96+9VuqEEX kWdf52/CxrqQeuLTaxVkC1CjLSkjnu5Ajagb3ZHLF/AU9ssSsZNdscMoXx1+LM5Z7OTyey+0STbZN r/4/qHZVN0mWs6MnINEtBtoyJXQpBeP62s8cSYsk3ceD0vbYmGEvLZKHaC6sp3GQvAH3XEOgz/brP ovNxkVz9cXGmC1xLtBl9/3Rh2Vi+4T1Bx3OwJ4blfkzTQ0lcwGQyhnQiZPoebBAF3Q+sVSA9nauiJ 8b7Tq9Ng==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbC9-0002bR-Vb; Tue, 13 Nov 2018 16:05:41 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBs-0002Ep-1m for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Nov 2018 16:05:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wq6wK1k8zzekrgVuCuMJhypy2GF6g9py8k8CmBb0ACY=; b=rsL9VXoGcA70uIa/kDZmYzbcw uJOKd3W/wtpbHiE+2xECTptzgD/MPj62OoAAyQSyAZ6L0Mdtf2SaxoXmU1ZD3lDIdzMWweQo1N1fn kRhZxBjU/haiK9Dz7KELGx4gEYmkIDiuMJzlF2ISVlpBYVjYMSvLR4T6XCbRLDollGNkZsYNzLIdf r3MfG0OpSGAfkYsWGw/mlZ/h68IHVfUlN9hfAaC3SOeGm/RUD4obTBNFfU0/NJMwPm/9sxb47vJMu tql8TDQ19x6as/GdOyhgw/UbQtOwTAYAkHPQmRLigtPkC9/Bs7bbno8P7IbpMSQMlkjwZdQF43IAM f91GQ8iYw==; Received: from mga12.intel.com ([192.55.52.136]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBo-0003vp-EE for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 16:05:22 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 08:03:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,499,1534834800"; d="scan'208";a="280745440" Received: from tthayer-hp-z620.an.intel.com ([10.122.105.146]) by fmsmga006.fm.intel.com with ESMTP; 13 Nov 2018 08:03:56 -0800 From: thor.thayer@linux.intel.com To: lee.jones@linaro.org, dinguyen@kernel.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com Subject: [RESEND 3/4] arm64: defconfig: Enable CONFIG_MTD_ALTERA_SYSMGR Date: Tue, 13 Nov 2018 10:06:13 -0600 Message-Id: <1542125174-8204-4-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542125174-8204-1-git-send-email-thor.thayer@linux.intel.com> References: <1542125174-8204-1-git-send-email-thor.thayer@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_160520_915485_354A2FA1 X-CRM114-Status: GOOD ( 11.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thor Thayer , arnd@arndb.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, olof@lixom.net, mcoquelin.stm32@gmail.com, mchehab+samsung@kernel.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thor Thayer Enable the Stratix10 System Manager by default. Signed-off-by: Thor Thayer --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index c9a57d11330b..873d807bb82b 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -392,6 +392,7 @@ CONFIG_MESON_WATCHDOG=m CONFIG_RENESAS_WDT=y CONFIG_UNIPHIER_WATCHDOG=y CONFIG_BCM2835_WDT=y +CONFIG_MFD_ALTERA_SYSMGR=y CONFIG_MFD_BD9571MWV=y CONFIG_MFD_AXP20X_RSB=y CONFIG_MFD_CROS_EC=y From patchwork Tue Nov 13 16:06:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thor Thayer X-Patchwork-Id: 10681075 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 012DF14BA for ; Tue, 13 Nov 2018 16:06:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE38C2018E for ; Tue, 13 Nov 2018 16:06:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB74827D29; Tue, 13 Nov 2018 16:06:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 73D782018E for ; Tue, 13 Nov 2018 16:06:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KfvqjDkeKoQVcLX+IMHDhF+Le7Cx+zvpdQwLajfKUPQ=; b=ulh1aBZTjZE8hVSPjeB9tmenb5 eYjlYKdYaDpv6AyKI75YOUb8+KsW/zRGM3NbGpyM+Ek3ungROTloAjA415elXw0BtLCPrk+2h57/j qgA5Hr8iCudyDrgTVmNkY+kufY2Oa7Wk1TvgegtDlHpn4eXxWNqV8Q9+ZjAzduMRuPYge9QIIjiWK 4/uOx/3EC4SwqN3UsysAxGkEXiXF/5OW6f+RFpzZAOm9TAob4ZmIFyj84MNs2zPkvb5YQgJCsKXA+ OGO3ClviPXBfpxv63rk1hkOclmwDLTh+AaQ9tSRDef0q+PX/AoOs4DhKhE8CVEzgFalYM5R5kJHVX UOslZkVQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbCZ-0002xW-4G; Tue, 13 Nov 2018 16:06:07 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBv-0002JW-MF for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Nov 2018 16:05:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MPR1cPIEjKmhaMgBUoqN6Crcc3zliURHlcx1NsSSzKQ=; b=p8ZorriZLkUrk4mPsK/FBo4vr 4bdHzQUhi7Yl5GZVNxdSKjbcbT31mAHVnn5bmM5+oUROfbp1bpsmMLftfMW0yVHYnuMyNqYcL3lnw TdAxCXNW/jd208YnYzOEqihHJDJj4d7plY7LgUaxkDN5/t3XNb9VpJVDk0XpYsJhboTJ5Mzc0MvCy TRpbDSF1sNsL9JPPWIChOE89afraRQ2/bh1xdLYjVU5K5/Nmywm+XAZMe5gzN5AGqTXHHA16/N1uR Qs9WMYhVZj9OWNwrT6SCHwYhXay+LwfC329ElLjLsbbpB5OUfZGDeZB+jmV4IfzXk/pt+IN9Afoac NrlH/QfIQ==; Received: from mga12.intel.com ([192.55.52.136]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMbBr-0003vp-85 for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 16:05:25 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 08:03:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,499,1534834800"; d="scan'208";a="280745444" Received: from tthayer-hp-z620.an.intel.com ([10.122.105.146]) by fmsmga006.fm.intel.com with ESMTP; 13 Nov 2018 08:03:57 -0800 From: thor.thayer@linux.intel.com To: lee.jones@linaro.org, dinguyen@kernel.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com Subject: [RESEND 4/4] net: stmmac: socfpga: Convert to shared System Manager driver Date: Tue, 13 Nov 2018 10:06:14 -0600 Message-Id: <1542125174-8204-5-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542125174-8204-1-git-send-email-thor.thayer@linux.intel.com> References: <1542125174-8204-1-git-send-email-thor.thayer@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_160523_615714_D5F64808 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thor Thayer , arnd@arndb.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, olof@lixom.net, mcoquelin.stm32@gmail.com, mchehab+samsung@kernel.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thor Thayer The ARM64 System Manager requires a different method of reading the System Manager than ARM32. A new System Manager driver was created to steer ARM32 System Manager calls to syscon and ARM64 System Manager calls to the new access method. Convert from syscon to the shared System Manager driver so that both ARM64 and ARM32 are supported. Signed-off-by: Thor Thayer --- drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c index 5b3b06a0a3bf..743c7f471edb 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c @@ -15,6 +15,7 @@ * Adopted from dwmac-sti.c */ +#include #include #include #include @@ -114,7 +115,8 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device * dwmac->interface = of_get_phy_mode(np); - sys_mgr_base_addr = syscon_regmap_lookup_by_phandle(np, "altr,sysmgr-syscon"); + sys_mgr_base_addr = + altr_sysmgr_regmap_lookup_by_phandle(np, "altr,sysmgr-syscon"); if (IS_ERR(sys_mgr_base_addr)) { dev_info(dev, "No sysmgr-syscon node found\n"); return PTR_ERR(sys_mgr_base_addr);