Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2374352pxb; Mon, 19 Apr 2021 04:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywOMUcvoUQzmLtGfg91WekE+wxF4Ox4SIi0zT3zt/cCVxlwNFdmuKn4/6cb/w/VcVmDFqZ X-Received: by 2002:a50:fe0a:: with SMTP id f10mr23957207edt.1.1618831366106; Mon, 19 Apr 2021 04:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618831366; cv=none; d=google.com; s=arc-20160816; b=keVBXDWe6BP/t1AKZL9WfYwtZX7ilWjNnHC5WCP8ELT2q7w/Qr0d2IIdyLW05WdAHh gjcwzC/JYZpHUSYtFKxgMqaIguN7UIXQrLzXG4KEXsvccUGnugC7kQXwtAIdsgpbh50e zxRjzSvNcCL0llB1zNDVi2OpMhWqeIZ8g8OdukaSQhfmHbkQf7dmKSmrzIsK9z3SC1VB fajz6qnOE2/5vk5iS2z7qBAVwk00JDOESPGhOU2Q0JatxqIwE9h4pIK3oyDFJ0PiaiHF N4bZ1yoA4Zrv3ZdviBjHVxk7hGx4bUywzJmOz38HRWn2suCB4DDlXJdM6D/ldi/HYPmT sV3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FijpcSt0QLDmdhfycDRzyaBNjzE1P+daToE0IIDDJ/4=; b=cVeQWxdueSRvXodVOabMu5+nwl5iy0tS3p0bz5RrVDpGEPSBF6+k2bsI8kI+lluZRv 0iMRExe5A54heGu3eNYA9gNGcKqQdP3GhlnVtZtI38MyIP0fFuuwe1ffJFy0nKw3AwV4 8bqyFMSrdnrNbu974BQ4qcmwbIR4lyEYT/QaqXsL1HioFTbvkYV0DaGC9M9grjNlfKDL PMVH/5ntPpj9qbbcAL4G3hwwb3SKzrtNw9p35zoMfBmToqsqQha9TS2bzSzUpymVtyK1 4mXGtWFNTUDFARmudg7oTT/USnAROmflXPjPXKfr967yW8Ve7/1bHUDkx1qTlxjT/07l /tyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=WuY1qnS0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt23si12192535edb.325.2021.04.19.04.22.23; Mon, 19 Apr 2021 04:22:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=WuY1qnS0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238800AbhDSJkZ (ORCPT + 99 others); Mon, 19 Apr 2021 05:40:25 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:51082 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238725AbhDSJj5 (ORCPT ); Mon, 19 Apr 2021 05:39:57 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13J9QNJf027761; Mon, 19 Apr 2021 11:39:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=FijpcSt0QLDmdhfycDRzyaBNjzE1P+daToE0IIDDJ/4=; b=WuY1qnS0exYhmIp4azGmEMWnHM92Sidsdui4H7R8h+xppGKv3vDYQmVmj1csHrlbiBTk s5LPUvvtP8aYUE78zNuA+S7lK7N6Rv+ncvqX3jnODbaw49XLmmn4SjLUs9OYUU0JkTIl S+X7B/+OQU14fTdXtEc7p6Wym5a+8wAGuGpaqFG3+QtMNj/bShKUypCG7FWEyfEYoNnt AseiVUKwVZf5DtSTeHV4vha8alnPrRcIuloa4YmJoIRpKCT3zvhRw6NdUvUH+/0gNXQK 7MnapTu99V/rgKyiEGOcHEKFYcN+OMiUHWJXBQUjlTpIWvAJhA1Y4qPY2x9QrOJSJ2Gh WA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 380s533cg1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Apr 2021 11:39:11 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CB46F10002A; Mon, 19 Apr 2021 11:39:10 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BA6D120A07F; Mon, 19 Apr 2021 11:39:10 +0200 (CEST) Received: from localhost (10.75.127.51) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 19 Apr 2021 11:39:10 +0200 From: To: Michael Turquette , Stephen Boyd , Rob Herring , Maxime Coquelin , Alexandre Torgue , Philipp Zabel , Etienne Carriere , Gabriel Fernandez , CC: , , , , Subject: [PATCH v3 06/11] reset: stm32mp1: remove stm32mp1 reset Date: Mon, 19 Apr 2021 11:38:47 +0200 Message-ID: <20210419093852.14978-7-gabriel.fernandez@foss.st.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210419093852.14978-1-gabriel.fernandez@foss.st.com> References: <20210419093852.14978-1-gabriel.fernandez@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG3NODE2.st.com (10.75.127.8) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-04-19_05:2021-04-16,2021-04-19 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gabriel Fernandez st32mp1 RCC reset driver was moved into stm32mp1 RCC clock driver. Signed-off-by: Gabriel Fernandez --- drivers/reset/Kconfig | 6 -- drivers/reset/Makefile | 1 - drivers/reset/reset-stm32mp1.c | 115 --------------------------------- 3 files changed, 122 deletions(-) delete mode 100644 drivers/reset/reset-stm32mp1.c diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 4171c6f76385..8c26f7af70a4 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -198,12 +198,6 @@ config RESET_SIMPLE - Allwinner SoCs - ZTE's zx2967 family -config RESET_STM32MP157 - bool "STM32MP157 Reset Driver" if COMPILE_TEST - default MACH_STM32MP157 - help - This enables the RCC reset controller driver for STM32 MPUs. - config RESET_SOCFPGA bool "SoCFPGA Reset Driver" if COMPILE_TEST && !ARCH_SOCFPGA default ARCH_SOCFPGA diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile index 65a118a91b27..ac3e612ad953 100644 --- a/drivers/reset/Makefile +++ b/drivers/reset/Makefile @@ -26,7 +26,6 @@ obj-$(CONFIG_RESET_QCOM_PDC) += reset-qcom-pdc.o obj-$(CONFIG_RESET_RASPBERRYPI) += reset-raspberrypi.o obj-$(CONFIG_RESET_SCMI) += reset-scmi.o obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o -obj-$(CONFIG_RESET_STM32MP157) += reset-stm32mp1.o obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o obj-$(CONFIG_RESET_TI_SCI) += reset-ti-sci.o diff --git a/drivers/reset/reset-stm32mp1.c b/drivers/reset/reset-stm32mp1.c deleted file mode 100644 index b221a28041fa..000000000000 --- a/drivers/reset/reset-stm32mp1.c +++ /dev/null @@ -1,115 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (C) STMicroelectronics 2018 - All Rights Reserved - * Author: Gabriel Fernandez for STMicroelectronics. - */ - -#include -#include -#include -#include -#include -#include - -#define CLR_OFFSET 0x4 - -struct stm32_reset_data { - struct reset_controller_dev rcdev; - void __iomem *membase; -}; - -static inline struct stm32_reset_data * -to_stm32_reset_data(struct reset_controller_dev *rcdev) -{ - return container_of(rcdev, struct stm32_reset_data, rcdev); -} - -static int stm32_reset_update(struct reset_controller_dev *rcdev, - unsigned long id, bool assert) -{ - struct stm32_reset_data *data = to_stm32_reset_data(rcdev); - int reg_width = sizeof(u32); - int bank = id / (reg_width * BITS_PER_BYTE); - int offset = id % (reg_width * BITS_PER_BYTE); - void __iomem *addr; - - addr = data->membase + (bank * reg_width); - if (!assert) - addr += CLR_OFFSET; - - writel(BIT(offset), addr); - - return 0; -} - -static int stm32_reset_assert(struct reset_controller_dev *rcdev, - unsigned long id) -{ - return stm32_reset_update(rcdev, id, true); -} - -static int stm32_reset_deassert(struct reset_controller_dev *rcdev, - unsigned long id) -{ - return stm32_reset_update(rcdev, id, false); -} - -static int stm32_reset_status(struct reset_controller_dev *rcdev, - unsigned long id) -{ - struct stm32_reset_data *data = to_stm32_reset_data(rcdev); - int reg_width = sizeof(u32); - int bank = id / (reg_width * BITS_PER_BYTE); - int offset = id % (reg_width * BITS_PER_BYTE); - u32 reg; - - reg = readl(data->membase + (bank * reg_width)); - - return !!(reg & BIT(offset)); -} - -static const struct reset_control_ops stm32_reset_ops = { - .assert = stm32_reset_assert, - .deassert = stm32_reset_deassert, - .status = stm32_reset_status, -}; - -static const struct of_device_id stm32_reset_dt_ids[] = { - { .compatible = "st,stm32mp1-rcc"}, - { /* sentinel */ }, -}; - -static int stm32_reset_probe(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - struct stm32_reset_data *data; - void __iomem *membase; - struct resource *res; - - data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); - if (!data) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - membase = devm_ioremap_resource(dev, res); - if (IS_ERR(membase)) - return PTR_ERR(membase); - - data->membase = membase; - data->rcdev.owner = THIS_MODULE; - data->rcdev.nr_resets = resource_size(res) * BITS_PER_BYTE; - data->rcdev.ops = &stm32_reset_ops; - data->rcdev.of_node = dev->of_node; - - return devm_reset_controller_register(dev, &data->rcdev); -} - -static struct platform_driver stm32_reset_driver = { - .probe = stm32_reset_probe, - .driver = { - .name = "stm32mp1-reset", - .of_match_table = stm32_reset_dt_ids, - }, -}; - -builtin_platform_driver(stm32_reset_driver); -- 2.17.1