Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp546817qtb; Wed, 19 Oct 2022 08:34:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4sYFHpKyRJpgexos+UKC6tZi83EG3M8X7ZloVJMXpd7IWdiuvjMmTinjV/IWFYCj6jHVcW X-Received: by 2002:a17:902:e0c1:b0:180:1aec:1f12 with SMTP id e1-20020a170902e0c100b001801aec1f12mr8913123pla.155.1666193674895; Wed, 19 Oct 2022 08:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666193674; cv=none; d=google.com; s=arc-20160816; b=rDYwju0BdaeCoC687tdmK2wtvKEFjR1Yk0mEzWXz+N9mq1S2lTIfzQN4S6io9n9gd1 6MMMzxbecpqnJ/rpWIoDiMWek3ynH+4ecXHlORxcI4iWCpVubw0VPlH2VH/Q0TgenRVa /US0eEdJufSC8dvNIYzj6zM8v1ZF0E1qQz9miKdBohpECQM1AQpSWlVUVGzLwZCBGdGP /OpJBPeyYfLPuyH8eE6jaxDfKUGiDw1lkSTD+KyO0ACulZC/Mfs+/3LsyyQoFPaoMEom ZTUzd+y8sMhg9hoiPMkCTnryX68BP5BKHEl44PHarcZwsxqON/lOBSzjjqJsiFyZKD8v 56Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5YibLNy+OciDPg1RqQtPWy91evf3zRYGT05L7hMD1SE=; b=pjpSYS9ZI1OlvofF0Pe3FNnRoDu54PzcHXXTFYefXlGgVrWYTzeLasIkGe63f9YRos D/ft94XcT+1OhKu8cBEowKUFvsmdQt0xJh5ztryO+wTAKbpgPj5EyvkjRlhshtVbRUdO WbK134J5Sn6sNVGyGGsG7YDy+OaXIMXzII72RabLkZikbjytADzYUPJHkyhtU46l68HO AB/FU0aijsV9POFsq5I4s1XDgNjAxb5Yp8lIke14mh8OIpuO5ot+IEjqfKal6EchRTta PVoHAKbuREdb6eX1w2HdEziXgbmK4cbYbNp4B3XzQmbU0M79zpRx1t2qDAgb5FO6D79G tHvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XMmjW232; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a170902ced200b001865dfb6774si566756plg.458.2022.10.19.08.34.22; Wed, 19 Oct 2022 08:34:34 -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=@redhat.com header.s=mimecast20190719 header.b=XMmjW232; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231295AbiJSOqy (ORCPT + 99 others); Wed, 19 Oct 2022 10:46:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbiJSOqZ (ORCPT ); Wed, 19 Oct 2022 10:46:25 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 871D83C8DE for ; Wed, 19 Oct 2022 07:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666189966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5YibLNy+OciDPg1RqQtPWy91evf3zRYGT05L7hMD1SE=; b=XMmjW232vNZUtQ2gdCcRA7a4fdA4jMFXg+t/h+AfkKcoKRsNvgFJdH0xM1E9lbf05u+0kj lVc+Ub0QZAIT21zxeKsg3octwXrIjsO4/MLx/KxXMFGrM7m2ahWRwMMgOv3yKEC6jq+1KB MqU06aJs6/NXWAmNVMYwpM90XvLia3c= Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-445-4jIUQ1YtOtmod6kC37SiNw-1; Wed, 19 Oct 2022 10:32:45 -0400 X-MC-Unique: 4jIUQ1YtOtmod6kC37SiNw-1 Received: by mail-il1-f197.google.com with SMTP id n6-20020a056e021ba600b002fc99858e34so16558594ili.14 for ; Wed, 19 Oct 2022 07:32:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5YibLNy+OciDPg1RqQtPWy91evf3zRYGT05L7hMD1SE=; b=smQU36a4TpiS7S5Qh/RynJqq2cSe30bg5yRj8E5/JtTMht3Zf+r4pUQ37nBiDBmTUH 5gYR9rCZ4UyB17Wq9zlpmyeKosDtUuP8J0H52fUTZH4XGbKLJ0cnxEubTlsrn1EdoiTY OKJWVhRxxFtZfq7Iy9vilyX3BgBzEHL4WNK6DTD1Mxd4dTX56rFXljMpOvceaB2OWd5j Fhh1GasS6dEYsRhotXiUCI6y1LaqtFekV5SBPAS9cZNYR5JLfENtJjpRCmzP0XjFsXQf EEG78CRTxrhksXZXzrU7IpolT4ZvY+AzyAECjFTyrP5pZe9DKfC44k/5eY4JAA6W5ZCo C1BA== X-Gm-Message-State: ACrzQf2VFETDeJCs6jQGVrO80vF1Z7FFTVGThgk6ORTwhgLkaT0ncsfu xUNbn4auxwfn5JM2AQH/61Vm26aT5lCtOInMEFU4W8QaSWi7snS4lFWrMgHNDe/onu+nr2bv/VJ 2xNmznewRMRoX52Oqde5WUk6Z X-Received: by 2002:a02:54c1:0:b0:363:453e:2ccb with SMTP id t184-20020a0254c1000000b00363453e2ccbmr6451903jaa.228.1666189964205; Wed, 19 Oct 2022 07:32:44 -0700 (PDT) X-Received: by 2002:a02:54c1:0:b0:363:453e:2ccb with SMTP id t184-20020a0254c1000000b00363453e2ccbmr6451869jaa.228.1666189963941; Wed, 19 Oct 2022 07:32:43 -0700 (PDT) Received: from x1 (c-98-239-145-235.hsd1.wv.comcast.net. [98.239.145.235]) by smtp.gmail.com with ESMTPSA id f20-20020a02a114000000b00363961f0f2dsm2140039jag.115.2022.10.19.07.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 07:32:43 -0700 (PDT) Date: Wed, 19 Oct 2022 10:32:41 -0400 From: Brian Masney To: Johan Hovold Cc: Stanimir Varbanov , Lorenzo Pieralisi , Andy Gross , Bjorn Andersson , Konrad Dybcio , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Krishna chaitanya chundru , quic_vbadigan@quicinc.com, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] PCI: qcom: Add basic interconnect support Message-ID: References: <20221017112449.2146-1-johan+linaro@kernel.org> <20221017112449.2146-3-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221017112449.2146-3-johan+linaro@kernel.org> User-Agent: Mutt/2.2.7 (2022-08-07) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 On Mon, Oct 17, 2022 at 01:24:49PM +0200, Johan Hovold wrote: > + /* > + * Some Qualcomm platforms require interconnect bandwidth constraints > + * to be set before enabling interconnect clocks. > + * > + * Set an initial peak bandwidth corresponding to single-lane Gen 1 > + * for the pcie-mem path. > + */ > + ret = icc_set_bw(pcie->icc_mem, 0, MBps_to_icc(250)); [snip] > + speed = FIELD_GET(PCI_EXP_LNKSTA_CLS, status); > + width = FIELD_GET(PCI_EXP_LNKSTA_NLW, status); > + > + switch (speed) { > + case 1: > + bw = MBps_to_icc(250); > + break; > + case 2: > + bw = MBps_to_icc(500); > + break; > + default: > + case 3: > + bw = MBps_to_icc(985); > + break; > + } Just curious: These platforms have a 4 lane PCIe bus. Why use 985 instead of 1000 for the maximum? Brian