Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp384227ybl; Tue, 7 Jan 2020 21:54:45 -0800 (PST) X-Google-Smtp-Source: APXvYqwDMgQ2YYXRpVi2b0+Xb9KloYwLIN3IPCS7B35O+iSolpjxsdga6mg1QadsmIfwqvSQ2XE2 X-Received: by 2002:aca:1801:: with SMTP id h1mr1895199oih.16.1578462885495; Tue, 07 Jan 2020 21:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578462885; cv=none; d=google.com; s=arc-20160816; b=XLfiZXL5FukEH9bYtuXSMnlrus8sPSLHr6G18tP+Un8KkBKv4j+AZ0CokSpera0pMT Tvt+mk5rBNgnEBHgdMwy6tY5aUX+OoALR8MzzSTE4+XgRVcgI/cRNxuHHYforcOSjqhb eVkPgUHPT+kb6EzfnYWrzXUmmcRSUzjTXlQawjtOwK4YUGupz+0prqq2zZ/qokTo7s3y TfDvwZ1bqDG5lPGwEYeixF50bknKTBLpxMLL89cjrmRLncP98iG4zm7EFuzDsy0FveYc 4qKtmnGlGa/Szo2h3cCLHd5/vrZHOm9KSkK5bgyplo794BMvPWxVPB40puOBxwUHetfO PhlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YoB041Qi6gAAsKDfeXTiJLvWYKMaZ3RNSLAQlXIIIG0=; b=0/XAFhLReCUNFaijnILS+8t8y03rFlAFShxcee+VxfJMxGaahaX/uTQnAbMXC2rsZ0 VVcijS/LLgkFOE1qXdNfA3NRlnH8tno9E/mjQ0pxpiHGEcVBKw84wjqrvVUx1a7H/UX+ qO+bD/yh7SLjPMvdMATQfWTwPb9Ov9JoSi1aNByj7zjP772RSysNVIoxpX2J5zH+/Pjf FXM7o22z0+Lp19lu3VZAZ06RADV0oSDSJmrgem66VHsPlZ6MPx0b/kHvpYOzwd2Gdd07 fowdAF4VX7/mhV4AfZy4CtrmCAcRSkDRWN9vlkj2JAZ+URQ84+fkETgncgaG7+cC6tm1 fD9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="rmY/HpS/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h28si1603153otg.63.2020.01.07.21.54.33; Tue, 07 Jan 2020 21:54:45 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b="rmY/HpS/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726339AbgAHFxi (ORCPT + 99 others); Wed, 8 Jan 2020 00:53:38 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34223 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726263AbgAHFxi (ORCPT ); Wed, 8 Jan 2020 00:53:38 -0500 Received: by mail-pg1-f195.google.com with SMTP id r11so1022198pgf.1 for ; Tue, 07 Jan 2020 21:53:36 -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=YoB041Qi6gAAsKDfeXTiJLvWYKMaZ3RNSLAQlXIIIG0=; b=rmY/HpS/mbpy6xWHZc+XG8LDePEJw8nEDOE0yYUwMpcMbWnwWD4ibVlbu0EtJt9XGY WTpuQENnkbkloGePmvTrH2uDl2i4ocs//5xYYKO8sKEFe0NOUpPL4H9cv36+Fa8Wv+o8 73u1xiZnqzTqz5nGn/h2l3h++gMTHvf/Qtf1wA3lblGcMZ9vIHGoEvJhTiocXpKJ45Ma qGZTgblO1msz7vOzp8YrREaSyZ+2UCokkTEp7+vGdJIBFAnzrJfwO1K1VOYPbogtinNp 8LCL2gseqtHo1MnNLTdgnZ1qS+wMFzm8MCoHr2YBTHVLTj0+yQg+Qs3d5+d/U5ZDryb0 ptVA== 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=YoB041Qi6gAAsKDfeXTiJLvWYKMaZ3RNSLAQlXIIIG0=; b=gtonHSsODY2H2P4J99aow5flL6EciQKgHJNMvYsa7o1pIllo0+tAAVLAGCFMbwcyB7 RUWlbTdJinjy0sn6w/AFjA06cIL+TYl8Bc+AY/b2kGTcw90NEyVoponDjLKUx4rLPguf N4RZOCEoxbAzMOFUbOin2JkXmqmZLM3wimDHQhyQ/IntN/pVSmt9yia0KSyOfwNoglDp YRwUgREOAF5brq6pjoCM/04IK3FoJ/oQoyhkCDTszLMII6+Lfa3IPloS4D9JApabUMLZ +PBXCIwIWbeIZn0tOQMkF5aABMBK1T6NLfsYptFJSu1KT3YreRuHoCT99NwnNzFLwaUn whnA== X-Gm-Message-State: APjAAAUP0W0rbYXnWMlJaODwyaEqmE3elN71PHC2BtHuqsMMHaE+EUtR XZUgdb/98/6K9vKoXIpK8VTyjA== X-Received: by 2002:a65:5786:: with SMTP id b6mr3555590pgr.316.1578462816142; Tue, 07 Jan 2020 21:53:36 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id b8sm1643971pff.114.2020.01.07.21.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 21:53:35 -0800 (PST) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson , Rob Herring , Mark Rutland Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] remoteproc: qcom: wcnss: Allow specifying firmware-name Date: Tue, 7 Jan 2020 21:52:52 -0800 Message-Id: <20200108055252.639791-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/remoteproc/qcom,wcnss-pil.txt | 6 ++++++ drivers/remoteproc/qcom_wcnss.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt index d420f84ddfb0..00844a5d2ccf 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. + - vddmx-supply: - vddcx-supply: - vddpx-supply: diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index dc135754bb9c..a0468b3cc76f 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -457,6 +457,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; @@ -474,8 +475,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; -- 2.24.0