From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C05DC433B4 for ; Mon, 19 Apr 2021 14:34:14 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9803861245 for ; Mon, 19 Apr 2021 14:34:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9803861245 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rA29+WX44fJGC95gI3TO/SPpv2TL5NaWDq2ef1hBB0U=; b=AFKHnx1HyvXPbPoNfPlyFbeFg eYwOmODx3G/XCYbrU+NFBzeI1yPdSUo0LbG60go0wQPf1ORuvtRiACWkN4D087JBRME29fW4gWN6S xYtlJqvih3hk+75UwzPesJhWbAaMw9VmK99eg2yodGfmnFYAeOjywZgQ5lOWrCtYS1vizPiKFWEfh gAJDiXt3MFKquWpiFAF5/tbDOFQNf08OuudSXNJgcZomZYKQ7asP7srSNuTYpitsIn3Hwb/df8MEu FSQHwooDBuvY6sLoH5squ3az+DG9UGkmaeec51hI09JEN0XGfUVdEERpZuLCpTWqZSuhBgzOl7jgd oBMzQKUFQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYUx5-00A72o-Mh; Mon, 19 Apr 2021 14:32:39 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYUx3-00A72h-W0 for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 14:32:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4nWRWEmvjlM65gvpUkZGPybpr9Usfroi21CGmSCGgnQ=; b=siXk38eU0V9fz5hxYlqF5VQBPs FBNu3HcyXsDsuGAh+dwSI9eAmaXveOGAcG6PM5Ykx8Epc90UJukwd7eKlXuFiYHjMMCp6EPgdlwtM OSssuWK9cMeMKj3GAxQGmcfwziEkqk0a+lUHPDemwGL4OLFqv6iU1FuqW8uuLzJjqx6s/LRpdIacU KlHdIJs2DJSeMdQX+5B0sMDeIrC0BTTj7m8duOApPt7r7RB5Ya3picTxNenTRiN6D5JphdOVc2GAW MQCDZWISJiGWwep8UWMSHeDR/tHOkUFmMIdJvSKeFO9Px+wfev/eaxs90pVRPwZdoXgEHICPkh74f A4XiotfA==; Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYUwy-00BSE0-V2 for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 14:32:36 +0000 Received: by mail-oi1-x22f.google.com with SMTP id k18so30680797oik.1 for ; Mon, 19 Apr 2021 07:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4nWRWEmvjlM65gvpUkZGPybpr9Usfroi21CGmSCGgnQ=; b=dKL+8Di3Vh6QSg4UqSIU/ueXxsqOGsn3aeAhCMqzWv41AGVzSLAx1Ybl794pFYHlfG 3TUX1OT/sBVmuDWRZOG8OqLuCv0p08RsLlCGp5JmsYmuOLPShTe2tXYNpIVo1mXY4nPg 8W94VxamJxc4H91RpnHe8FbFMEXdkhnkEbNv5G3SHB+Pl7IZDP8DwwLKVe0VITYW7Z6O hVIKKJzfjEB0Zxd0+uM9b/b76cwX63K/kOrrVNR++7bhgj90+LQIuCzqmjUhKKf0IQiO fuCn9ZmD3+G8qXxepR7uHqrVcdxpjY8KisVw5KC7qdNTn9x8SioiKjV/nTVbgTFw1TGR C7OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4nWRWEmvjlM65gvpUkZGPybpr9Usfroi21CGmSCGgnQ=; b=lFyUPQ0rxY3dKgn7ceols39gtPzG4MLHN4YdfGl5qsqVgLyAAnyBPfKobLkoOVSAUm E5VibvM9LZRO8sbF8erdDy4JRrJ1yjElOaWry8m8B4QR6MpGtZO/NiS88IFTzocZyx2E 3nytdNq24QFKC2zitu6lWrsbWdC8JGl/l5p5flVFHr3Y8tw/Ol7ROx3CVsE9knKKcJgY I8wM3BroLaBYVVMDkMnaaN4GbbWqQoVOe5xZttuHDvr4K6ckqKmdwLNfp6UCf4/LPixd lTSlsKndqgVsUt6A5XB6UsWIXz8xzcyAznqAu8lQukbyPbzBOHmTS4t36UqsEVFPVSmP k7OA== X-Gm-Message-State: AOAM533TVkBV6JKbEgIVKzNEYzEyeoi67m0NpAaJCeJbtq+xLQy4jYFI VPPty9fUBkf1jf0EEdDA3BvTKA== X-Google-Smtp-Source: ABdhPJy3ipgPHZ4m9cveqEO3UoOQ3lZDcUGjgRZW0c3MiRNf9Yn6lUjxnt5tD4qel7g8ZRGUhgynJA== X-Received: by 2002:aca:408b:: with SMTP id n133mr13137273oia.13.1618842748685; Mon, 19 Apr 2021 07:32:28 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id g26sm3567915otr.73.2021.04.19.07.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:32:28 -0700 (PDT) Date: Mon, 19 Apr 2021 09:32:25 -0500 From: Bjorn Andersson To: schowdhu@codeaurora.org Cc: Felipe Balbi , Andy Gross , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Sai Prakash Ranjan , Sibi Sankar , Rajendra Nayak , vkoul@kernel.org Subject: Re: [PATCH V3 2/4] soc: qcom: dcc:Add driver support for Data Capture and Compare unit(DCC) Message-ID: <20210419143225.GO1538589@yoga> References: <59b2e83d5d0f435112f6ae266612ff91c85b120f.1618387606.git.schowdhu@codeaurora.org> <87k0p4njni.fsf@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_073233_028287_93A7ACFB X-CRM114-Status: GOOD ( 24.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon 19 Apr 05:32 CDT 2021, schowdhu@codeaurora.org wrote: > On 2021-04-15 12:01, Felipe Balbi wrote: > > Hi, > > > > Souradeep Chowdhury writes: > > > diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile > > > index ad675a6..e7f0ccb 100644 > > > --- a/drivers/soc/qcom/Makefile > > > +++ b/drivers/soc/qcom/Makefile > > > @@ -1,19 +1,22 @@ > > > # SPDX-License-Identifier: GPL-2.0 > > > CFLAGS_rpmh-rsc.o := -I$(src) > > > obj-$(CONFIG_QCOM_AOSS_QMP) += qcom_aoss.o > > > -obj-$(CONFIG_QCOM_GENI_SE) += qcom-geni-se.o > > > +obj-$(CONFIG_QCOM_APR) += apr.o > > > obj-$(CONFIG_QCOM_COMMAND_DB) += cmd-db.o > > > obj-$(CONFIG_QCOM_CPR) += cpr.o > > > +obj-$(CONFIG_QCOM_DCC) += dcc.o > > > +obj-$(CONFIG_QCOM_GENI_SE) += qcom-geni-se.o > > > obj-$(CONFIG_QCOM_GSBI) += qcom_gsbi.o > > > +obj-$(CONFIG_QCOM_KRYO_L2_ACCESSORS) += kryo-l2-accessors.o > > > +obj-$(CONFIG_QCOM_LLCC) += llcc-qcom.o > > > obj-$(CONFIG_QCOM_MDT_LOADER) += mdt_loader.o > > > obj-$(CONFIG_QCOM_OCMEM) += ocmem.o > > > obj-$(CONFIG_QCOM_PDR_HELPERS) += pdr_interface.o > > > obj-$(CONFIG_QCOM_QMI_HELPERS) += qmi_helpers.o > > > -qmi_helpers-y += qmi_encdec.o qmi_interface.o > > > obj-$(CONFIG_QCOM_RMTFS_MEM) += rmtfs_mem.o > > > obj-$(CONFIG_QCOM_RPMH) += qcom_rpmh.o > > > -qcom_rpmh-y += rpmh-rsc.o > > > -qcom_rpmh-y += rpmh.o > > > +obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o > > > +obj-$(CONFIG_QCOM_RPMPD) += rpmpd.o > > > obj-$(CONFIG_QCOM_SMD_RPM) += smd-rpm.o > > > obj-$(CONFIG_QCOM_SMEM) += smem.o > > > obj-$(CONFIG_QCOM_SMEM_STATE) += smem_state.o > > > @@ -21,8 +24,6 @@ obj-$(CONFIG_QCOM_SMP2P) += smp2p.o > > > obj-$(CONFIG_QCOM_SMSM) += smsm.o > > > obj-$(CONFIG_QCOM_SOCINFO) += socinfo.o > > > obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o > > > -obj-$(CONFIG_QCOM_APR) += apr.o > > > -obj-$(CONFIG_QCOM_LLCC) += llcc-qcom.o > > > -obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o > > > -obj-$(CONFIG_QCOM_RPMPD) += rpmpd.o > > > -obj-$(CONFIG_QCOM_KRYO_L2_ACCESSORS) += kryo-l2-accessors.o > > > +qmi_helpers-y += qmi_encdec.o qmi_interface.o > > > +qcom_rpmh-y += rpmh-rsc.o > > > +qcom_rpmh-y += rpmh.o > > > > why so many changes? > > This has been accidentally sorted based on the config names. Will be fixing > this in next version of the patch. > > > > > > diff --git a/drivers/soc/qcom/dcc.c b/drivers/soc/qcom/dcc.c > > > new file mode 100644 > > > index 0000000..fcd5580 > > > --- /dev/null > > > +++ b/drivers/soc/qcom/dcc.c > > > @@ -0,0 +1,1539 @@ > > > +// SPDX-License-Identifier: GPL-2.0-only > > > +/* > > > + * Copyright (c) 2015-2021, The Linux Foundation. All rights > > > reserved. > > > + */ > > > + > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > +#include > > > + > > > + > > > > one blank line is enough > > Ack > > > > > > +#define TIMEOUT_US 100 > > > + > > > +#define dcc_writel(drvdata, val, off) \ > > > + writel((val), drvdata->base + dcc_offset_conv(drvdata, off)) > > > +#define dcc_readl(drvdata, off) \ > > > + readl(drvdata->base + dcc_offset_conv(drvdata, off)) > > > + > > > +#define dcc_sram_readl(drvdata, off) \ > > > + readl(drvdata->ram_base + off) > > > > this would be probably be better as static inlines. > > These are simple read and write operations used in the driver > which just calls the generic writel and readl function. > That's why macros have been used here to lesson the overhead > of an extra function call. The compiler will realize that your static dcc_sram_readl() is cheaper to inline than call and do so for you. So you can expect that there's no difference in the output from the compiler, and if there is then the compiler knows something that you're overlooking. Regards, Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel