* [PATCH for master 0/2] MIPS and PCI-related fixes
@ 2018-09-12 21:00 Antony Pavlov
2018-09-12 21:00 ` [PATCH for master 1/2] MIPS: fix PCI quirk infrastructure build Antony Pavlov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Antony Pavlov @ 2018-09-12 21:00 UTC (permalink / raw)
To: barebox, Sascha Hauer
Antony Pavlov (2):
MIPS: fix PCI quirk infrastructure build
pci_of_match_device: don't crash on MIPS Malta
arch/mips/lib/barebox.lds.S | 11 +++++++++++
drivers/pci/pci.c | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
--
2.18.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH for master 1/2] MIPS: fix PCI quirk infrastructure build
2018-09-12 21:00 [PATCH for master 0/2] MIPS and PCI-related fixes Antony Pavlov
@ 2018-09-12 21:00 ` Antony Pavlov
2018-09-12 21:00 ` [PATCH for master 2/2] pci_of_match_device: don't crash on MIPS Malta Antony Pavlov
2018-09-17 7:32 ` [PATCH for master 0/2] MIPS and PCI-related fixes Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Antony Pavlov @ 2018-09-12 21:00 UTC (permalink / raw)
To: barebox, Sascha Hauer
The commit fc2c618c2038 ("pci: add quirk infrastructure")
adds necessary ld-script changes only for ARM architecture.
As a result, qemu-malta build fails:
LD barebox
drivers/built-in.o: In function `pci_fixup_device':
(.text.pci_fixup_device+0x30): undefined reference to `__end_pci_fixups_enable'
(.text.pci_fixup_device+0x38): undefined reference to `__end_pci_fixups_enable'
(.text.pci_fixup_device+0x34): undefined reference to `__start_pci_fixups_enable'
(.text.pci_fixup_device+0x3c): undefined reference to `__start_pci_fixups_enable'
(.text.pci_fixup_device+0x70): undefined reference to `__end_pci_fixups_header'
(.text.pci_fixup_device+0x78): undefined reference to `__end_pci_fixups_header'
(.text.pci_fixup_device+0x74): undefined reference to `__start_pci_fixups_header'
(.text.pci_fixup_device+0x80): undefined reference to `__start_pci_fixups_header'
(.text.pci_fixup_device+0x2c): undefined reference to `__end_pci_fixups_early'
(.text.pci_fixup_device+0x88): undefined reference to `__end_pci_fixups_early'
(.text.pci_fixup_device+0x84): undefined reference to `__start_pci_fixups_early'
(.text.pci_fixup_device+0x90): undefined reference to `__start_pci_fixups_early'
make: *** [Makefile:767: barebox] Error 1
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/mips/lib/barebox.lds.S | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S
index 660d4be85e..c4026bb7f1 100644
--- a/arch/mips/lib/barebox.lds.S
+++ b/arch/mips/lib/barebox.lds.S
@@ -75,6 +75,17 @@ SECTIONS
__usymtab : { BAREBOX_SYMS }
__usymtab_end = .;
+#ifdef CONFIG_PCI
+ __start_pci_fixups_early = .;
+ .pci_fixup_early : { KEEP(*(.pci_fixup_early)) }
+ __end_pci_fixups_early = .;
+ __start_pci_fixups_header = .;
+ .pci_fixup_header : { KEEP(*(.pci_fixup_header)) }
+ __end_pci_fixups_header = .;
+ __start_pci_fixups_enable = .;
+ .pci_fixup_enable : { KEEP(*(.pci_fixup_enable)) }
+ __end_pci_fixups_enable = .;
+#endif
.oftables : { BAREBOX_CLK_TABLE() }
.dtb : { BAREBOX_DTB() }
--
2.18.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH for master 2/2] pci_of_match_device: don't crash on MIPS Malta
2018-09-12 21:00 [PATCH for master 0/2] MIPS and PCI-related fixes Antony Pavlov
2018-09-12 21:00 ` [PATCH for master 1/2] MIPS: fix PCI quirk infrastructure build Antony Pavlov
@ 2018-09-12 21:00 ` Antony Pavlov
2018-09-17 7:32 ` [PATCH for master 0/2] MIPS and PCI-related fixes Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Antony Pavlov @ 2018-09-12 21:00 UTC (permalink / raw)
To: barebox, Sascha Hauer
In arch/mips/mach-malta/pci.c PCI controller is instantiated
without dt and struct pci_controller parent field is NULL.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
drivers/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d206c53848..7abc7a3439 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -339,7 +339,7 @@ pci_of_match_device(struct device_d *parent, unsigned int devfn)
struct device_node *np;
u32 reg;
- if (!IS_ENABLED(CONFIG_OFTREE) || !parent->device_node)
+ if (!IS_ENABLED(CONFIG_OFTREE) || !parent || !parent->device_node)
return NULL;
for_each_child_of_node(parent->device_node, np) {
--
2.18.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH for master 0/2] MIPS and PCI-related fixes
2018-09-12 21:00 [PATCH for master 0/2] MIPS and PCI-related fixes Antony Pavlov
2018-09-12 21:00 ` [PATCH for master 1/2] MIPS: fix PCI quirk infrastructure build Antony Pavlov
2018-09-12 21:00 ` [PATCH for master 2/2] pci_of_match_device: don't crash on MIPS Malta Antony Pavlov
@ 2018-09-17 7:32 ` Sascha Hauer
2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2018-09-17 7:32 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Thu, Sep 13, 2018 at 12:00:04AM +0300, Antony Pavlov wrote:
> Antony Pavlov (2):
> MIPS: fix PCI quirk infrastructure build
> pci_of_match_device: don't crash on MIPS Malta
>
> arch/mips/lib/barebox.lds.S | 11 +++++++++++
> drivers/pci/pci.c | 2 +-
> 2 files changed, 12 insertions(+), 1 deletion(-)
Applied, thanks
Sascha
>
> --
> 2.18.0
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-17 7:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12 21:00 [PATCH for master 0/2] MIPS and PCI-related fixes Antony Pavlov
2018-09-12 21:00 ` [PATCH for master 1/2] MIPS: fix PCI quirk infrastructure build Antony Pavlov
2018-09-12 21:00 ` [PATCH for master 2/2] pci_of_match_device: don't crash on MIPS Malta Antony Pavlov
2018-09-17 7:32 ` [PATCH for master 0/2] MIPS and PCI-related fixes Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox