From: Ley Foon Tan <lftan@altera.com>
To: Bjorn Helgaas <bhelgaas@google.com>, Arnd Bergmann <arnd@arndb.de>
Cc: <linux-kernel@vger.kernel.org>, <linux-arch@vger.kernel.org>,
<linux-pci@vger.kernel.org>, Ley Foon Tan <lftan@altera.com>,
<lftan.linux@gmail.com>
Subject: [PATCH v2 1/4] asm-generic: add pci required defines and functions
Date: Wed, 14 Oct 2015 14:31:41 +0800 [thread overview]
Message-ID: <1444804304-5213-2-git-send-email-lftan@altera.com> (raw)
In-Reply-To: <1444804304-5213-1-git-send-email-lftan@altera.com>
Add the generic #define and functions that required by the PCI framework.
Architecture pci.h can overwrite with their implementation if needed.
Signed-off-by: Ley Foon Tan <lftan@altera.com>
---
include/asm-generic/pci.h | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h
index f24bc51..2771b32 100644
--- a/include/asm-generic/pci.h
+++ b/include/asm-generic/pci.h
@@ -21,4 +21,38 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
#define PCI_DMA_BUS_IS_PHYS (1)
#endif
+#ifdef CONFIG_PCI
+
+#ifndef PCIBIOS_MIN_IO
+#define PCIBIOS_MIN_IO (0UL)
+#endif
+
+#ifndef PCIBIOS_MIN_MEM
+#define PCIBIOS_MIN_MEM (0UL)
+#endif
+
+#ifndef pcibios_assign_all_busses
+#define pcibios_assign_all_busses() (pci_has_flag(PCI_REASSIGN_ALL_BUS))
+#endif
+
+#ifndef pci_proc_domain
+#define pci_proc_domain pci_proc_domain
+static inline int pci_proc_domain(struct pci_bus *bus)
+{
+#ifdef CONFIG_PCI_DOMAINS_GENERIC
+ return pci_domain_nr(bus);
+#else
+ return 1;
+#endif
+}
+#endif
+
+extern int isa_dma_bridge_buggy;
+
+#else
+
+#define isa_dma_bridge_buggy (0)
+
+#endif /* CONFIG_PCI */
+
#endif /* _ASM_GENERIC_PCI_H */
--
1.8.2.1
next prev parent reply other threads:[~2015-10-14 6:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 6:31 [PATCH v2 0/4] Add PCI support on nios2 architecture Ley Foon Tan
2015-10-14 6:31 ` Ley Foon Tan [this message]
2015-10-14 7:04 ` [PATCH v2 1/4] asm-generic: add pci required defines and functions kbuild test robot
2015-10-14 7:04 ` kbuild test robot
2015-10-14 7:41 ` kbuild test robot
2015-10-14 6:31 ` [PATCH v2 2/4] pci: add include <linux/dma-mapping.h> Ley Foon Tan
2015-10-14 6:31 ` [PATCH v2 3/4] PCI: Build setup-irq.o for nios2 Ley Foon Tan
2015-10-14 6:31 ` [PATCH v2 4/4] nios2: Add architectural support for PCIe Ley Foon Tan
2015-10-21 20:44 ` [PATCH v2 0/4] Add PCI support on nios2 architecture Bjorn Helgaas
2015-10-22 1:34 ` Ley Foon Tan
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=1444804304-5213-2-git-send-email-lftan@altera.com \
--to=lftan@altera.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=lftan.linux@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.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
Powered by JetHome