Skip to contentSkip to conversation

a u-boot patch for ixp pci

U-Boot-Users Wolfgang Denk 1 participant 1 message Jan 12, 2005 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hello,

Quoted 3 lines · in message <[email protected]> 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

Signature · 4 lines
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_