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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C647AC433F5 for ; Wed, 13 Apr 2022 18:30:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237708AbiDMScW (ORCPT ); Wed, 13 Apr 2022 14:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237704AbiDMScT (ORCPT ); Wed, 13 Apr 2022 14:32:19 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C15AE541BA for ; Wed, 13 Apr 2022 11:29:57 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id c15so3249100ljr.9 for ; Wed, 13 Apr 2022 11:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=5v2yWjtsq2yE0AMVSJiuBUQWC1Qu+AF7xA3OEwCIDv8=; b=xrnaFkyIM9Y8sdzRSP8L1zVvkPzlRgmMiNIBITDP+nN1I76/e7wOvhqH0+w84X8dHl uHC8c1aDfdwk5/pskaflGmZq1ouRuQeYDsQemoJw1b9qoXSZFcCe0Qme8y1ysAyiI7HF vDp4XVEmcBExfH30rFxECd3/K0Svpi1Jq8c4LQrrx9wclPpE3TmjCBddQ61iwvDkFx7R fIXoEz5WvQEl483ccx9fu2nI58M9nRnrXU8t/QVxkn1Y56Y9h9ecjnXM1qYe03f/uMVO yMl7ImLoKyrcuIkP520IeIk+JW2yGEM5WHMjgA+rT85vkH9h6558b/2mSdvE9+9JOlos 8tKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=5v2yWjtsq2yE0AMVSJiuBUQWC1Qu+AF7xA3OEwCIDv8=; b=SmhEZrISZCoSBL6ohRxGs7/TZ9cwKZv7U+2V+nGVkSZrjAexPNUqK9rACGA1He5vCc 4fVUuePnpza/MXYMlAdbM4ncYTIF/n+zRZx8Ht0vLSJ/I0QSi63b4GyFtSo0wv/QqJ9X NDqVDxn8lkp3RaSjZHUy/EY+otmiawELwaHAD8/84HV/6rg2w+67AcYtUAxlJ6yj89RM WCflLgkO/BTj1d8/73yUj0ixsiV+UahTf8MGalyzYfyBUGLPw+sIVvPDQ8+A/dChBILw lKl7HKtq3THZ911IM15cX1Qh56fLF0OzuJ5WENfU1cFHsp9AiUy06gjHRqtZAeEO3uRQ UR7w== X-Gm-Message-State: AOAM530O63FM33CQLqQrnfLA1h3aWtB2qbQYOtAfM5bPyptMkLgBRX1z tRzaGHUdxxg0iF6rBD2wG/hW+w== X-Google-Smtp-Source: ABdhPJyb61UnhRI5EkaMY9lwwwGMDWvZTuImWapdXaD5jELavgJlOP+lmvFNEEQQsLEhuFNozH12BQ== X-Received: by 2002:a2e:9ed1:0:b0:249:3cc7:2d56 with SMTP id h17-20020a2e9ed1000000b002493cc72d56mr25778404ljk.244.1649874596002; Wed, 13 Apr 2022 11:29:56 -0700 (PDT) Received: from [192.168.1.211] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id n16-20020a19ef10000000b0046ba4a33d6fsm1334552lfh.203.2022.04.13.11.29.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Apr 2022 11:29:55 -0700 (PDT) Message-ID: <474baf12-9907-4ab4-140c-08832ce36d12@linaro.org> Date: Wed, 13 Apr 2022 21:29:53 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v3 07/18] ARM: dts: qcom: reduce pci IO size to 64K for ipq8064 Content-Language: en-GB To: Ansuel Smith Cc: Andy Gross , Bjorn Andersson , Rob Herring , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan McDowell References: <20220309190152.7998-1-ansuelsmth@gmail.com> <20220309190152.7998-8-ansuelsmth@gmail.com> <6256cf8e.1c69fb81.b313c.dd8b@mx.google.com> From: Dmitry Baryshkov In-Reply-To: <6256cf8e.1c69fb81.b313c.dd8b@mx.google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 13/04/2022 16:21, Ansuel Smith wrote: > On Wed, Apr 13, 2022 at 04:19:42PM +0300, Dmitry Baryshkov wrote: >> On 09/03/2022 22:01, Ansuel Smith wrote: >>> The current value for pci IO is problematic for ath10k wifi card >>> commonly connected to ipq8064 SoC. >>> The current value is probably a typo and is actually uncommon to find >>> 1MB IO space even on a x86 arch. >> >> I checked other Qualcomm platforms (including downstream apq8084.dtsi). All >> of them list 1MB region as IO space. >> >> Interesting enough I couldn't get PCI to work on my IFC6410 (apq8064). It >> has an ethernet adapter AR8151 sitting on the PCIe bus. The driver probes, >> transmits packets successfully, but receives only garbage. I'm not sure if >> it is the hardware or a software problem. Same adapter works fine on db820c. >> > > I didn't understand if device works correctly without this change. > The alternative to this, is to change the io space globally for every arm > target and it was pointed out that it was a strange change to do. 99% > the 1mb region present on every qcom platform is a copy past error but > still a region that big worked before some kernel version just because > the kernel didn't check them. > So it's both reduce IO in dtsi or extend IO_SPACE_LIMIT for every arm > target. Reviewed-by: Dmitry Baryshkov > >>> Also with recent changes to the pci >>> driver, pci1 and pci2 now fails to function as any connected device >>> fails any reg read/write. Reduce this to 64K as it should be more than >>> enough and 3 * 64K of total IO space doesn't exceed the IO_SPACE_LIMIT >>> hardcoded for the ARM arch. >>> >>> Signed-off-by: Ansuel Smith >>> Tested-by: Jonathan McDowell >>> --- >>> arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 +++--- >>> 1 file changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi >>> index e247bf51df01..36bdfc8db3f0 100644 >>> --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi >>> +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi >>> @@ -918,7 +918,7 @@ pcie0: pci@1b500000 { >>> #address-cells = <3>; >>> #size-cells = <2>; >>> - ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */ >>> + ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00010000 /* downstream I/O */ >>> 0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */ >>> interrupts = ; >>> @@ -969,7 +969,7 @@ pcie1: pci@1b700000 { >>> #address-cells = <3>; >>> #size-cells = <2>; >>> - ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */ >>> + ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00010000 /* downstream I/O */ >>> 0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */ >>> interrupts = ; >>> @@ -1020,7 +1020,7 @@ pcie2: pci@1b900000 { >>> #address-cells = <3>; >>> #size-cells = <2>; >>> - ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */ >>> + ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00010000 /* downstream I/O */ >>> 0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */ >>> interrupts = ; >> >> >> -- >> With best wishes >> Dmitry > -- With best wishes Dmitry