[U-Boot-Users] Re: a u-boot patch for ixp pci
Wolfgang Denk
wd at denx.de
Wed Jan 12 01:04:01 CET 2005
Hello,
in message <20040901091133.75536.qmail at web41101.mail.yahoo.com> you wrote:
>
> Hi, we add a new feature for ixp25 , add PCI support
> for ixp425 ,
There is a problem with your patch. As is, it generates a couple of
warnings like these:
-> MAKEALL ixdp425
Configuring for ixdp425 board...
pci_indirect.c: In function `indirect_read_config_byte':
pci_indirect.c:85: warning: implicit declaration of function `out_le32'
pci_indirect.c:85: warning: implicit declaration of function `in_8'
pci_indirect.c: In function `indirect_read_config_word':
pci_indirect.c:86: warning: implicit declaration of function `in_le16'
pci_indirect.c: In function `indirect_read_config_dword':
pci_indirect.c:87: warning: implicit declaration of function `in_le32'
pci_indirect.c: In function `indirect_write_config_byte':
pci_indirect.c:93: warning: implicit declaration of function `out_8'
pci_indirect.c: In function `indirect_write_config_word':
pci_indirect.c:94: warning: implicit declaration of function `out_le16'
If I copy the prototypes of your implementation from cpu/ixp/pci.c I
get different warnings:
-> MAKEALL ixdp425
Configuring for ixdp425 board...
pci_indirect.c: In function `indirect_read_config_byte':
pci_indirect.c:94: warning: passing arg 1 of `in_8' from incompatible pointer type
pci_indirect.c: In function `indirect_read_config_word':
pci_indirect.c:95: warning: passing arg 1 of `in_le16' from incompatible pointer type
pci_indirect.c: In function `indirect_write_config_byte':
pci_indirect.c:102: warning: passing arg 1 of `out_8' from incompatible pointer type
pci_indirect.c: In function `indirect_write_config_word':
pci_indirect.c:103: warning: passing arg 1 of `out_le16' from incompatible pointer type
Checking your code in cpu/ixp/pci.c I see:
void out_8 (volatile unsigned *addr, char val)
...
*addr = val;
...
void out_le16 (volatile unsigned *addr, unsigned short val)
...
*addr = cpu_to_le16 (val);
etc.
Are you sure that all these "addr" pointers are really pointers to 32
bit objects?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Things that try to look like things often do look more like things
than things. Well-known fact. - Terry Pratchett, _Wyrd Sisters_
More information about the U-Boot
mailing list