Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp749876pxb; Wed, 29 Sep 2021 08:57:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxrGAdvI/M7onDBEJxlGaG3ygeAEEropMZ7IxC3KgHq4/EaDZhQk4QyOrFGmWMK39twXqk X-Received: by 2002:a17:906:1e55:: with SMTP id i21mr474215ejj.547.1632931033362; Wed, 29 Sep 2021 08:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632931033; cv=none; d=google.com; s=arc-20160816; b=Eg13N7JqUcI2BL/nQi1EWvK4pW2Y3jFkrmuqPT2T/s7Y/QjPfTb/+zGQiPw6JDNyUK NHF6gjGdin/n0mr22dTyas9Ym/ESHLCERnWDNyncz10jH26/oTw5Vx7Bu+US+LnKkdWJ KWVsh8S1Rv6vWB0xO2hxyvJxVOXuVuMZ69rcvbdxcNkJ6wHi8vL9o/pY1MVYhjhsm/2G X9Cb2Yzdx2SNTLFeCWiMWsRgzWnlSGwqha26CPliG2UNreeKdf4r1Thj7AT0MN2OkYAS G8tJ7IGCFckuolaNhrZqYfnYGRTzV3Pu7K/IkMJ6w0ymNNjOWfVzUyz6faGdJyk02hiq hzEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1bOpTf6Jukz1rQn04/kh8ik747nwWUC8rE65lhqO1Xs=; b=d8I32skmXnnnRFMgTH9cR1Y4JAzj1gaZ5SlAyOMkqSKq8N68ujg5L+ExCalvjcLpU4 GfunKi9YLvj8ohjNv1OrwZvBbSxfrVhfIcT+0CMA6h6yWK89+bAriVEEbfPJAGsobhtA LP0Zqd3xOsKAPEjLCBt3vUnfCL6fJPN2uGOF0uBs6feD3o03dekewc+80CqK/NTqr6oA piOaIyB3yLWmXmnBVZqEfckdynhrIcYkHqV3quV3DbmZiQgqU7qyBcHw5P7N4yPoIxW/ 3tLhN4afJ8ZpJRPNGKc328VjRJTYrgxJ+w/hNNKmKwtxnaouYAbHMN+Mx23hhDQC+0Le NYKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MLodxKDC; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d3si310701ejr.27.2021.09.29.08.56.41; Wed, 29 Sep 2021 08:57:13 -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=@linaro.org header.s=google header.b=MLodxKDC; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343800AbhI2ORR (ORCPT + 99 others); Wed, 29 Sep 2021 10:17:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343798AbhI2ORQ (ORCPT ); Wed, 29 Sep 2021 10:17:16 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62B14C061755 for ; Wed, 29 Sep 2021 07:15:35 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id g62-20020a9d2dc4000000b0054752cfbc59so3046593otb.1 for ; Wed, 29 Sep 2021 07:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1bOpTf6Jukz1rQn04/kh8ik747nwWUC8rE65lhqO1Xs=; b=MLodxKDCjbPbVfHqmbcLc+lFz7Fm4nAzcqoQdx/1K7UeQ8nwYJyY9ZgA2Viz20B1Wf FHqkYzOZFhsSWsnJyzin379oB7znNmpJnokdu8kAnQKBU1z0UmsmeSGDtWoZuzX2X8Fk lJYSuwZwGQW0BhwNYWdBnNh4lKmHhHBKx3X3b5X9fBrRGdWjm/MeGfr0jJAwCMhE6DoP DNQv24J1CTfdOSXLezlSaN00GTfkp2rpHcNAxUNxpBKFHdL3jRSaTXs2geRHaYhVDMuO 0YTHrb/j5JJfDzPIkXN+WMGpSKYtRpZvvGBWdf+KOnDRFnVY8mBeUnh0VzB3NX56xC8u e4Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1bOpTf6Jukz1rQn04/kh8ik747nwWUC8rE65lhqO1Xs=; b=fh+cGJpuOEI9mSFpy7xQtS6Nx8t05H2k+T4tISaYgOEmxLwXQoJaLMNGJCxL365H4u sZgaSsx2KUEpLlkNGB6bLNHjZmB77Z5U5/b1kbhhD4l6/c7VNd1jMQjqtqk8J0a927pm 2IhqPN5UvFzr1qd7grSZ0TFjpUv5BiwkowSgz0lzGb353u98M0q4JHG25dZAuAPo96FP WQWipwhKxcjVFFEqiBWYzuRoTGNgwVAdfUCk/bItrDpMQrgngBxmHWvpYJrMV9Rm2gKI Smm/e4MJ2BznRdZISjP1r9Ztf225s5uGGpzxrovc1LgoACAXi9j4vX1C5hnAAXQSS4PT cRFQ== X-Gm-Message-State: AOAM533vx07Mwd65iDm7JdN20H2mrvWLNLoan1nIQ12KmDn2aK4R5SKh urHTAf2apT9Jgk7Kkw1S0gVKCA== X-Received: by 2002:a05:6830:455:: with SMTP id d21mr228973otc.300.1632924934665; Wed, 29 Sep 2021 07:15:34 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id s29sm468815otg.60.2021.09.29.07.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 07:15:34 -0700 (PDT) Date: Wed, 29 Sep 2021 09:15:31 -0500 From: Bjorn Andersson To: Charles Keepax Cc: Arnd Bergmann , Arnd Bergmann , Mark Brown , Liam Girdwood , Simon Trimmer , Michael Ellerman , Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Paul Walmsley , Palmer Dabbelt , Albert Ou , Thomas Gleixner , Ingo Molnar , Borislav Petkov , the arch/x86 maintainers , "H. Peter Anvin" , Geert Uytterhoeven , Linus Walleij , Andrew Morton , Greg Kroah-Hartman , Linux ARM , Linux Kernel Mailing List , linux-ia64@vger.kernel.org, "open list:BROADCOM NVRAM DRIVER" , Parisc List , linux-riscv Subject: Re: [PATCH 1/2] firmware: include drivers/firmware/Kconfig unconditionally Message-ID: References: <20210928075216.4193128-1-arnd@kernel.org> <20210928083751.GG9223@ediswmail.ad.cirrus.com> <20210928092400.GH9223@ediswmail.ad.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210928092400.GH9223@ediswmail.ad.cirrus.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 28 Sep 04:24 CDT 2021, Charles Keepax wrote: > On Tue, Sep 28, 2021 at 10:51:36AM +0200, Arnd Bergmann wrote: > > On Tue, Sep 28, 2021 at 10:37 AM Charles Keepax > > wrote: > > > I guess the question might be where else would said code go? > > > drivers/firmware seemed most obvious, all the other locations > > > I can think of don't really make sense. Can't really put it a bus > > > like spi/i2c etc. because we have parts on many buses. Can't > > > really put it in a functional subsystem (audio/input etc.) since > > > the whole idea was to try and get some independence from that so > > > we don't have parts including subsystems they don't use. Could > > > maybe put it in MFD, but no hard guarantee every part using it > > > will be an MFD device and I am fairly confident Lee will feel it > > > isn't MFD code as it doesn't relate to managing multiple devices. > > > Only other option I can think of would be to make some sort of > > > drivers/dsp or maybe drivers/cs_dsp, but not clear to me that is > > > obviously better than using drivers/firmware. > > > > Other DSPs use the drivers/remoteproc/ subsystem, but that > > is more for general-purpose DSPs that can load application > > specific firmware rather than loading a single firmware blob > > as you'd normally do with the request_firmware() style interface. > > > > Not sure if that fits what you do. Can you point to a high-level > > description of what this DSP does besides audio, and how > > flexible it is? That might help find the right place for this. > > Hm... wasn't aware of that one, we should probably investigate that > a little more at this end. From a quick look, seems a bit more like > it is designed for much larger more general purpose probably memory > mapped DSPs. I guess our code is a little more firmware parsing > and loading, and a bit less generic remote proceedure call stuff. > You're correct, remoteproc tends to situations where you have multi-function firmware; be it at a single point in time, or due to different firmware choices. Where you essentially boot some firmware on the remoteproc and from that instantiate one of more functional devices based on the loaded firmware. > I am not sure there is great deal available publically on the > DSP core. It is talked about in a few of our datasheets, see > section 4.4 in [1]. But a basic description might be it is a > signal processing focused, very small DSP core. If can be loaded > with different firmwares at runtime, and indeed might be doing say > echo cancellation in one use-case, or always on voice detect in > another. Functionally it is very unlikely to be used for anything > besides signal processing inside the device it is in, since it is > typically quite integrated with that hardware and will be sitting > behind a slow bus, like I2C or SPI. > To me it sounds like the main difference compared to above is that you have a single function that owns and controls the DSP and implements that function - i.e. the audio driver probes, boots the DSP, if there's a problem the audio driver will handle it etc. When it comes to firmware parsing, that might be a somewhat unrelated topic. E.g. in the Qualcomm case, the same customized ELF header is used in both for remoteproc devices and in function-specific devices. For this we extracted the relevant functions into a library of some common helpers, which can be found in drivers/soc/qcom/mdt_loader.c. Regards, Bjorn > Current users are all audio, planning to upstream some haptics > parts soon, with possible other uses in the future. > > [1] https://statics.cirrus.com/pubs/proDatasheet/CS48L32_DS1219F4.pdf > > Thanks, > Charles