From: Rostislav Lisovy <lisovy@gmail.com> To: Russell King <linux@arm.linux.org.uk>, Yijing Wang <wangyijing@huawei.com>, Bjorn Helgaas <bhelgaas@google.com>, Murali Karicheri <m-karicheri2@ti.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Rostislav Lisovy <lisovy@gmail.com> Subject: [PATCH RESEND] ARM: PCI: Use PCI_CLASS_* defines for PCI class Date: Mon, 8 Sep 2014 10:05:32 +0200 [thread overview] Message-ID: <1410163532-31057-1-git-send-email-lisovy@gmail.com> (raw) Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> Reviewed-by: Yijing Wang <wangyijing@huawei.com> --- The header file include/linux/pci_ids.h defines #define PCI_CLASS_BRIDGE_OTHER 0x0680 #define PCI_CLASS_SYSTEM_DMA 0x0801 ((struct pci_dev*)dev)->class corresponds to the 3 bytes Class code in the PCI Configuration space header -- 1B Base class, 1B Sub-class, 1B Reg-level interface. In that case (PCI_CLASS_BRIDGE_OTHER << 8) is equivalent to 0x68000 (imagine the leading zero) and ((PCI_CLASS_SYSTEM_DMA << 8) | 0x03)) is equivalent to 0x80103. arch/arm/kernel/bios32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 17a26c1..e511ad1 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -255,10 +255,9 @@ static void pci_fixup_it8152(struct pci_dev *dev) { int i; /* fixup for ITE 8152 devices */ - /* FIXME: add defines for class 0x68000 and 0x80103 */ if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST || - dev->class == 0x68000 || - dev->class == 0x80103) { + dev->class == (PCI_CLASS_BRIDGE_OTHER << 8) || + dev->class == ((PCI_CLASS_SYSTEM_DMA << 8) | 0x03)) { for (i = 0; i < PCI_NUM_RESOURCES; i++) { dev->resource[i].start = 0; dev->resource[i].end = 0; -- 1.7.10.4
WARNING: multiple messages have this Message-ID (diff)
From: lisovy@gmail.com (Rostislav Lisovy) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH RESEND] ARM: PCI: Use PCI_CLASS_* defines for PCI class Date: Mon, 8 Sep 2014 10:05:32 +0200 [thread overview] Message-ID: <1410163532-31057-1-git-send-email-lisovy@gmail.com> (raw) Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> Reviewed-by: Yijing Wang <wangyijing@huawei.com> --- The header file include/linux/pci_ids.h defines #define PCI_CLASS_BRIDGE_OTHER????????? 0x0680 #define PCI_CLASS_SYSTEM_DMA??????????? 0x0801 ((struct pci_dev*)dev)->class corresponds to the 3 bytes Class code in the PCI Configuration space header -- 1B Base class, 1B Sub-class, 1B Reg-level interface. In that case (PCI_CLASS_BRIDGE_OTHER << 8) is equivalent to 0x68000 (imagine the leading zero) and ((PCI_CLASS_SYSTEM_DMA << 8) | 0x03)) is equivalent to 0x80103. arch/arm/kernel/bios32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 17a26c1..e511ad1 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -255,10 +255,9 @@ static void pci_fixup_it8152(struct pci_dev *dev) { int i; /* fixup for ITE 8152 devices */ - /* FIXME: add defines for class 0x68000 and 0x80103 */ if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST || - dev->class == 0x68000 || - dev->class == 0x80103) { + dev->class == (PCI_CLASS_BRIDGE_OTHER << 8) || + dev->class == ((PCI_CLASS_SYSTEM_DMA << 8) | 0x03)) { for (i = 0; i < PCI_NUM_RESOURCES; i++) { dev->resource[i].start = 0; dev->resource[i].end = 0; -- 1.7.10.4
next reply other threads:[~2014-09-08 8:05 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-09-08 8:05 Rostislav Lisovy [this message] 2014-09-08 8:05 ` [PATCH RESEND] ARM: PCI: Use PCI_CLASS_* defines for PCI class Rostislav Lisovy 2014-09-08 16:36 ` Bjorn Helgaas 2014-09-08 16:36 ` Bjorn Helgaas 2014-09-08 18:03 ` Jason Gunthorpe 2014-09-08 18:03 ` Jason Gunthorpe 2014-09-08 19:39 ` Bjorn Helgaas 2014-09-08 19:39 ` Bjorn Helgaas 2014-09-08 20:04 ` Jason Gunthorpe 2014-09-08 20:04 ` Jason Gunthorpe 2014-09-09 19:31 ` Bjorn Helgaas 2014-09-09 19:31 ` Bjorn Helgaas 2014-09-09 20:15 ` Jason Gunthorpe 2014-09-09 20:15 ` Jason Gunthorpe
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=1410163532-31057-1-git-send-email-lisovy@gmail.com \ --to=lisovy@gmail.com \ --cc=bhelgaas@google.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=m-karicheri2@ti.com \ --cc=wangyijing@huawei.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.