linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: linux-staging@lists.linux.dev
Cc: gregkh@linuxfoundation.org, neil@brown.name,
	linux-mips@vger.kernel.org, tsbogend@alpha.franken.de,
	ilya.lipnitskiy@gmail.com, john@phrozen.org
Subject: [PATCH v2 0/3] staging: mt7621-pci: define ralink PCI_IOBASE to avoid manually ranges parsing
Date: Mon, 14 Jun 2021 12:06:14 +0200	[thread overview]
Message-ID: <20210614100617.28753-1-sergio.paracuellos@gmail.com> (raw)

Ralink MIPS platforms do not define PCI_IOBASE. This ends up in
pci generic apis not working with io resources when calls to function
'of_pci_range_to_resource' are performed because internall function
'pci_address_to_pio()' is call and it results in getting 'OF_BAD_ADDR'
as result. If we define PCI_IOBASE pci generic apis properly works for
ralink pci controllers. In this particular case, we can remove all
manually ranges and resource from driver code decresing LOC and being
more standard.

In the future, this is also useful for mips pci drivers which are still
using pci legacy apis. After having PCI_IOBASE defined, only defining 
'pci_address_to_pio' for PCI_LEGACY might be remaining to also make 
work 'pci-rt3883', 'pci-mt7620' among others. Sadly I don't have devices
to test that so I haven't write the code by myself.

Thanks in advance for your time.

Changes in v2:
  - Fix PATCH 1 indentation converting spaces into tabs.

Best regards,
     Sergio Paracuellos

Sergio Paracuellos (3):
  MIPS: ralink: Define PCI_IOBASE
  staging: mt7621-pci: remove 'mt7621_pci_parse_request_of_pci_ranges'
  staging: mt7621-dts: fix pci address for PCI memory range

 arch/mips/include/asm/mach-ralink/spaces.h |  10 +++
 drivers/staging/mt7621-dts/mt7621.dtsi     |   2 +-
 drivers/staging/mt7621-pci/pci-mt7621.c    | 100 ++++++---------------
 3 files changed, 38 insertions(+), 74 deletions(-)
 create mode 100644 arch/mips/include/asm/mach-ralink/spaces.h

-- 
2.25.1


             reply	other threads:[~2021-06-14 10:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 10:06 Sergio Paracuellos [this message]
2021-06-14 10:06 ` [PATCH v2 1/3] MIPS: ralink: Define PCI_IOBASE Sergio Paracuellos
2021-06-15 11:51   ` Greg KH
2021-06-15 12:38     ` Sergio Paracuellos
2021-06-15 13:08   ` Thomas Bogendoerfer
2021-06-15 13:12     ` Sergio Paracuellos
2021-06-15 13:24       ` Greg KH
2021-07-29 10:01   ` Thomas Bogendoerfer
2021-07-29 11:21     ` Sergio Paracuellos
2021-07-30  8:30       ` Thomas Bogendoerfer
2021-07-30  9:41         ` Sergio Paracuellos
2021-07-30 10:22         ` Sergio Paracuellos
2021-07-30 11:15           ` Sergio Paracuellos
2021-07-30 12:39             ` Thomas Bogendoerfer
2021-07-30 15:51               ` Sergio Paracuellos
2021-06-14 10:06 ` [PATCH v2 2/3] staging: mt7621-pci: remove 'mt7621_pci_parse_request_of_pci_ranges' Sergio Paracuellos
2021-06-14 10:06 ` [PATCH v2 3/3] staging: mt7621-dts: fix pci address for PCI memory range Sergio Paracuellos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210614100617.28753-1-sergio.paracuellos@gmail.com \
    --to=sergio.paracuellos@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilya.lipnitskiy@gmail.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=neil@brown.name \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).