[U-Boot] [PATCH v3 06/10] MIPS: qemu-malta: add PCI support

Tom Rini trini at ti.com
Thu May 23 17:49:38 CEST 2013


On Thu, May 23, 2013 at 03:55:43PM +0200, Daniel Schwierzeck wrote:

> Hi Tom, Wolfgang,
> 
> we do not have a dedicated PCI custodian so could you comment this
> please? Thanks.
> 
> 2013/5/23 Gabor Juhos <juhosg at openwrt.org>:
> > Hi Daniel,
> >
> > Thank you for the review!
> >
> >> 2013/5/22 Gabor Juhos <juhosg at openwrt.org>:
> >>> Qemu emulates the Galileo GT64120 System Controller
> >>> which provides a CPU bus to PCI bus bridge.
> >>>
> >>> The patch adds driver for this bridge and enables
> >>> PCI support for the emulated Malta board.
> >>>
> >>> Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
> >>> Cc: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>
> >>
> >>
> >> ELDK-5.3 shows some warnings:
> >>
> >> pci_indirect.c: In function 'indirect_read_config_byte':
> >> pci_indirect.c:101:1: warning: implicit declaration of function
> >> 'out_le32' [-Wimplicit-function-declaration]
> >> pci_indirect.c:101:1: warning: implicit declaration of function 'in_8'
> >> [-Wimplicit-function-declaration]
> >> pci_indirect.c: In function 'indirect_read_config_word':
> >> pci_indirect.c:102:1: warning: implicit declaration of function
> >> 'in_le16' [-Wimplicit-function-declaration]
> >> pci_indirect.c: In function 'indirect_read_config_dword':
> >> pci_indirect.c:103:1: warning: implicit declaration of function
> >> 'in_le32' [-Wimplicit-function-declaration]
> >> pci_indirect.c: In function 'indirect_write_config_byte':
> >> pci_indirect.c:109:1: warning: implicit declaration of function
> >> 'out_8' [-Wimplicit-function-declaration]
> >> pci_indirect.c: In function 'indirect_write_config_word':
> >> pci_indirect.c:110:1: warning: implicit declaration of function
> >> 'out_le16' [-Wimplicit-function-declaration]
> >
> > Hm, you are right. My toolchain also shows the warning but I did not notice
> > those because I forgot to redirect stderr when I have generated the build logs.
> >
> > The pci_indirect.c file is always compiled when CONFIG_PCI is defined although
> > it is not needed at all for Malta PCI support.
> >
> > The issue can be resolved on a few different ways:
> >
> > 1. Extend the '#if !defined(__I386__)' directive in pci_indirect.c with a new
> > '&& !defined(__MIPS__)' condition. This would be the simplest solution but the
> > drawback of this is that indirect support will not be usable on any MIPS board.
> >
> > 2. Introduce a new 'CONFIG_PCI_INDIRECT_BRIDGE' option and only compile the
> > pci_indirect.c file if this option is present. Probably this is the best
> > solution however the new symbol should be added into the configuration of the
> > affected boards.
> >
> > 3. Introduce a new 'CONFIG_PCI_NO_INDIRECT_BRIDGE' option and use an '#ifndef
> > CONFIG_PCI_NO_INDIRECT_BRIDGE' directive in pci_indirect.c.
> >
> > I'm unsure about which approach is preferred.
> >
> 
> I favor the second option.

A quick check around in the kernel says that microblaze and powerpc have
similar type code and keep it under arch/ rather than drivers, but I'm
good with option #2.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130523/0e2f88b5/attachment.pgp>


More information about the U-Boot mailing list