[U-Boot] [PATCH 2/2] vexpress64: Juno: Add initialisation code for Juno R1 PCIe host bridge.
Liviu Dudau
liviu.dudau at foss.arm.com
Thu Oct 15 18:46:59 CEST 2015
On Thu, 15 Oct 2015 16:42:19 +0200
Linus Walleij <linus.walleij at linaro.org> wrote:
> On Fri, Oct 9, 2015 at 3:09 PM, Liviu Dudau <Liviu.Dudau at foss.arm.com> wrote:
>
> > Juno R1 has an XpressRICH3 PCIe host bridge that needs to be initialised
> > in order for the Linux kernel to be able to enumerate the bus. Add
> > support code here that enables the host bridge, trains the links and
> > sets up the Address Translation Tables.
> >
> > Signed-off-by: Liviu Dudau <Liviu.Dudau at foss.arm.com>
>
> Very nice! Now we (soon) have PCIe on the Juno.
>
> Did you:
>
> - Test with compiling in e.g. network cards and booting off of
> ethernet on PCIe?
>
> - Test what happens with a simple VGA card on PCIe?
> Sometimes the VGA card BIOS need to be initialized using
> an emulator running the x86 ROM and I never got that working
> on anything ARM :( (Maybe PCIe doesn't suffer from this? Just
> vanilla PCI has this problem? What do I know.)
Hi Linus,
Please note that this patchset does not enable enough functionality in
U-Boot to allow for PCIe testing.
However, together with my Linux patchset series[1] I have tested U-Boot
plus mainline Linux v4.3-rc5 on Juno r1 with 3x USB-to-PCIe cards and
a Radeon HD6400 card. I have even got framebuffer out of the Radeon
card :)
>
> > +#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
> > +void xr3pci_set_atr_entry(unsigned long base, unsigned long src_addr,
> > + unsigned long trsl_addr, int window_size,
> > + int trsl_param)
> > +{
> (...)
> > int board_init(void)
> > {
> > +#ifdef CONFIG_TARGET_VEXPRESS64_JUNO
> (...)
> > +#endif
> > return 0;
> > }
>
> > +++ b/board/armltd/vexpress64/vexpress64.h
> > @@ -0,0 +1,60 @@
> > +#ifndef __VEXPRESS64_H__
> > +#define __VEXPRESS64_H__
>
> Instead of peppering with #ifdefs I suggest you do like this:
>
> - Create two new files named
> board/armltd/vexpress64/pcie.c
> board/armltd/vexpress64/pcie.h
>
> - Move all the #defines from the vexpress64.h file into
> the top of the pcie.c file.
>
> - Use the pcie.h file for prototypes + stubs like this:
>
> #ifdef CONFIG_TARGET_VEXPRESS64_JUNO
> void vexpress64_pcie_init(void);
> #else
> static inline void vexpress64_pcie_init(void)
> {
> }
> #endif
>
> Then board_init() can unconditionallt call these functions and
> they will be stubbed out if compiled for anything else than Juno.
>
> Yours,
> Linus Walleij
OK, I will do that. I'm waiting on some feedback from Ryan Harkin that
wanted to test the patchset with some Linaro kernels and I will post
a v2.
Best regards,
Liviu
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
More information about the U-Boot
mailing list