Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9257424rwb; Thu, 24 Nov 2022 10:04:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf70ZomUi4U0J2p2k+T9TFVj9QADYcEK884MjBN6z3tqAmSMD/ym8MHUM3XbaUzq6mCnRql9 X-Received: by 2002:a62:6205:0:b0:56c:14a5:2245 with SMTP id w5-20020a626205000000b0056c14a52245mr14632489pfb.12.1669313072977; Thu, 24 Nov 2022 10:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669313072; cv=none; d=google.com; s=arc-20160816; b=TiFsud1/tp6o0V6js7CoQHF98ojBoxuPXz5UNseN/qwonyByEMtalcIbH9r5G7edTU Pp5N2lOpy3xvNs4BvOsPYwIbnYFZSho0HmqgeuAPGb1yflaz8o417D2AvVg753154xMK x2pqoQXuEFlyXNPkJGjn2G25xbk8wo9KzV9IX1bIEGBMB16gwYGA0EZsXbrwRYd47SBs /GSUaWBSKyLrP6dwuWAYbvvTsxJ8epkawjw3YaBIWnXsLoOz8VawMBYZzdATZwafquG5 /YqMOYey20YOIf4xXz8JcHjDo81SCde+5oT2kD41iyqiKXi8CnPri9qzKc7TD0g9sidX NPVg== 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=e5v771DEFc9rL1zQ1Yv2p2JInBg9pG0PvBjFvduECqo=; b=YkTiviqyk7JMhjqbCPkczP5q1RJ9DRS0iHw+NgMvxS1XmYF5/NwgDIlo7nwinl0xzM SXT0NIBDtNL7B3L9T5pg+XrSg1dmcTwcLud3x/074HUFYFLBq2DawBu7swwSHQBuvUSy R/A8RavJO3WE252rKDozRnPQNjfYZyC6LJHAKplRNsMEE3y1FJAcmJpnY8dPCYAdCNRU 34u4Fuo+An/H6EVUqZzZtBbwPbDeOp3yIVjqY+km0su5K0/ZXPPgOtxHM02v7rtPg0e9 dr8SXAfHcka19+9hrr9g0n2yfccGNtlHlZ7OrxodtBh9P459hCsXuJkI9MhIZx4PxvzW ODpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nl6Qpc9L; 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 l63-20020a639142000000b0046fed90eb2esi1924983pge.429.2022.11.24.10.04.22; Thu, 24 Nov 2022 10:04:32 -0800 (PST) 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=nl6Qpc9L; 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 S229459AbiKXRvz (ORCPT + 87 others); Thu, 24 Nov 2022 12:51:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229645AbiKXRvo (ORCPT ); Thu, 24 Nov 2022 12:51:44 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3B4F107E52 for ; Thu, 24 Nov 2022 09:51:43 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id s5so3483168wru.1 for ; Thu, 24 Nov 2022 09:51:43 -0800 (PST) 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 :message-id:reply-to; bh=e5v771DEFc9rL1zQ1Yv2p2JInBg9pG0PvBjFvduECqo=; b=nl6Qpc9LUPQ1/U+y2XCzvo51QK9XwuwvEhKETGkJYvSmHGfJmLem2BjLxkPV81S6C8 sflcIw+PJuN5V3OCspIoG5mfVv8g7kRbjarRhvx7R7EaS1Hrwmm7x4cNtu2lpqQ5iIEP +Gx/Cab+AyLnqnQkh+YRW9dtOhpKRrU+tOqw+Nw4HZ699yZ94aJcFPT3HzoL4DkxJN// upYqbp2nA+8RH0iLaRRAfbun+PczTc+5MP0lKhuvXSpKK7k9yG5/wiNqitXgit73TsNo FAhleGi8iV3rZ+t05LJj0oE8JBUbbIZacQnBd7yM2s2WJ6zvKm/QDSWFBv6/ItF7Bp2r aP8w== 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:message-id:reply-to; bh=e5v771DEFc9rL1zQ1Yv2p2JInBg9pG0PvBjFvduECqo=; b=yQY8kenFwDa7PUsihCnqs/QB1mSvO+UzFE8NnYFQgPhog3byx0pLnUwWQ81xmJ2i4b f2Lhopqora/m0HyEenR5jvkkvzZL0+BlrV70XpDyqXvk4FLt0ljfdKzIMhYLxAr5DDaE SzFkbHF66LNoqK5dPd/HTSpOfxyuGHj7vaY6sjCpMl6TTFXPHHXur826+1DnSXYMAhtK rvfBz92R8oqF8S4Se7hkAWFyYvwLY70ArKuXVj4IajBIwNeIyB5XtfB4YLEgc6S58PA7 XL7eU43q1CUAe1ngrQSaf12xm546p40K/wV9Flc95FGakKTa41HIE090HepdmWFeJ11i A/+A== X-Gm-Message-State: ANoB5pkwvrY4dOlKp0cB463sjgSzwIwc53fmBUJ5/JZhc/PXrS3MIOBU hKhBYGSRNg5Vv9avB8gzP0XV6g== X-Received: by 2002:a5d:6486:0:b0:241:ba9c:cc65 with SMTP id o6-20020a5d6486000000b00241ba9ccc65mr20343872wri.443.1669312302331; Thu, 24 Nov 2022 09:51:42 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id bi8-20020a05600c3d8800b003c701c12a17sm6394192wmb.12.2022.11.24.09.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 09:51:41 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Abel Vesa , Srinivas Kandagatla Subject: [PATCH 04/11] misc: fastrpc: Add reserved mem support Date: Thu, 24 Nov 2022 17:51:18 +0000 Message-Id: <20221124175125.418702-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124175125.418702-1-srinivas.kandagatla@linaro.org> References: <20221124175125.418702-1-srinivas.kandagatla@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 autolearn=ham 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 From: Abel Vesa The reserved mem support is needed for CMA heap support, which will be used by AUDIOPD. Signed-off-by: Abel Vesa Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla --- drivers/misc/fastrpc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 545b7dea68bc..86d11ffadf29 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -20,6 +20,7 @@ #include #include #include +#include #define ADSP_DOMAIN_ID (0) #define MDSP_DOMAIN_ID (1) @@ -2071,6 +2072,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.25.1