* [PATCH 0/2] Add PCI support on nios2 architecture
@ 2015-09-22 7:19 Ley Foon Tan
2015-09-22 7:19 ` [PATCH 1/2] nios2: Add architectural support for PCIe Ley Foon Tan
2015-09-22 7:19 ` [PATCH 2/2] PCI: Build setup-irq.o for nios2 Ley Foon Tan
0 siblings, 2 replies; 9+ messages in thread
From: Ley Foon Tan @ 2015-09-22 7:19 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: linux-kernel, linux-arch, linux-pci, Ley Foon Tan, lftan.linux
This patchset adding pci support for nios2 architecture.
It requires pci_fixup_irqs() from setup-irq.c.
Ley Foon Tan (2):
nios2: Add architectural support for PCIe
PCI: Build setup-irq.o for nios2
arch/nios2/Kconfig | 24 +++++++++++++++++++++
arch/nios2/include/asm/Kbuild | 2 +-
arch/nios2/include/asm/io.h | 11 +++++++++-
arch/nios2/include/asm/pci.h | 50 +++++++++++++++++++++++++++++++++++++++++++
arch/nios2/kernel/Makefile | 1 +
arch/nios2/kernel/pci.c | 33 ++++++++++++++++++++++++++++
drivers/pci/Makefile | 1 +
7 files changed, 120 insertions(+), 2 deletions(-)
create mode 100644 arch/nios2/include/asm/pci.h
create mode 100644 arch/nios2/kernel/pci.c
--
1.8.2.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] nios2: Add architectural support for PCIe
2015-09-22 7:19 [PATCH 0/2] Add PCI support on nios2 architecture Ley Foon Tan
@ 2015-09-22 7:19 ` Ley Foon Tan
2015-09-22 8:18 ` Arnd Bergmann
2015-09-22 7:19 ` [PATCH 2/2] PCI: Build setup-irq.o for nios2 Ley Foon Tan
1 sibling, 1 reply; 9+ messages in thread
From: Ley Foon Tan @ 2015-09-22 7:19 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: linux-kernel, linux-arch, linux-pci, Ley Foon Tan, lftan.linux
This patch add pcie support on nios2 platform.
Signed-off-by: Ley Foon Tan <lftan@altera.com>
---
arch/nios2/Kconfig | 24 +++++++++++++++++++++
arch/nios2/include/asm/Kbuild | 2 +-
arch/nios2/include/asm/io.h | 11 +++++++++-
arch/nios2/include/asm/pci.h | 50 +++++++++++++++++++++++++++++++++++++++++++
arch/nios2/kernel/Makefile | 1 +
arch/nios2/kernel/pci.c | 33 ++++++++++++++++++++++++++++
6 files changed, 119 insertions(+), 2 deletions(-)
create mode 100644 arch/nios2/include/asm/pci.h
create mode 100644 arch/nios2/kernel/pci.c
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 4375554..9e0a291 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -11,6 +11,7 @@ config NIOS2
select HAVE_ARCH_KGDB
select IRQ_DOMAIN
select MODULES_USE_ELF_RELA
+ select MIGHT_HAVE_PCI
select OF
select OF_EARLY_FLATTREE
select SOC_BUS
@@ -194,6 +195,29 @@ config NIOS2_IO_REGION_BASE
endmenu
+menu "Bus support"
+config PCI
+ bool "PCI support"
+ select GENERIC_PCI_IOMAP
+ help
+ This feature enables support for PCIe bus system. If you say Y
+ here, the kernel will include drivers and infrastructure code
+ to support PCIe bus devices.
+
+config PCI_DOMAINS
+ def_bool PCI
+
+config PCI_DOMAINS_GENERIC
+ def_bool PCI
+
+config PCI_SYSCALL
+ def_bool PCI
+
+source "drivers/pci/Kconfig"
+source "drivers/pci/pcie/Kconfig"
+
+endmenu
+
menu "Executable file formats"
source "fs/Kconfig.binfmt"
diff --git a/arch/nios2/include/asm/Kbuild b/arch/nios2/include/asm/Kbuild
index 914864e..8b928ba 100644
--- a/arch/nios2/include/asm/Kbuild
+++ b/arch/nios2/include/asm/Kbuild
@@ -34,8 +34,8 @@ generic-y += mm-arch-hooks.h
generic-y += mman.h
generic-y += module.h
generic-y += msgbuf.h
+generic-y += msi.h
generic-y += param.h
-generic-y += pci.h
generic-y += percpu.h
generic-y += poll.h
generic-y += posix_types.h
diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h
index c5a62da..74ba082 100644
--- a/arch/nios2/include/asm/io.h
+++ b/arch/nios2/include/asm/io.h
@@ -14,7 +14,7 @@
#include <linux/types.h>
#include <asm/pgtable-bits.h>
-/* PCI is not supported in nios2, set this to 0. */
+/* PCI I/O space is not supported, set this to 0. */
#define IO_SPACE_LIMIT 0
#define readb_relaxed(addr) readb(addr)
@@ -45,6 +45,15 @@ static inline void iounmap(void __iomem *addr)
__iounmap(addr);
}
+static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
+{
+ return NULL;
+}
+
+static inline void ioport_unmap(void __iomem *p)
+{
+}
+
#define ioremap_wc ioremap_nocache
#define ioremap_wt ioremap_nocache
diff --git a/arch/nios2/include/asm/pci.h b/arch/nios2/include/asm/pci.h
new file mode 100644
index 0000000..f2cba05
--- /dev/null
+++ b/arch/nios2/include/asm/pci.h
@@ -0,0 +1,50 @@
+/* Copyright Altera Corporation (C) 2015. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef _ASM_NIOS2_PCI_H
+#define _ASM_NIOS2_PCI_H
+
+#ifdef __KERNEL__
+#include <linux/dma-mapping.h>
+
+#include <asm/io.h>
+#include <asm-generic/pci-bridge.h>
+#include <asm-generic/pci-dma-compat.h>
+
+#define PCIBIOS_MIN_IO 0UL
+#define PCIBIOS_MIN_MEM 0UL
+
+/*
+ * Set to 1 if the kernel should re-assign all PCI bus numbers
+ */
+#define pcibios_assign_all_busses() (pci_has_flag(PCI_REASSIGN_ALL_BUS))
+
+#ifdef CONFIG_PCI
+extern int isa_dma_bridge_buggy;
+#else
+#define isa_dma_bridge_buggy (0)
+#endif
+
+#ifdef CONFIG_PCI_DOMAINS
+static inline int pci_proc_domain(struct pci_bus *bus)
+{
+ return pci_domain_nr(bus);
+}
+#endif /* CONFIG_PCI_DOMAINS */
+
+#endif /* __KERNEL__ */
+
+#endif
diff --git a/arch/nios2/kernel/Makefile b/arch/nios2/kernel/Makefile
index 1aae257..bb1ef81 100644
--- a/arch/nios2/kernel/Makefile
+++ b/arch/nios2/kernel/Makefile
@@ -10,6 +10,7 @@ obj-y += entry.o
obj-y += insnemu.o
obj-y += irq.o
obj-y += nios2_ksyms.o
+obj-y += pci.o
obj-y += process.o
obj-y += prom.o
obj-y += ptrace.o
diff --git a/arch/nios2/kernel/pci.c b/arch/nios2/kernel/pci.c
new file mode 100644
index 0000000..d28aed7
--- /dev/null
+++ b/arch/nios2/kernel/pci.c
@@ -0,0 +1,33 @@
+/* Copyright Altera Corporation (C) 2015. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#include <linux/pci.h>
+
+/*
+ * Called after each bus is probed, but before its children are examined
+ */
+void pcibios_fixup_bus(struct pci_bus *bus)
+{
+ /* nothing to do, expected to be removed in the future */
+}
+
+/*
+ * We don't have to worry about legacy ISA devices, so nothing to do here
+ */
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
+ resource_size_t size, resource_size_t align)
+{
+ return res->start;
+}
--
1.8.2.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] PCI: Build setup-irq.o for nios2
2015-09-22 7:19 [PATCH 0/2] Add PCI support on nios2 architecture Ley Foon Tan
2015-09-22 7:19 ` [PATCH 1/2] nios2: Add architectural support for PCIe Ley Foon Tan
@ 2015-09-22 7:19 ` Ley Foon Tan
1 sibling, 0 replies; 9+ messages in thread
From: Ley Foon Tan @ 2015-09-22 7:19 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: linux-kernel, linux-arch, linux-pci, Ley Foon Tan, lftan.linux
nios2 requires setup-irq.o to provide pci_fixup_irqs() implementation.
Signed-off-by: Ley Foon Tan <lftan@altera.com>
---
drivers/pci/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 73e4af4..db8efcd 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -39,6 +39,7 @@ obj-$(CONFIG_MIPS) += setup-irq.o
obj-$(CONFIG_TILE) += setup-irq.o
obj-$(CONFIG_SPARC_LEON) += setup-irq.o
obj-$(CONFIG_M68K) += setup-irq.o
+obj-$(CONFIG_NIOS2) += setup-irq.o
#
# ACPI Related PCI FW Functions
--
1.8.2.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] nios2: Add architectural support for PCIe
2015-09-22 7:19 ` [PATCH 1/2] nios2: Add architectural support for PCIe Ley Foon Tan
@ 2015-09-22 8:18 ` Arnd Bergmann
2015-09-22 10:53 ` Ley Foon Tan
0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2015-09-22 8:18 UTC (permalink / raw)
To: Ley Foon Tan
Cc: Bjorn Helgaas, linux-kernel, linux-arch, linux-pci, lftan.linux
On Tuesday 22 September 2015 15:19:26 Ley Foon Tan wrote:
> +
> +config PCI_SYSCALL
> + def_bool PCI
IIRC, PCI_SYSCALL is deprecated and you should just leave that
turned off.
In any case, you enable the syscalls here but don't assign a
system call number, so that is rather pointless. I
I might be missing something though. Bjorn?
> @@ -14,7 +14,7 @@
> #include <linux/types.h>
> #include <asm/pgtable-bits.h>
>
> -/* PCI is not supported in nios2, set this to 0. */
> +/* PCI I/O space is not supported, set this to 0. */
> #define IO_SPACE_LIMIT 0
>
> #define readb_relaxed(addr) readb(addr)
It might be useful to enable this, just in case someone connects
a PCI host bridge that does support I/O space.
Which host bridge do you use? Are you sure there is no I/O space?
Most of them use a set of translation windows to set up a mapping
between bus address (memory, config and io space) and physical
(mmio) space.
> diff --git a/arch/nios2/include/asm/pci.h b/arch/nios2/include/asm/pci.h
> new file mode 100644
> index 0000000..f2cba05
> --- /dev/null
> +++ b/arch/nios2/include/asm/pci.h
What happens if you use the asm-generic header? If there is something
missing in it, we can try to get it to do the right things.
Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] nios2: Add architectural support for PCIe
2015-09-22 8:18 ` Arnd Bergmann
@ 2015-09-22 10:53 ` Ley Foon Tan
2015-09-22 11:42 ` Arnd Bergmann
0 siblings, 1 reply; 9+ messages in thread
From: Ley Foon Tan @ 2015-09-22 10:53 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bjorn Helgaas, linux-kernel@vger.kernel.org, Linux-Arch,
linux-pci
On Tue, Sep 22, 2015 at 4:18 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 22 September 2015 15:19:26 Ley Foon Tan wrote:
>> +
>> +config PCI_SYSCALL
>> + def_bool PCI
>
> IIRC, PCI_SYSCALL is deprecated and you should just leave that
> turned off.
>
> In any case, you enable the syscalls here but don't assign a
> system call number, so that is rather pointless. I
You are right. I can remove it if it is deprecated .
>
> I might be missing something though. Bjorn?
>
>> @@ -14,7 +14,7 @@
>> #include <linux/types.h>
>> #include <asm/pgtable-bits.h>
>>
>> -/* PCI is not supported in nios2, set this to 0. */
>> +/* PCI I/O space is not supported, set this to 0. */
>> #define IO_SPACE_LIMIT 0
>>
>> #define readb_relaxed(addr) readb(addr)
>
> It might be useful to enable this, just in case someone connects
> a PCI host bridge that does support I/O space.
>
> Which host bridge do you use? Are you sure there is no I/O space?
> Most of them use a set of translation windows to set up a mapping
> between bus address (memory, config and io space) and physical
> (mmio) space.
I'm using Altera PCIe IP. But, you are right. We should enable this,
because it shouldn't limited to support Altera PCIe only.
BTW, any rule/requirement for the IO_SPACE_LIMIT?
And PCIBIOS_MIN_IO should be non-zero if we enable IO_SPACE_LIMIT?
>
>> diff --git a/arch/nios2/include/asm/pci.h b/arch/nios2/include/asm/pci.h
>> new file mode 100644
>> index 0000000..f2cba05
>> --- /dev/null
>> +++ b/arch/nios2/include/asm/pci.h
>
> What happens if you use the asm-generic header? If there is something
> missing in it, we can try to get it to do the right things.
All the defines in arch/nios2/include/asm/pci.h are required by PCI framework.
It will trigger undefined symbols/define error if without them. Seem
all architectures must provide all these defines.
So, we can consider to add default defines for these in asm-generic.
Regards
Ley Foon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] nios2: Add architectural support for PCIe
2015-09-22 10:53 ` Ley Foon Tan
@ 2015-09-22 11:42 ` Arnd Bergmann
2015-09-29 3:12 ` Ley Foon Tan
0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2015-09-22 11:42 UTC (permalink / raw)
To: Ley Foon Tan
Cc: Bjorn Helgaas, linux-kernel@vger.kernel.org, Linux-Arch,
linux-pci
On Tuesday 22 September 2015 18:53:50 Ley Foon Tan wrote:
> On Tue, Sep 22, 2015 at 4:18 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tuesday 22 September 2015 15:19:26 Ley Foon Tan wrote:
> > I might be missing something though. Bjorn?
> >
> >> @@ -14,7 +14,7 @@
> >> #include <linux/types.h>
> >> #include <asm/pgtable-bits.h>
> >>
> >> -/* PCI is not supported in nios2, set this to 0. */
> >> +/* PCI I/O space is not supported, set this to 0. */
> >> #define IO_SPACE_LIMIT 0
> >>
> >> #define readb_relaxed(addr) readb(addr)
> >
> > It might be useful to enable this, just in case someone connects
> > a PCI host bridge that does support I/O space.
> >
> > Which host bridge do you use? Are you sure there is no I/O space?
> > Most of them use a set of translation windows to set up a mapping
> > between bus address (memory, config and io space) and physical
> > (mmio) space.
>
> I'm using Altera PCIe IP. But, you are right. We should enable this,
> because it shouldn't limited to support Altera PCIe only.
> BTW, any rule/requirement for the IO_SPACE_LIMIT?
If you want to allow just one PCI host bridge, set it to 0xffff, otherwise
use 0xfffff (for up to 16 bridges)
> And PCIBIOS_MIN_IO should be non-zero if we enable IO_SPACE_LIMIT?
If you define pcibios_align_resource() as an empty function, that can
remain zero as well, it's only meant to stay out of the way of ISA
devices.
> >> diff --git a/arch/nios2/include/asm/pci.h b/arch/nios2/include/asm/pci.h
> >> new file mode 100644
> >> index 0000000..f2cba05
> >> --- /dev/null
> >> +++ b/arch/nios2/include/asm/pci.h
> >
> > What happens if you use the asm-generic header? If there is something
> > missing in it, we can try to get it to do the right things.
> All the defines in arch/nios2/include/asm/pci.h are required by PCI framework.
> It will trigger undefined symbols/define error if without them. Seem
> all architectures must provide all these defines.
> So, we can consider to add default defines for these in asm-generic.
I think that would be good, yes. We probably picked defaults for the
asm-generic version that are enough to build with CONFIG_PCI disabled,
but there are useful defaults for the other case as well.
Most architectures that use the file don't support PCI, so you can just
add stuff inside of #ifdef CONFIG_PCI. For the remaining 13 architectures
(git grep -l generic/pci.h | wc), see whether there are conflicts first.
The normal way would be to have the arch specific definition come before
the #include, and then do something like
#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
Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] nios2: Add architectural support for PCIe
2015-09-22 11:42 ` Arnd Bergmann
@ 2015-09-29 3:12 ` Ley Foon Tan
2015-09-29 7:37 ` Arnd Bergmann
0 siblings, 1 reply; 9+ messages in thread
From: Ley Foon Tan @ 2015-09-29 3:12 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bjorn Helgaas, linux-kernel@vger.kernel.org, Linux-Arch,
linux-pci
On Tue, Sep 22, 2015 at 7:42 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 22 September 2015 18:53:50 Ley Foon Tan wrote:
>> On Tue, Sep 22, 2015 at 4:18 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> > On Tuesday 22 September 2015 15:19:26 Ley Foon Tan wrote:
>> > I might be missing something though. Bjorn?
>> >
>> >> @@ -14,7 +14,7 @@
>> >> #include <linux/types.h>
>> >> #include <asm/pgtable-bits.h>
>> >>
>> >> -/* PCI is not supported in nios2, set this to 0. */
>> >> +/* PCI I/O space is not supported, set this to 0. */
>> >> #define IO_SPACE_LIMIT 0
>> >>
>> >> #define readb_relaxed(addr) readb(addr)
>> >
>> > It might be useful to enable this, just in case someone connects
>> > a PCI host bridge that does support I/O space.
>> >
>> > Which host bridge do you use? Are you sure there is no I/O space?
>> > Most of them use a set of translation windows to set up a mapping
>> > between bus address (memory, config and io space) and physical
>> > (mmio) space.
>>
>> I'm using Altera PCIe IP. But, you are right. We should enable this,
>> because it shouldn't limited to support Altera PCIe only.
>> BTW, any rule/requirement for the IO_SPACE_LIMIT?
>
> If you want to allow just one PCI host bridge, set it to 0xffff, otherwise
> use 0xfffff (for up to 16 bridges)
Okay, will set it to 0xffff.
>
>> And PCIBIOS_MIN_IO should be non-zero if we enable IO_SPACE_LIMIT?
>
> If you define pcibios_align_resource() as an empty function, that can
> remain zero as well, it's only meant to stay out of the way of ISA
> devices.
Okay.
>
>> >> diff --git a/arch/nios2/include/asm/pci.h b/arch/nios2/include/asm/pci.h
>> >> new file mode 100644
>> >> index 0000000..f2cba05
>> >> --- /dev/null
>> >> +++ b/arch/nios2/include/asm/pci.h
>> >
>> > What happens if you use the asm-generic header? If there is something
>> > missing in it, we can try to get it to do the right things.
>> All the defines in arch/nios2/include/asm/pci.h are required by PCI framework.
>> It will trigger undefined symbols/define error if without them. Seem
>> all architectures must provide all these defines.
>> So, we can consider to add default defines for these in asm-generic.
>
> I think that would be good, yes. We probably picked defaults for the
> asm-generic version that are enough to build with CONFIG_PCI disabled,
> but there are useful defaults for the other case as well.
>
> Most architectures that use the file don't support PCI, so you can just
> add stuff inside of #ifdef CONFIG_PCI. For the remaining 13 architectures
> (git grep -l generic/pci.h | wc), see whether there are conflicts first.
> The normal way would be to have the arch specific definition come before
> the #include, and then do something like
>
> #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
Okay, will try add them to asm-generic.
Do you prefer to send it as separate patch or can be part of this patchset?
Thanks.
Regards
Ley Foon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] nios2: Add architectural support for PCIe
2015-09-29 3:12 ` Ley Foon Tan
@ 2015-09-29 7:37 ` Arnd Bergmann
2015-09-29 10:00 ` Ley Foon Tan
0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2015-09-29 7:37 UTC (permalink / raw)
To: Ley Foon Tan
Cc: Bjorn Helgaas, linux-kernel@vger.kernel.org, Linux-Arch,
linux-pci
On Tuesday 29 September 2015 11:12:24 Ley Foon Tan wrote:
> >
> > I think that would be good, yes. We probably picked defaults for the
> > asm-generic version that are enough to build with CONFIG_PCI disabled,
> > but there are useful defaults for the other case as well.
> >
> > Most architectures that use the file don't support PCI, so you can just
> > add stuff inside of #ifdef CONFIG_PCI. For the remaining 13 architectures
> > (git grep -l generic/pci.h | wc), see whether there are conflicts first.
> > The normal way would be to have the arch specific definition come before
> > the #include, and then do something like
> >
> > #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
>
> Okay, will try add them to asm-generic.
Thanks
> Do you prefer to send it as separate patch or can be part of this patchset?
I prefer the patches to be part of this series and merged through together
with them.
Arnd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] nios2: Add architectural support for PCIe
2015-09-29 7:37 ` Arnd Bergmann
@ 2015-09-29 10:00 ` Ley Foon Tan
0 siblings, 0 replies; 9+ messages in thread
From: Ley Foon Tan @ 2015-09-29 10:00 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bjorn Helgaas, linux-kernel@vger.kernel.org, Linux-Arch,
linux-pci
On Tue, Sep 29, 2015 at 3:37 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 29 September 2015 11:12:24 Ley Foon Tan wrote:
>> >
>> > I think that would be good, yes. We probably picked defaults for the
>> > asm-generic version that are enough to build with CONFIG_PCI disabled,
>> > but there are useful defaults for the other case as well.
>> >
>> > Most architectures that use the file don't support PCI, so you can just
>> > add stuff inside of #ifdef CONFIG_PCI. For the remaining 13 architectures
>> > (git grep -l generic/pci.h | wc), see whether there are conflicts first.
>> > The normal way would be to have the arch specific definition come before
>> > the #include, and then do something like
>> >
>> > #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
>>
>> Okay, will try add them to asm-generic.
>
> Thanks
>
>> Do you prefer to send it as separate patch or can be part of this patchset?
>
> I prefer the patches to be part of this series and merged through together
> with them.
>
Okay, will send a new version later.
Thanks.
Regards
Ley Foon
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-09-29 10:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22 7:19 [PATCH 0/2] Add PCI support on nios2 architecture Ley Foon Tan
2015-09-22 7:19 ` [PATCH 1/2] nios2: Add architectural support for PCIe Ley Foon Tan
2015-09-22 8:18 ` Arnd Bergmann
2015-09-22 10:53 ` Ley Foon Tan
2015-09-22 11:42 ` Arnd Bergmann
2015-09-29 3:12 ` Ley Foon Tan
2015-09-29 7:37 ` Arnd Bergmann
2015-09-29 10:00 ` Ley Foon Tan
2015-09-22 7:19 ` [PATCH 2/2] PCI: Build setup-irq.o for nios2 Ley Foon Tan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox