From patchwork Fri Mar 12 00:24:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 398368 Delivered-To: patch@linaro.org Received: by 2002:a17:906:a383:0:0:0:0 with SMTP id k3csp900570ejz; Thu, 11 Mar 2021 16:24:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOxFiwOqkYPD0Xf5L9rQSkL2FqTkwT+geNX5YVQyvT496eYYs+U9prdz6GZtLR66EncZ2Q X-Received: by 2002:a05:6402:5211:: with SMTP id s17mr11482251edd.327.1615508680212; Thu, 11 Mar 2021 16:24:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615508680; cv=none; d=google.com; s=arc-20160816; b=JZ4IvK3ihCIOSJIOFlKLq7eTIFOOwnKRtgODCCnvJDQIWT5/gex0DZx7Jm6jfjoUzv U+LmUXXt9k2Gsj5RfeWQfLguy5J0ZCPc1AfdCQDKa2ABTqPN+RFBbOiMR83OYwpjEEKn 48MTg37HRvYOCAbJ2vV3iL4Wo7SgIrn3uKdqfH0vV87gpRezWUdwBnqBZ/5EWo+SiH+b X4HNVmz3r2q+3r05HqkHhClU93mILg57Ipyawd53Hw4AvyUMhgRrZ94HsrrD1HtaR6hI 4jnY5uO/lozm5JGxy9fz90jui+p8F57OiWozUySnQ+Iyxs67ZZvn/fhX4vi0Q6XdMKkr 0eUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=y7aT/J1LFmtvLKFcXjPBW6z31sGa88GVVAsq4gij9cI=; b=ysNsBopg2t3ediBFA30vV5cWR7lSjjDW6qUJv88BxbLQcJNAxDo4IKOjd9FqwAVcMK N2XnC9EpoigRMAgPJlamH6mgUwrsUp1cdh+KdoA/jwTCN2j0FLc7Gdg/oXoAMHigLdNV aq+BT4jAh8iBTXloyMyIMiDBWxTVBp6a7+uEM88pdH7xATMo3MZ/XzcUIaWd53R+ljr7 NZUayOcsP1nYqzhZJmo+iXn6HZPXd4bgmdS5hld4kvXtN3CFnsBAP+SBH7kuFBC9X6zb ET6P/PbaZbBMZ0UY1DkwJ1cuusGKertvix5+M0jRLZm8WNBprKNMBFmVmYEhXL52EEUS cKTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dn5GJHIG; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 t16si3009183edi.281.2021.03.11.16.24.40; Thu, 11 Mar 2021 16:24:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-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=Dn5GJHIG; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S230192AbhCLAXw (ORCPT + 16 others); Thu, 11 Mar 2021 19:23:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229922AbhCLAXi (ORCPT ); Thu, 11 Mar 2021 19:23:38 -0500 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B13AC061760 for ; Thu, 11 Mar 2021 16:23:38 -0800 (PST) Received: by mail-ot1-x330.google.com with SMTP id e45so2719506ote.9 for ; Thu, 11 Mar 2021 16:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=y7aT/J1LFmtvLKFcXjPBW6z31sGa88GVVAsq4gij9cI=; b=Dn5GJHIGdDBFWjBqycALa2+mx50GxHOB8uWp3ohF+lpu1lrM04eZO8HaUQORjTFXzF iPinfDZIf4QhZEdJRlcwYJHOmytJ25wC5hxCK8f1Tsm9YyRm8idvLETOkQBjAOmp7ffO 0ViTC1hX8AlxyqTumScYmdexvO+2IEUL1YG6rzg3fM59ln5rZKNtqPGZHxby5PPpsWhB vYRqnSl1cNC+R+XTjwNJlFeMBrTdZ1mlFIdmyTEq+00kMQ2lYM8XCn8sCKbGaj/+VTMh FGn/T4+b2f3rkFYwiI9Q+220DwE9Ek1MMnvmcfWfKrgSa8M9cAIBkSoTe4/hBSgodidh fYcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=y7aT/J1LFmtvLKFcXjPBW6z31sGa88GVVAsq4gij9cI=; b=XsfvONcjoIBtR/od2MpRk9Odnu/qdnLTZg3Uj2WqpySX0264FcRYdz1BMrD9bMKkeU Krms8WbJg5Bl+gPUh3idAJioiB5nad6ygwPeP0vznLhkMVymuIewzIXPelmI4A4/pCp8 XGx/yARbs3xfJzaXk8cFYkX1ruEj04b6zw+iicKRuR7Zm5oHacoOX/wMZAu9LwlLz7J3 Zuv66QCQuIwS8FOXYntnVm/h7SO6FaB9gYS9t8MRWr9mMcdo1IbGlCCCVP4I7AIayVAa jeR9h60w6avPtMWgvJi5Co7PvnMlJeIuKeULfrznqPcbB1G569Tazcklc/n9LLSKLy8w WhCA== X-Gm-Message-State: AOAM5315fowHX2T31oODfxxcOTbg67oJuA7D0YiZ+ZImP08OyR4XvlLm 9mZEx2YHXkGuvpXS/MjrdBDmDQ== X-Received: by 2002:a9d:53c5:: with SMTP id i5mr1189218oth.159.1615508617666; Thu, 11 Mar 2021 16:23:37 -0800 (PST) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id h2sm994460otn.43.2021.03.11.16.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 16:23:37 -0800 (PST) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Ohad Ben-Cohen , Mathieu Poirier , Rob Herring Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] remoteproc: qcom: wcnss: Allow specifying firmware-name Date: Thu, 11 Mar 2021 16:24:41 -0800 Message-Id: <20210312002441.3273183-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Introduce a firmware-name property, in order to be able to support device/platform specific firmware for the wireless connectivity subsystem; in line with other Qualcomm remoteproc drivers. Acked-by: Mathieu Poirier Signed-off-by: Bjorn Andersson --- Changes since v1: - Rebased patch - Added default filename to the definition .../devicetree/bindings/remoteproc/qcom,wcnss-pil.txt | 6 ++++++ drivers/remoteproc/qcom_wcnss.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) -- 2.29.2 diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt index da09c0d79ac0..a83080b8905c 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt +++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt @@ -34,6 +34,12 @@ on the Qualcomm WCNSS core. Definition: should be "wdog", "fatal", optionally followed by "ready", "handover", "stop-ack" +- firmware-name: + Usage: optional + Value type: + Definition: must list the relative firmware image path for the + WCNSS core. Defaults to "wcnss.mdt". + - vddmx-supply: (deprecated for qcom,pronto-v1/2-pil) - vddcx-supply: (deprecated for qcom,pronto-v1/2-pil) - vddpx-supply: diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 2a6a23cb14ca..e8007cc01bfa 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -530,6 +530,7 @@ static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss) static int wcnss_probe(struct platform_device *pdev) { + const char *fw_name = WCNSS_FIRMWARE_NAME; const struct wcnss_data *data; struct qcom_wcnss *wcnss; struct resource *res; @@ -547,8 +548,13 @@ static int wcnss_probe(struct platform_device *pdev) return -ENXIO; } + ret = of_property_read_string(pdev->dev.of_node, "firmware-name", + &fw_name); + if (ret < 0 && ret != -EINVAL) + return ret; + rproc = rproc_alloc(&pdev->dev, pdev->name, &wcnss_ops, - WCNSS_FIRMWARE_NAME, sizeof(*wcnss)); + fw_name, sizeof(*wcnss)); if (!rproc) { dev_err(&pdev->dev, "unable to allocate remoteproc\n"); return -ENOMEM;