Fix warnings for PCI code on ixp
authorWolfgang Denk <wd@pollux.(none)>
Sat, 24 Sep 2005 22:00:45 +0000 (00:00 +0200)
committerWolfgang Denk <wd@pollux.(none)>
Sat, 24 Sep 2005 22:00:45 +0000 (00:00 +0200)
Patch by Joe <lgxue@yahoo.com>, 13 Jan 2005

CHANGELOG
board/ixdp425/ixdp425.c
cpu/ixp/pci.c
drivers/pci_indirect.c

index dd8f47e..e377257 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
 Changes for U-Boot 1.1.4:
 ======================================================================
 
+* Fix warnings for PCI code on ixp
+  Patch by Joe <lgxue@yahoo.com>, 13 Jan 2005
+
 * virtex2 fix for bogus download error messages
   The virtex2 FPGA download code watches for init going active during
   a download of config data as an error condition. init also goes
index 80553ba..c04626a 100644 (file)
@@ -75,6 +75,7 @@ int dram_init (void)
 /**********************************************************/
 
 extern struct pci_controller hose;
+extern void pci_ixp_init(struct pci_controller * hose);
 
 void pci_init_board(void)
 {
index 33c1cff..84c4339 100644 (file)
@@ -68,47 +68,6 @@ PciBar *memBars[IXP425_PCI_MAX_BAR];
 PciBar *ioBars[IXP425_PCI_MAX_BAR];
 PciDevice devices[IXP425_PCI_MAX_FUNC_ON_BUS];
 
-void out_8 (volatile unsigned *addr, char val)
-{
-       *addr = val;
-}
-
-void out_le16 (volatile unsigned *addr, unsigned short val)
-{
-       *addr = cpu_to_le16 (val);
-}
-
-void out_le32 (volatile unsigned *addr, unsigned int val)
-{
-       *addr = cpu_to_le32 (val);
-}
-
-unsigned char in_8 (volatile unsigned *addr)
-{
-       unsigned char val;
-
-       val = *addr;
-       return val;
-}
-
-unsigned short in_le16 (volatile unsigned *addr)
-{
-       unsigned short val;
-
-       val = *addr;
-       val = le16_to_cpu (val);
-       return val;
-}
-
-unsigned in_le32 (volatile unsigned *addr)
-{
-       unsigned int val;
-
-       val = *addr;
-       val = le32_to_cpu (val);
-       return val;
-}
-
 int pci_read_config_dword (pci_dev_t dev, int where, unsigned int *val)
 {
        unsigned int retval;
@@ -556,9 +515,9 @@ void sys_pci_device_bars_write (void)
                pci_write_config_dword (devices[i].device,
                                        PCI_CFG_BASE_ADDRESS_0,
                                        devices[i].bar[0].address);
-               addr = (BIT (31 - devices[i].device) |
+               addr = BIT (31 - devices[i].device) |
                        (0 << PCI_NP_AD_FUNCSL) |
-                       (PCI_CFG_BASE_ADDRESS_0) ) & ~3;
+                       (PCI_CFG_BASE_ADDRESS_0 & ~3);
                pci_write_config_dword (devices[i].device,
                                        PCI_CFG_DEV_INT_LINE, devices[i].irq);
 
index 5987ac4..e8f19f5 100644 (file)
@@ -12,7 +12,7 @@
 #include <common.h>
 
 #ifdef CONFIG_PCI
-#ifndef __I386__
+#if (!defined(__I386__) && !defined(CONFIG_IXDP425))
 
 #include <asm/processor.h>
 #include <asm/io.h>
@@ -118,5 +118,5 @@ void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
        hose->cfg_data = (unsigned char *) cfg_data;
 }
 
-#endif
-#endif
+#endif /* !__I386__ && !CONFIG_IXDP425 */
+#endif /* CONFIG_PCI */