From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: linux-mips@vger.kernel.org
Cc: davem@davemloft.net, robh+dt@kernel.org, mark.rutland@arm.com,
axboe@kernel.dk, peppe.cavallaro@st.com, alexandre.torgue@st.com,
joabreu@synopsys.com, bhelgaas@google.com,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-ide@vger.kernel.org, linux-pci@vger.kernel.org,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: [PATCH 5/5] libata/ahci: Apply non-standard BAR fix for Loongson
Date: Wed, 30 Oct 2019 21:53:47 +0800 [thread overview]
Message-ID: <20191030135347.3636-6-jiaxun.yang@flygoat.com> (raw)
In-Reply-To: <20191030135347.3636-1-jiaxun.yang@flygoat.com>
Loongson is using BAR0 as AHCI registers BAR.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
drivers/ata/ahci.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index dd92faf197d5..db3d7b94ad53 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -42,6 +42,7 @@ enum {
AHCI_PCI_BAR_CAVIUM = 0,
AHCI_PCI_BAR_ENMOTUS = 2,
AHCI_PCI_BAR_CAVIUM_GEN5 = 4,
+ AHCI_PCI_BAR_LOONGSON = 0,
AHCI_PCI_BAR_STANDARD = 5,
};
@@ -575,6 +576,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
/* Enmotus */
{ PCI_DEVICE(0x1c44, 0x8000), board_ahci },
+ /* Loongson */
+ { PCI_VDEVICE(LOONGSON, 0x7a08), board_ahci },
+
/* Generic, PCI class code for AHCI */
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
@@ -1663,6 +1667,9 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
ahci_pci_bar = AHCI_PCI_BAR_CAVIUM;
if (pdev->device == 0xa084)
ahci_pci_bar = AHCI_PCI_BAR_CAVIUM_GEN5;
+ } else if (pdev->vendor == PCI_VENDOR_ID_LOONGSON) {
+ if (pdev->device == PCI_DEVICE_ID_LOONGSON_AHCI)
+ ahci_pci_bar = AHCI_PCI_BAR_LOONGSON;
}
/* acquire resources */
--
2.23.0
next prev parent reply other threads:[~2019-10-30 13:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 13:53 [PATCH 0/5] PCI Devices for Loongson PCH Jiaxun Yang
2019-10-30 13:53 ` [PATCH 1/5] PCI: pci_ids: Add Loongson IDs Jiaxun Yang
2019-10-30 20:40 ` Bjorn Helgaas
2019-10-30 13:53 ` [PATCH 2/5] net: stmmac: Split devicetree parse Jiaxun Yang
2019-11-01 12:18 ` Andrew Murray
2019-11-01 22:43 ` kbuild test robot
2019-10-30 13:53 ` [PATCH 3/5] net: stmmac: pci: Add Loongson GMAC Jiaxun Yang
2019-10-30 20:36 ` Bjorn Helgaas
2019-10-30 13:53 ` [PATCH 4/5] dt-bindings: net: document loongson.pci-gmac Jiaxun Yang
2019-10-31 8:35 ` Simon Horman
2019-10-31 10:57 ` Jiaxun Yang
2019-10-31 20:42 ` Simon Horman
2019-10-30 13:53 ` Jiaxun Yang [this message]
2019-10-31 10:39 ` [PATCH 5/5] libata/ahci: Apply non-standard BAR fix for Loongson John Garry
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=20191030135347.3636-6-jiaxun.yang@flygoat.com \
--to=jiaxun.yang@flygoat.com \
--cc=alexandre.torgue@st.com \
--cc=axboe@kernel.dk \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=joabreu@synopsys.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=robh+dt@kernel.org \
/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).