Re: [U-Boot-Users] pci_hose_read_config_byte() definition puzzles

Wolfgang Denk wd@denx.de wrote:
./include/pci.h:extern int
pci_hose_read_config_byte(struct pci_controller *hose,
This looks very much like a prototype definition to me.
OK. It defines perfectly BUT where is the function pci_hose_read_config_byte() body? Only declaration is not enought to use it......
Thanks,
Sam
_________________________________________________________ Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/ 美女明星应有尽有,搜遍美图、艳图和酷图 http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com 1G就是1000兆,雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1...

In message 20050601073659.45311.qmail@web15910.mail.cnb.yahoo.com you wrote:
OK. It defines perfectly BUT where is the function pci_hose_read_config_byte() body? Only declaration is not enought to use it......
The code is where it is to be expected - in "drivers/pci.c":
#define PCI_HOSE_OP(rw, size, type) \ int pci_hose_##rw##_config_##size(struct pci_controller *hose, \ pci_dev_t dev, \ int offset, type value) \ { \ return hose->rw##_##size(hose, dev, offset, value); \ }
PCI_HOSE_OP(read, byte, u8 *) PCI_HOSE_OP(read, word, u16 *) PCI_HOSE_OP(read, dword, u32 *) PCI_HOSE_OP(write, byte, u8) PCI_HOSE_OP(write, word, u16) PCI_HOSE_OP(write, dword, u32)
Sometimes even "grep" cannot save you from actually RTFS ;-)
Best regards,
Wolfgang Denk
participants (2)
-
Sam Song
-
Wolfgang Denk