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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A020C4332F for ; Sat, 25 Sep 2021 17:33:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7433F61076 for ; Sat, 25 Sep 2021 17:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbhIYRe7 (ORCPT ); Sat, 25 Sep 2021 13:34:59 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:56305 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbhIYRe6 (ORCPT ); Sat, 25 Sep 2021 13:34:58 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]) by mrelayeu.kundenserver.de (mreue012 [213.165.67.97]) with ESMTPSA (Nemesis) id 1M76jv-1mUQo92PS3-008eqj; Sat, 25 Sep 2021 19:33:22 +0200 Received: by mail-wr1-f41.google.com with SMTP id t8so37511493wri.1; Sat, 25 Sep 2021 10:33:22 -0700 (PDT) X-Gm-Message-State: AOAM532WNakjyL3ZvQX8Bu0q+nKLKEoLLsBcs1qGxaP5y5f8K8gut0Z7 3qxvJ34QfBfMcjzQjy0ErPzZsaN8kBOjQv9WYQE= X-Google-Smtp-Source: ABdhPJz71+W5QKw02u9tzKycAUfeIQyFgilizU1qNL0MVKu7i8r/pw9Qp17Rg7H+KND57HeXcwT7x94QOx8SGQmJwGI= X-Received: by 2002:a1c:7413:: with SMTP id p19mr7959099wmc.98.1632591202155; Sat, 25 Sep 2021 10:33:22 -0700 (PDT) MIME-Version: 1.0 References: <20210924211139.3477-1-sergio.paracuellos@gmail.com> <20210924211139.3477-7-sergio.paracuellos@gmail.com> In-Reply-To: <20210924211139.3477-7-sergio.paracuellos@gmail.com> From: Arnd Bergmann Date: Sat, 25 Sep 2021 19:33:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 6/6] staging: mt7621-pci: properly adjust base address for the IO window To: Sergio Paracuellos Cc: Thomas Bogendoerfer , Rob Herring , Arnd Bergmann , Catalin Marinas , Liviu Dudau , Bjorn Helgaas , Matthias Brugger , gregkh , "open list:BROADCOM NVRAM DRIVER" , linux-pci , linux-staging@lists.linux.dev, neil@brown.name, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:jrQkC6XM1UQQPxoAghMY4Q2F/h1sU5wN/PVN6YbA4qAq0PYAFGx Yhx1wWTzgkwSmL/NcvP9NomZASc3xBzsHfc5tfswikNQIgx8FujqZ7Ofpw2LvYbRPTJXHFA 9RGnymj6aYew/Lg7hFw5yxg8Xmok8yHedhVfL856tuRLq57ywjr869T492UHgGCXW650Eo8 MYU01jEH3dq/BqGKe+cBQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:3QApOtBy+IM=:iH1RqHz9NUzJKyDtzn8evv kIXGIYG2ubQYOPWHZ+Ex1+bDSidDlfOiHCHXvJijVVR0sWkosuf5fKpZy2bxo5fg5jlkujG/2 KbMq9wqlmYhNMT4cB7l2Tdmk8d4koKTJsdCtSvvKxP+zv6S1roFMDXqD7Uc3vQY9XH8NJK9mh VFaCcpjys/2heH6Xa0kbQhPyQv9Lcv08WyV5HH2mVKZZG+tyW5KMjh6HkDQUWmTNJlRN74ikD Juf9jk9Bf/kWgfzgWps/tWXC4QA5Tqgp6zKZDdiEIKWkwhrxJZLR8GkgsE7TklFvZok/bICL0 k62jO5dMFmqvp+EtWNsymZs3nsbxpzIYRie+LmhYwlYte8YOsZ4D3X5y24FafqmSdy4JBnoEX fC8cT2NWQTl6UQMobVxPzxDpiXbnuE6N9P0sjNv9rWbgoFMKzeMGFBWMcL21hAFlCxAVN2Lh6 BoolaKDT1m+00R3kIyTUH2BcAKd2HHaPJdqoEfKQQimhctjF0w+EP9J5z9IVIVZCsvBdtgAxE 54kM9fjR0i7iYFv8mj/5Jmn1UdZkK++SVPTlcyl3cmtdasZFwlzF/g+uGBXpZKRsio5ZeBicB rliQhXPJC7l3EIQ6gtWwgkTayc0eOKOgU7iWwlYthrX9MAEIIVD+Or4CrAtAReWbKsZXkeZqg LZgZnQPX76nHcvxraRIuASKgcweH7nZY65oaAVvIbErXRVQOmUqoAUQKvME+2fAM7jRMV8geS AVw8KVRsk8+q86M5SVsd009pHOVBILa07YA/0Bm/bCa+NbU3rngvb7xt20ZCErc0u04Q4YLiI tlcsmQPyeanZL4HzDjo0vMgRkp6cRQF1OeyhlobkQlL9SaHz0BAEnD/xX6M0O9S4JVA3YCYuU AdrGAplyfj+HIjhV1QIg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 24, 2021 at 11:11 PM Sergio Paracuellos wrote: > > The value to adjust in the bridge register RALINK_PCI_IOBASE must take into > account the raw value from DT, not only the translated linux port number. > As long as io_offset is zero, the two are the same, but if you were to use > multiple host bridge in the system, or pick a different bus address in DT, > you can have a nonzero io_offset. At this means to take into account the > bus address which is used to calculate this offset, substracting it from > the IO resource start address. > > Signed-off-by: Sergio Paracuellos Acked-by: Arnd Bergmann From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 946983FC7 for ; Sat, 25 Sep 2021 17:33:24 +0000 (UTC) Received: from mail-wr1-f44.google.com ([209.85.221.44]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MF3U0-1mfC2M2FGi-00FQkp for ; Sat, 25 Sep 2021 19:33:22 +0200 Received: by mail-wr1-f44.google.com with SMTP id t18so37446365wrb.0 for ; Sat, 25 Sep 2021 10:33:22 -0700 (PDT) X-Gm-Message-State: AOAM5309YoTTFNKjGNL2OkrzshuZSbhFLptjtJb2FLo4BcaqFBLAHMIC DZZdVdFaEONLRY7+jBHKZ68XRnpS5NW3jsIDyoQ= X-Google-Smtp-Source: ABdhPJz71+W5QKw02u9tzKycAUfeIQyFgilizU1qNL0MVKu7i8r/pw9Qp17Rg7H+KND57HeXcwT7x94QOx8SGQmJwGI= X-Received: by 2002:a1c:7413:: with SMTP id p19mr7959099wmc.98.1632591202155; Sat, 25 Sep 2021 10:33:22 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20210924211139.3477-1-sergio.paracuellos@gmail.com> <20210924211139.3477-7-sergio.paracuellos@gmail.com> In-Reply-To: <20210924211139.3477-7-sergio.paracuellos@gmail.com> From: Arnd Bergmann Date: Sat, 25 Sep 2021 19:33:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 6/6] staging: mt7621-pci: properly adjust base address for the IO window To: Sergio Paracuellos Cc: Thomas Bogendoerfer , Rob Herring , Arnd Bergmann , Catalin Marinas , Liviu Dudau , Bjorn Helgaas , Matthias Brugger , gregkh , "open list:BROADCOM NVRAM DRIVER" , linux-pci , linux-staging@lists.linux.dev, neil@brown.name, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Je2F8sFefstsR6A+SgVicut8hRMk+6cyP1cl0zH6KDPT3O37g7W FikVSqHVTVdLf6C+CuNTD3YBKXqLQh9MRweX+MMH/E4PmEYq0fptReOMIkrnq3uo/0CZZDe SlNwI2AhtMBTJp+GNFuIMbVe1avoy/sF1B2bCooxzZdqeuPGIQUHSxN+BagFMEehEZ2uR0B fLtH2H+MlzlbtJpHLHGnA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:2enO981ZNss=:uCBvOgCzWpX6YoCgsEwu5J uhPfBrphprdFeOUYlmydqZy0KW2XuizWq9ztkoZuqWsHU+Vjl9eze55QSUL6AshJ/KKpCILDl +wbEXCgZiA4bmtxXLNclo8mkuSLLQIhoEmR4IAoSZF11U/iAudGozhc0kiiNZCN1Kcnt/uZc2 5gQcBQo/9m9bvtdVHWWYjIgYnss5l2RoYXeVsTnVVtOYl8kx0FFraBzrDxlS2+/jcBe+gl+8V n6EdWBe/CB2kEVKdxjl8YL4bydaim96dd0sKKVzTaZ3Xdv5ezywgeJ1GNNX07m+rMBSeKKMSl Wb8v0P/ZCWSVF5hjNsG1okrvqvM5MrkiraPnq7zcDn7iBs0hIV9JRWvJ6pdBuC8+2RBZzkw+8 EwfHQ02OcqawegD1wcDhHb5kOsq1oqPlYb+neqaNgkuu9qfX8+Jyy7kQkH7KIdSkzAGqIZShk GqhA2jOjURysQ+PbrDFfkTgzjvPK8vNCVG+fDlXLHTrlEASNRphZe6jBmqrHBUYcpvGXqHohT 7KTB8f05WuEvSOpMOAAvLn6lAP1cNHCiO8jSW2NNr2FazvWntkP9ztN7bHXXjRia8aJWsmA+p HrXzCaYp3VR+bkBxF5jCtpvLxBlCmxGwN5CJ1pcIykWONvKhmvs5hhE2UMPxkWInKRyywis9v e6z2hkWZEgAotd7cl9Ghm+gXsTzVfMe1ew60CSz3BHtkhSgBAzQAlXHcVPrUK3+S2WN7joMY2 DuOsiRBe8kKU55k2rQ0rkBesHLejAt6TiNrv2kGyffiSofuBi8a7Y2pH3zKRH48l/5yxIUpTu S/iVye0rFvUXgjfPgEuk230srecRO8VlQDWeEb/3exnOTmpI5CxwJlb8HV+aIG9QOELnrqCzw IR7BuZF/ybgqycbspnhQ== On Fri, Sep 24, 2021 at 11:11 PM Sergio Paracuellos wrote: > > The value to adjust in the bridge register RALINK_PCI_IOBASE must take into > account the raw value from DT, not only the translated linux port number. > As long as io_offset is zero, the two are the same, but if you were to use > multiple host bridge in the system, or pick a different bus address in DT, > you can have a nonzero io_offset. At this means to take into account the > bus address which is used to calculate this offset, substracting it from > the IO resource start address. > > Signed-off-by: Sergio Paracuellos Acked-by: Arnd Bergmann