Received: by 2002:a05:6504:1d0:b0:1de:de76:8684 with SMTP id e16csp877437ltn; Fri, 2 Sep 2022 09:12:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR4TbiIZwLUcTD5tnFMttN/AFI0B6iFLLs8qLHLKL4rN9DzTpwD6tqWFwyzZ0J3uuFH2Q88f X-Received: by 2002:a17:902:e851:b0:175:4064:ac5f with SMTP id t17-20020a170902e85100b001754064ac5fmr14260921plg.69.1662135161106; Fri, 02 Sep 2022 09:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662135161; cv=none; d=google.com; s=arc-20160816; b=o8l9toLwx9cNIjoucY+liuQw2G5Y6HKlmy+CCs0W07hJtldYgp9Oj/wz2xQEQGb5lG NZJtA0kh765kZ85HxngUcRIeRYnltMND4GqWpKyqSQFY+9trNTlHoBf1FMzEyLe+tJpf 4xxn9h4zWPlM06gQnPfnJcy+TK92vA3Y/ztGCi4CE/WLRbgmP5G3IPFJkndBmGE59JNg bR7IKQt0y7XrAdGPMmyOXGlZToKCvSNTRfLy4jlM8NdX/v1HFsQnV7dyOoBAXdSIFjXI uEfq7Y1V3uyAFq9+tFLeHgT/JVeX7wTcD5sOyi1PC1dWLHB0v4ebpX02zvzWviq69aKr G4XA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Fd4lSn+qZVzeO4qkwAmVHFeGiK8e6ML8+dOEILHHB/4=; b=mGAWRcJXrrTXJOKkg+krRQ8sZB6zLzddgr5q9v3hfUbzQo2IhgtdGZCsjDIIhpOUxk IRsYFGcPf2xoLnYz8ZQzRCbCrSqkKDU93vp2kYK29OPSQznxLupyxF5sqYeFFR5NZXId vi26MQRiqbhqc58ONYPp9EMlhAqDvcxOI9EKtFR04cLHB8Bhla0GWSCfGEF8m3HSHKKa vaTpZtmiSLDIBJbygUWV5eRVVMSCddxShU3tSblSOb3dm4caTUda4tfFkwLwN2j4ittH DAtCYimDH63f9IamDotLOVvtOvzHFe+V6Y2LD/2MFVP3YCUrVd4r6o8ryVgkyLaYSojX ZTZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XiV//Ugp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a63d70a000000b0042b6e87d126si2324847pgg.198.2022.09.02.09.12.28; Fri, 02 Sep 2022 09:12:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XiV//Ugp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S237480AbiIBP4e (ORCPT + 99 others); Fri, 2 Sep 2022 11:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237537AbiIBPzF (ORCPT ); Fri, 2 Sep 2022 11:55:05 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7CE82A975 for ; Fri, 2 Sep 2022 08:49:25 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id n17so2848475wrm.4 for ; Fri, 02 Sep 2022 08:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=Fd4lSn+qZVzeO4qkwAmVHFeGiK8e6ML8+dOEILHHB/4=; b=XiV//UgpdOLwA5FX375zPaEh5uHJ95nETjCvXbD5RHNoziJSjUVMvjX/7MheUFKdWv 4XgQiHLoK4mKo3DGKbgTviuYGki+Ffli7yUjOCk/N49S8VmaYIR0xjrNLxzInk2JWXak Zy8Qg8jHarHXavYlIz322H9E5ylJpOxb58uypOxaJq6H8cX0V6PlIb5vY6OsqxSRbK5n Bp4bOztqwMZJo5Xv2fJlJ1JLRwaKsuIWPnqo7UIDgiX87KVFSHRxBdKPbD4lLxLXhY3E FXFGhq3shhVEEpKrTQS4SgbT5mRbThwkJULLBeD4i0UTaeUAmySXaoJZExEDvmuFW9UG MVtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=Fd4lSn+qZVzeO4qkwAmVHFeGiK8e6ML8+dOEILHHB/4=; b=QuRxXXxkuqptmuZKfw01+DWVKFdQ2wUk0uU37P+YJkvLfWXoVwGrjkfmLr9kB/jSkK yefH84qDDCngMw8936xw7K51X/DNGVoAi7NDkpD5DzsonFw+4A10FLxLigCU14XpNeSq BMoG21gMMB2ZElXba8Gyiz5aryvB9VZZb7ojJ9W6bnXQXXoJ7I+BPlaSe/yETd+lSOBY 813E8pugICUeOzPFJEvhr0R1sp+k9AvX6CQpui9MdQsFFDrwUffnndmwS2SagWRCM7ux bPodXKwgjDP9cIUFf+0etYRdbVxif8aU8B6tRJiuRRQQhw/cHgGJW70ieh25T3fU0+OB cIow== X-Gm-Message-State: ACgBeo1UhrMBDtUV76ctelewjFdnhUQsZBvND4V/rDhCb6n3DxS9whlO ihEncwTcdylkMeyffpYSqq2zdA== X-Received: by 2002:adf:d1c2:0:b0:226:fa44:bab7 with SMTP id b2-20020adfd1c2000000b00226fa44bab7mr4552046wrd.195.1662133764174; Fri, 02 Sep 2022 08:49:24 -0700 (PDT) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id b1-20020a05600010c100b002250f9abdefsm2046741wrx.117.2022.09.02.08.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 08:49:23 -0700 (PDT) From: Abel Vesa To: Srinivas Kandagatla , Amol Maheshwari , Andy Gross , Bjorn Andersson , Konrad Dybcio , Ekansh Gupta Cc: Rob Herring , Krzysztof Kozlowski , Arnd Bergmann , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, Linux Kernel Mailing List , devicetree@vger.kernel.org Subject: [PATCH v2 02/10] misc: fastrpc: Add reserved mem support Date: Fri, 2 Sep 2022 18:48:52 +0300 Message-Id: <20220902154900.3404524-3-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220902154900.3404524-1-abel.vesa@linaro.org> References: <20220902154900.3404524-1-abel.vesa@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The reserved mem support is needed for CMA heap support, which will be used by AUDIOPD. Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Signed-off-by: Abel Vesa --- drivers/misc/fastrpc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 8d803ee33904..52271f51800d 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -19,6 +19,7 @@ #include #include #include +#include #define ADSP_DOMAIN_ID (0) #define MDSP_DOMAIN_ID (1) @@ -2064,6 +2065,9 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) return -EINVAL; } + if (of_reserved_mem_device_init_by_idx(rdev, rdev->of_node, 0)) + dev_info(rdev, "no reserved DMA memory for FASTRPC\n"); + vmcount = of_property_read_variable_u32_array(rdev->of_node, "qcom,vmids", &vmids[0], 0, FASTRPC_MAX_VMIDS); if (vmcount < 0) -- 2.34.1