Received: by 10.192.165.148 with SMTP id m20csp1195488imm; Thu, 10 May 2018 07:06:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoaopNYYO3a/iEJbZ1dmh1JHiWJgyTrfyuDtDyYnUfK/F0pEbt+HNzvYxTp8ncQqUAEBjtw X-Received: by 2002:a63:6e84:: with SMTP id j126-v6mr1311687pgc.310.1525961161140; Thu, 10 May 2018 07:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525961161; cv=none; d=google.com; s=arc-20160816; b=eegEyRqVh67LPjw8PgH3i1ga7IFxamR4GAXEScHXaoQXPQrn77BdDDvsprV0+I1uJg YUnTU1byHTpAfpfhQl8wFRUR1NGiAmzylZykoVTQksQFB1dmT/5uBvbZxJ52sJec9r1A OEL575NNoWlO+1r4Hu/z6sJctLHxG8ZkJ+U8eLl8wpixx8dETwELxU31eLAODqcbShmK sMYA0ykfCgeTMgi5jAZ1Nd/C6WjxfrHVIAYH7SSBostAxLnE5014c12fzfzeGxBFhCkd L4fEAJml+X/wYAQCP2Ap1/BVtKGmmPxzOqFEOPGqAb++YJNcY3jYQS4TwJzV9nPkaq22 Q6kg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:to:subject:cc :arc-authentication-results; bh=xjPO6brRwcgGbVNBmYMFWRBVVVuKr2AwPTLuEWw01QU=; b=RFpTikV8h1Rfnp7vyrEbaDK0qLEMvRdQ8CRJdzcd/s0bs5SBBTtPTeP0Hv25nEMShB 7g/CU6m4Uebu+h3Zcoy3OBrXUE0qIyQVS5BrXUCMDAsY10xRqaUvHo5G4UjXz9IXB+lV rWKiwTwwsQrq/OWI1zyXyE0KjEtQEJT0Zc881OJE8U6l1vuXwFSYQ+EGK7i6oSHYdsk8 BpoM89GUhsQ2kBCV+huXw9IpFchk4p8Tl0xSns5JMmbFkowCe1jskKqrEfjVKnUNGW5s GyYCa2H5YyTYv2Ai4J1+RlAOuMUBAgEerMCaqvsiV3iIjMG0b9ARzgM666zSps59HQ4R H1qw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t28-v6si885440pfi.221.2018.05.10.07.05.24; Thu, 10 May 2018 07:06:01 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965427AbeEJOEz (ORCPT + 99 others); Thu, 10 May 2018 10:04:55 -0400 Received: from foss.arm.com ([217.140.101.70]:56132 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965325AbeEJOEw (ORCPT ); Thu, 10 May 2018 10:04:52 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9183C1650; Thu, 10 May 2018 07:04:51 -0700 (PDT) Received: from [10.1.210.28] (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 26E1D3F318; Thu, 10 May 2018 07:04:47 -0700 (PDT) Cc: Sudeep Holla , rajanv@xilinx.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jolly Shah Subject: Re: [PATCH v6 02/11] firmware: xilinx: Add Zynqmp firmware driver To: Jolly Shah , ard.biesheuvel@linaro.org, mingo@kernel.org, gregkh@linuxfoundation.org, matt@codeblueprint.co.uk, hkallweit1@gmail.com, keescook@chromium.org, dmitry.torokhov@gmail.com, mturquette@baylibre.com, sboyd@codeaurora.org, michal.simek@xilinx.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-clk@vger.kernel.org References: <1523389127-14243-1-git-send-email-jollys@xilinx.com> <1523389127-14243-3-git-send-email-jollys@xilinx.com> From: Sudeep Holla Organization: ARM Message-ID: <9cbfb3cd-daa3-f145-c6f2-f15f61d1bea0@arm.com> Date: Thu, 10 May 2018 15:04:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1523389127-14243-3-git-send-email-jollys@xilinx.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/04/18 20:38, Jolly Shah wrote: > From: Rajan Vaja > > This patch is adding communication layer with firmware. > Firmware driver provides an interface to firmware APIs. > Interface APIs can be used by any driver to communicate to > PMUFW(Platform Management Unit). All requests go through ATF. > > Signed-off-by: Rajan Vaja > Signed-off-by: Jolly Shah > --- [...] > + > +/** > + * get_set_conduit_method() - Choose SMC or HVC based communication > + * @np: Pointer to the device_node structure > + * > + * Use SMC or HVC-based functions to communicate with EL2/EL3. > + * > + * Return: Returns 0 on success or error code > + */ > +static int get_set_conduit_method(struct device_node *np) > +{ > + const char *method; > + > + if (of_property_read_string(np, "method", &method)) { > + pr_warn("%s missing \"method\" property\n", __func__); > + return -ENXIO; > + } > + > + if (!strcmp("hvc", method)) { > + do_fw_call = do_fw_call_hvc; > + } else if (!strcmp("smc", method)) { > + do_fw_call = do_fw_call_smc; > + } else { > + pr_warn("%s Invalid \"method\" property: %s\n", > + __func__, method); > + return -EINVAL; > + } > + Mark R did some cleanup around SMCCC conduits[1]. It makes sense to base this on top that. But if you manage to push this for v4.18, then you may need to wait for that to be merged and clean it up after v4.18 -- Regards, Sudeep [1] https://www.spinics.net/lists/arm-kernel/msg650305.html