Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1429857imu; Wed, 23 Jan 2019 17:23:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN7T5AV7YfhPvR/vPR6dTx2qldyNsRzjj4zJSK7MoxGJDIlJuj/fmuIJVFke3Jv9sI5YGEOi X-Received: by 2002:a17:902:7614:: with SMTP id k20mr4602286pll.285.1548293008381; Wed, 23 Jan 2019 17:23:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548293008; cv=none; d=google.com; s=arc-20160816; b=vf4pZ4oNADRoYQnaFMBN2C23iSucQJ47Ej7vSwL0AzcEGcNaFDgZyQrGkq6kjH+X/p 6qyrwYI8k7Q5GWS4EF/Et0iWxMKHE8DzfuEMax94+3euitekZao2+dEj+0K8A6BkgECJ EG4o8FY9EQcfdi95MhbOTpeL/BZSIUCJPsZo5y02g/rr5IIGieGKU1qzFYo4JclXnheP NFv0ml4weff1KGyagTKi3Kifc00z7SCNtK/NWpUZJrGrNPoFLul63L7OWWzqLo+fYGmU uZed0iR1xm4RIrzp6qP5pzJwYvEKH8ASQQNd2Z/JyNH/fXdsyMJDNXVyHtijckeTB2XC oTPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=iTHhqoL0KpN75j2es1CQvn5vBD0ICFGfp92qRcNHM9U=; b=vjdmX7eTocSJrvOXypQqPiz0lKV9HfUF3i1oPum4yrWfEndX2CgYHye8sQNT+MZRUe IvUojVTN9jtmXi7jjdpDaK/bDqmFayCOfhy/wDloyXgJfoBQjzHXjPT7FHH3OlkUziHI n7ERL2/yirngoCUGERcW850EZedR3V1ZqU/4Ul/OBAESLuSfjvNoPHH1dnhaiRJeenmi jOiTiGOQpiQiSEgKmxA2Z9NYJrE3qYrhyd/D/o/09jYmLAkZb2A0LHPTkKjsdH7L+cNw Z+ynUCs1FQ7FDy826WErMIITmZoNqxCTUSNIwI05VpAsuqFvjSgF8rN7xerq9UwC30jN HySw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=e7epFr8B; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si20475422pgg.173.2019.01.23.17.23.12; Wed, 23 Jan 2019 17:23:28 -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=@chromium.org header.s=google header.b=e7epFr8B; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726829AbfAXBVe (ORCPT + 99 others); Wed, 23 Jan 2019 20:21:34 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:39464 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726322AbfAXBVd (ORCPT ); Wed, 23 Jan 2019 20:21:33 -0500 Received: by mail-lj1-f194.google.com with SMTP id t9-v6so3720887ljh.6 for ; Wed, 23 Jan 2019 17:21:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iTHhqoL0KpN75j2es1CQvn5vBD0ICFGfp92qRcNHM9U=; b=e7epFr8B3O/8owaemu6RyOVfVtS1rdFOJliBIJgaj2jWzJYqEEQUSro2bgA/hxqSS2 BZ4jwFoT6Com5CuAUG8etmSoBWTg3AjhVmtjwkYysh+3l/3C8XMZsMrzxdH41cJMrT/s OHrEpr7ixplaEiIwcUOaWpaONtHTSbUrXWhrM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iTHhqoL0KpN75j2es1CQvn5vBD0ICFGfp92qRcNHM9U=; b=jvgql8CcuzuuihvAzPRqhEmSCyPcrRpcF43ADZHuvRMZxPct1zB3SrN7ZME8hh6qPD HjqL97zpjh5Q/JH2yDr/Ed2s325Xo53S6pFPOmxnyuiaHnRzJ28+Vfma5KsJpKZqIeCy bp+kR+54YarS41YFt6+TE6zn0oUoRSB/3eQhFakVWUC9w5ovHKw93ram+SYH6jM5Dyub IvGlK0hqGappwjN3g83WErdQ1A4ITi/4f1OC5/fxXI1AAsja1Fwqzhc0g4yk/BWdhToD R3PRBqNgVPlvydSLNALNJk/qbLUI1sFZvdVeEjHOxtEks+XisPBeBclp6JdoqwNkjfm3 mPSQ== X-Gm-Message-State: AJcUukfeMbdxOYRqFaxN4VjUkNac8jisI4dG9e5k5F31Xw3CRZ5I5Aa+ jXkPEIeOSpcrJZoTrUFQS9+VEZRUW/Y= X-Received: by 2002:a2e:908b:: with SMTP id l11-v6mr3731585ljg.150.1548292890048; Wed, 23 Jan 2019 17:21:30 -0800 (PST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id h203sm733796lfe.44.2019.01.23.17.21.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 17:21:29 -0800 (PST) Received: by mail-lj1-f170.google.com with SMTP id k15-v6so3717436ljc.8 for ; Wed, 23 Jan 2019 17:21:29 -0800 (PST) X-Received: by 2002:a2e:990e:: with SMTP id v14-v6mr3810694lji.60.1548292888859; Wed, 23 Jan 2019 17:21:28 -0800 (PST) MIME-Version: 1.0 References: <1548138816-1149-1-git-send-email-alokc@codeaurora.org> <1548138816-1149-5-git-send-email-alokc@codeaurora.org> In-Reply-To: <1548138816-1149-5-git-send-email-alokc@codeaurora.org> From: Evan Green Date: Wed, 23 Jan 2019 17:20:52 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/6] spi: spi-geni-qcom: Add interconnect support To: Alok Chauhan Cc: linux-arm-msm , devicetree@vger.kernel.org, LKML , linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, linux-serial@vger.kernel.org, Mark Brown , Andy Gross , David Brown , Georgi Djakov , Doug Anderson , Stephen Boyd , Bjorn Andersson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 10:34 PM Alok Chauhan wrote: > > Get the interconnect paths for SPI based Serial Engine device > and vote accordingly based on maximum supported SPI frequency. > > Signed-off-by: Alok Chauhan > --- > drivers/spi/spi-geni-qcom.c | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c > index fdb7cb88..7bbbe9d 100644 > --- a/drivers/spi/spi-geni-qcom.c > +++ b/drivers/spi/spi-geni-qcom.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include Sorted includes please, as mentioned by others. > > /* SPI SE specific registers and respective register fields */ > #define SE_SPI_CPHA 0x224 > @@ -589,6 +590,15 @@ static int spi_geni_probe(struct platform_device *pdev) > spin_lock_init(&mas->lock); > pm_runtime_enable(&pdev->dev); > > + /* Set the bus quota to a reasonable value */ > + mas->se.avg_bw = Bps_to_icc(2500); > + mas->se.peak_bw = Bps_to_icc(200000000); Like the i2c case, can we compute real value based on clock speed?