Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1492224imc; Mon, 11 Mar 2019 15:16:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAEFp7DZFTOWVb5ycjYH4JDUYKzC4BKSrHSprip4iBHLXY40FsPfRhTmVCrUhc/p5e4jsv X-Received: by 2002:a17:902:bd96:: with SMTP id q22mr36396676pls.7.1552342596629; Mon, 11 Mar 2019 15:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552342596; cv=none; d=google.com; s=arc-20160816; b=U9KtLp7AI5Y8CsKHdIarf4ebe1zamaBfzpZZO4y/m/h8r2UQKldpMPDc67KMAzf9kZ SV5j05Ck4zWxMKO9SDDSkTBB/7Usf116l/UkV4to8BiX6AjGZRb6n4csxV9BjYFP4699 yLSE9uz6HSicwoxqanTcK6k14lxh0fZcIlh5leauJFGiEAxEyDOFFTcFTaB27zYmR6rC x1dvA4H+Kle1yCt8Oes6BaDbRULbDZe9HnlwhFTuCjbiJwCsmFpuxjrew45q9qKk8ZmO JuoGjaZo0IMwGwcCp4VSJdDNiMmAWJJ7J2RPw+6Xzy/3t4RuUI2bJHuiJa9d+u1uxfLI oPnw== 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=IwxAy+8n9hxA/eSestbjXhBm7ls/W+mR0lXfjgdqQlw=; b=dT6DJFks2pFe4k8EWh45Ohwu3zaaf701LM7zbjEPbre8+RdE13+gRN0Kd+iKEjSEzV 1lB0C2Ib1bxPjEdtO5NM+MwVg3H2D9jrcI3xVHXLowXna9zhVLfl406vujnxOyGpttNl EEY5IhQmCH2XWT7OUySrNv9fiTH78u/nzyYBE+iH5Lf/47m6d2IMC8Jaj7Gpk9rQi1rN jtZK+BIgfk0u9HI/rqpVQeiIB9V1Q8onYlIYrBTR9eXDt9hpTThOdviu19BhTwgD2wbz pqBVLDNUPWsGpxOQQVHCvTQlg5W9pzkFtem4qOHFHDiT4hp85cFceP/sOnr/mRMNhgmW z6AA== 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 z18si5815022pgf.66.2019.03.11.15.16.20; Mon, 11 Mar 2019 15:16:36 -0700 (PDT) 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 S1728196AbfCKWPz (ORCPT + 99 others); Mon, 11 Mar 2019 18:15:55 -0400 Received: from mga01.intel.com ([192.55.52.88]:33616 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbfCKWPy (ORCPT ); Mon, 11 Mar 2019 18:15:54 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Mar 2019 15:15:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,468,1544515200"; d="scan'208";a="141133769" Received: from tthayer-hp-z620.an.intel.com ([10.122.105.146]) by orsmga002.jf.intel.com with ESMTP; 11 Mar 2019 15:15:52 -0700 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: [RESEND PATCHv4 0/6] Add SOCFPGA System Manager Date: Mon, 11 Mar 2019 17:18:02 -0500 Message-Id: <1552342688-6663-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 for devicetree patch Add Acked-by for net patch 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