Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp186035imj; Thu, 14 Feb 2019 18:13:26 -0800 (PST) X-Google-Smtp-Source: AHgI3IaCjrM0Iv9ObdhHhHhZaxMkD+Z0VHC239TLu9Z48dzKXW54Gd41oaWiGJcAyrn+0U68ByKD X-Received: by 2002:a63:2c7:: with SMTP id 190mr6480873pgc.367.1550196806645; Thu, 14 Feb 2019 18:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550196806; cv=none; d=google.com; s=arc-20160816; b=lNkLp3DLGhTYZssymlAGd2HCYgFhrif9JhMe2XIDGs0l3XsS2c1hXJdNOdlvcda9hW Myl6sQ3Bv6tSPNOHuHYLJ2F7DTrBrEwlG9ag0XQ1W8yH7i/CaGecqOoR71iK+/Ict9bQ si1NBxxDieuqBkaB31X2GbM4BPzReugBjMHgzEGtj67n4qX8aciZJG8/US8AmwNwGpPe w3o9ZSNVEFU4yPe93A57iC47F9x2QXkEMy2cw4lmCr3RIAKrKT30DPOtJM0mCpgoP3bm PZrxnxisr5xaXMq0HdDA9PI2H0zOMVZsYhw72FdMUVmnpwZ8hvK8coOmoZK4ArQPG+Ms TTkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=wbXqeFO1RMKXNJ848luCIjb2m7YRnIYpUjcj2vi3Unc=; b=IFr4HRSojATsyR8wfysYa+AWE3RlF/fFE5BKLR6Y9ipZP+1qWqZCRSpvT7tvAzTt2Z KSni6c5KjtThDaDh8L3+Di9ctkuZ42WcVJ1a4P4SKBA/tiDngbl8GCg+b7oakdAmXiKW E/yFNiUX2p+1i53IlXwSidgtVO2CATOqWLF4qVBJvOHxfXFiLteFJPuODodLYDFQ8QpJ XNjc9wzwmZ8q/n07VtPD11TZY1A34ACC/nkMbX5aAL90h0wngBUeo4YRurkcM0E/QNYw Nb1Puy+pguDS0WFTsO2v3mn+NEQ33VO15qE38ZoJfYhUtjE/J0rCBoGcECBwJuwGSkLB etuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si2530178plo.406.2019.02.14.18.13.10; Thu, 14 Feb 2019 18:13:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440025AbfBNUmD (ORCPT + 99 others); Thu, 14 Feb 2019 15:42:03 -0500 Received: from mga06.intel.com ([134.134.136.31]:37550 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439997AbfBNUmB (ORCPT ); Thu, 14 Feb 2019 15:42:01 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2019 12:42:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,370,1544515200"; d="scan'208";a="143557686" Received: from tthayer-hp-z620.an.intel.com ([10.122.105.146]) by fmsmga002.fm.intel.com with ESMTP; 14 Feb 2019 12:41:59 -0800 From: thor.thayer@linux.intel.com To: lee.jones@linaro.org, arnd@arndb.de, 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, olof@lixom.net Cc: davem@davemloft.net, mcoquelin.stm32@gmail.com, mchehab+samsung@kernel.org, mark.rutland@arm.com, bjorn.andersson@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Thor Thayer Subject: [PATCHv4 0/6] Add SOCFPGA System Manager Date: Thu, 14 Feb 2019 14:44:12 -0600 Message-Id: <1550177058-1860-1-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thor Thayer Add MFD driver for SOCFPGA System Manager to handle System Manager calls differently for ARM32 vs ARM64. The SOCFPGA System Manager includes registers from several SOC peripherals. On ARM32, syscon handles this aggregated register grouping. Implement System Manager calls as regmap_mmio similar to syscon for ARM32 SOCFPGA systems. The ARM64 System Manager can only be accessed from priority level EL3 so this new MFD driver handles the calls to EL3. v2 Changes: Change socfpga_is_s10() to check compatible string. Add new compatible string for Stratix10 in bindings and add proper detection method. Replace base cast with resource_size_t member. Change s10_sysmgr_regmap_cfg to altr_sysmgr_regmap_cfg to be generic. Always use 4 byte width. Initialize the .reg_read and .reg_write in S10 case only. Remove call to syscon in 32bit ARM case and handle both ARM32 and ARM64 in of_sysmgr_register(). Replace IS_ERR_OR_NULL() with IS_ERR(). Remove compatible check functions except phandle function. v3 Changes: Create and register regmap in probe(). Lookup functions find registered regmap. Cleanup of header file. Fix copyright dates. Replace global pointer with traditional probe() methodology. v4 Changes: Add missing of_node_put(). Add Reviewed-by from v2. Thor Thayer (6): mfd: altera-sysmgr: Add SOCFPGA System Manager Documentation: dt: socfpga: Add S10 System Manager binding ARM: socfpga_defconfig: Enable CONFIG_MTD_ALTERA_SYSMGR arm64: defconfig: Enable CONFIG_MTD_ALTERA_SYSMGR net: stmmac: socfpga: Use shared System Manager driver arm64: dts: stratix10: New System Manager compatible .../bindings/arm/altera/socfpga-system.txt | 12 ++ MAINTAINERS | 6 + arch/arm/configs/socfpga_defconfig | 1 + arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 +- arch/arm64/configs/defconfig | 1 + drivers/mfd/Kconfig | 10 + drivers/mfd/Makefile | 1 + drivers/mfd/altera-sysmgr.c | 211 +++++++++++++++++++++ .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 5 +- include/linux/mfd/altera-sysmgr.h | 29 +++ 10 files changed, 275 insertions(+), 3 deletions(-) create mode 100644 drivers/mfd/altera-sysmgr.c create mode 100644 include/linux/mfd/altera-sysmgr.h -- 2.7.4