Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp2044208lqg; Mon, 4 Mar 2024 11:02:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV2ohy6aAhmOswW8pbFFDFQK+pUSZywd0GW2t6uRXodAXXIXLMBchrZArIWZ77QYkWc61XuiFySpMoWn9G0gmPa1L0JCVRJSmEUiEi1lw== X-Google-Smtp-Source: AGHT+IEJoYMTfJYHB9pAsRVFnHjH22iEdKgMPBH5TLuTnk5CQzC5pegigE1c/9vsKTWY5I47FVt7 X-Received: by 2002:a17:902:d3c4:b0:1db:ccd0:e77e with SMTP id w4-20020a170902d3c400b001dbccd0e77emr9884006plb.35.1709578955816; Mon, 04 Mar 2024 11:02:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709578955; cv=pass; d=google.com; s=arc-20160816; b=VTVccrDoplrjWdVUuIMMkqZkYtVchGskuaiLdi4gtV+IpJ/zcVzgpvrgd/bujA062k HqZlCFJq35OROg/Ki89DQdSnCuLvGp6t8hrzaJ/3cjZhHgSPFZwqA2lzypPveQYs9cO+ aMPUNp4tmsCRTbVlm8H80VudCIiTRZxppIGKwzaFeJJlOA0D/2xwjGz1Fos6EuitbiUJ 6l/30/8Ux9+MpuNkQJeMjELhGjyhThQ3fxTWoUDlDK+Q0TO01KjvKN76lArIT+iaDPjO 5HxDeJVEnVBHMA4Te/1Ls3gBafOvFKED1EC4NBH7v1n59bej8vOzXWVi02Sv453evT1K BPNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IcBwLFjxeSbcMLj/f6Mj3bisWT302kO4LWmkjaCDYMA=; fh=WnqpKxaP0HRAYM8HFnCqX94AIHiKo6qH6r1ZteCgZWU=; b=hLfpyRyqXtckm/ibhKEksuscXNjaTGBIZzxvnIzjbNV9UU5/IZj33Uk2uN6XeprsLp OTRqfwTurHfGqvB6YqIRO9pYKIogXSLLJkfI0W6wWMJfD3rzUjsPXbphDp9Ym9qRUlUC ob4JWlPe2nhovPl67AtJeT41wfEoRpS9iqxJtuxkm4IvOk7zZ5TGMLNwhRjSCs+HlYuR zrkdhZ04XdzI/yQo5+t46C8dkBRH4qmnsyTkTOoCodRtuZK7F3ECHQGsJ5cVmZkfBMbh KvJLEt4aLl2Z1n0b2PEOVG6A7S6p9j7uJ1S3QpFrltvRcM6ZUgkIMbUX+VSSBZKtEwnw EznA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ODDTDWd5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-91098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b6-20020a170902b60600b001dcafce30f5si8327959pls.424.2024.03.04.11.02.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 11:02:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ODDTDWd5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-91098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E10EAB2996A for ; Mon, 4 Mar 2024 18:30:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9009B629FF; Mon, 4 Mar 2024 18:30:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ODDTDWd5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E8DD629ED; Mon, 4 Mar 2024 18:30:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709577030; cv=none; b=tEWkQyonciv1x+ge0p8hUPoYEum3dmDuK/hEKKTmD6bybYOZ7tgj4RYlBR99XDPW/Vs6YkorsJv9pbUjq8ndlBXabnLoQr85L5sCKlRRviobqpwHPDLkhExepBmS2dvnR0HOSnyidZvmieH5qicXNt6xOVjru+60QaUVLWjIP1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709577030; c=relaxed/simple; bh=ziA5WYvRRKeMAVzULW5DZrSwZgVRble6/Vv6u6klgFo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WfU9eMQy5078M2x200AFI/RN3zYMHvJlzPzd7YHIgJSRPsAB2XR9xpnfdGU52iB3yjiNKg/2bOz2tbIvrN6YlQdIxS4ZTgj2sHCZ1nt8q5sSz8/6/tWQdDJdQ13KYHzG5uab5na9AvxdYtHlKBOclr+rE641qcWsXoiO4CSrjt4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ODDTDWd5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6860C433F1; Mon, 4 Mar 2024 18:30:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709577030; bh=ziA5WYvRRKeMAVzULW5DZrSwZgVRble6/Vv6u6klgFo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ODDTDWd5dsvBmvO6XdiAVMwH149tJPAqQaCPw0Vl8CLxF38gNQateBMMrjXbkSusd vRQTWw9chXqiXtS5RHNoDboBDdQU30amnA0XAahk1ucXWPJuNtRl+eBk674JUjCzmP q992pDkt6r9K/xiQ2sqtKTUh0Q45ZlqdOXNbw/csWEXgsEpFHhcM0pDdr0r31YvMzv iFAvf5oD3BtuqkW5S/48K68MRC+ty7AmMOJ6+XbgUcvuulNgrEGXMOJrAd5YPnM5bT odXJeudAONXhEyDF7uO2xmu2eCmYxhw2HygbVi12Jwt0NYSeCRn684FzVPAgaQnWf6 tgZXbBT6H7quw== Date: Mon, 4 Mar 2024 12:30:27 -0600 From: Rob Herring To: abdellatif.elkhlifi@arm.com Cc: Bjorn Andersson , Mathieu Poirier , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Krzysztof Kozlowski , Conor Dooley , Drew.Reed@arm.com, Adam.Johnston@arm.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: Re: [PATCH 1/3] remoteproc: Add Arm remoteproc driver Message-ID: <20240304183027.GA854977-robh@kernel.org> References: <20240301164227.339208-1-abdellatif.elkhlifi@arm.com> <20240301164227.339208-2-abdellatif.elkhlifi@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240301164227.339208-2-abdellatif.elkhlifi@arm.com> On Fri, Mar 01, 2024 at 04:42:25PM +0000, abdellatif.elkhlifi@arm.com wrote: > From: Abdellatif El Khlifi > > introduce remoteproc support for Arm remote processors > > The supported remote processors are those that come with a reset > control register and a reset status register. The driver allows to > switch on or off the remote processor. > > The current use case is Corstone-1000 External System (Cortex-M3). > > The driver can be extended to support other remote processors > controlled with a reset control and a reset status registers. > > The driver also supports control of multiple remote processors at the > same time. > > Signed-off-by: Abdellatif El Khlifi > --- > MAINTAINERS | 6 + > drivers/remoteproc/Kconfig | 18 ++ > drivers/remoteproc/Makefile | 1 + > drivers/remoteproc/arm_rproc.c | 395 +++++++++++++++++++++++++++++++++ > 4 files changed, 420 insertions(+) > create mode 100644 drivers/remoteproc/arm_rproc.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 8d1052fa6a69..54d6a40feea5 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -1764,6 +1764,12 @@ S: Maintained > F: Documentation/devicetree/bindings/interrupt-controller/arm,vic.yaml > F: drivers/irqchip/irq-vic.c > > +ARM REMOTEPROC DRIVER > +M: Abdellatif El Khlifi > +L: linux-remoteproc@vger.kernel.org > +S: Maintained > +F: drivers/remoteproc/arm_rproc.c > + > ARM SMC WATCHDOG DRIVER > M: Julius Werner > R: Evan Benn > diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig > index 48845dc8fa85..57fbac454a5d 100644 > --- a/drivers/remoteproc/Kconfig > +++ b/drivers/remoteproc/Kconfig > @@ -365,6 +365,24 @@ config XLNX_R5_REMOTEPROC > > It's safe to say N if not interested in using RPU r5f cores. > > +config ARM_REMOTEPROC > + tristate "Arm remoteproc support" Too generic of a name. It should say Corstone or Corstone-1000. Here and everywhere you use just 'Arm'. > + depends on HAS_IOMEM && ARM64 depends on ARM64 || (HAS_IOMEM && COMPILE_TEST) That gets us wider build coverage. You should check at least x86 allmodconfig passes. > + default n The default is already n, so drop. > + help > + Say y here to support Arm remote processors via the remote > + processor framework. > + > + The supported processors are those that come with a reset control register > + and a reset status register. The design can be extended to support different > + processors meeting these requirements. > + The driver also supports control of multiple remote cores at the same time. > + > + Supported remote cores: > + Corstone-1000 External System (Cortex-M3) > + > + It's safe to say N here. > + > endif # REMOTEPROC > > endmenu > diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile > index 91314a9b43ce..73126310835b 100644 > --- a/drivers/remoteproc/Makefile > +++ b/drivers/remoteproc/Makefile > @@ -39,3 +39,4 @@ obj-$(CONFIG_STM32_RPROC) += stm32_rproc.o > obj-$(CONFIG_TI_K3_DSP_REMOTEPROC) += ti_k3_dsp_remoteproc.o > obj-$(CONFIG_TI_K3_R5_REMOTEPROC) += ti_k3_r5_remoteproc.o > obj-$(CONFIG_XLNX_R5_REMOTEPROC) += xlnx_r5_remoteproc.o > +obj-$(CONFIG_ARM_REMOTEPROC) += arm_rproc.o > diff --git a/drivers/remoteproc/arm_rproc.c b/drivers/remoteproc/arm_rproc.c > new file mode 100644 > index 000000000000..6afa78ae7ad3 > --- /dev/null > +++ b/drivers/remoteproc/arm_rproc.c > @@ -0,0 +1,395 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright 2024 Arm Limited and/or its affiliates We don't normally put OSO email in here. > + * > + * Authors: > + * Abdellatif El Khlifi That's recorded in the commit message and by git, so no need to put it in the file. > + */