diff options
Diffstat (limited to 'cpu/ixp')
-rw-r--r-- | cpu/ixp/config.mk | 11 | ||||
-rw-r--r-- | cpu/ixp/pci.c | 45 |
2 files changed, 11 insertions, 45 deletions
diff --git a/cpu/ixp/config.mk b/cpu/ixp/config.mk index 667adfc25d..eddda39e0f 100644 --- a/cpu/ixp/config.mk +++ b/cpu/ixp/config.mk @@ -25,6 +25,13 @@ BIG_ENDIAN = y PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \ - -mshort-load-bytes -msoft-float -mbig-endian + -msoft-float -mbig-endian -PLATFORM_CPPFLAGS += -mbig-endian -mapcs-32 -march=armv4 -mtune=strongarm1100 +PLATFORM_CPPFLAGS += -mbig-endian -march=armv4 -mtune=strongarm1100 +# ========================================================================= +# +# Supply options according to compiler version +# +# ========================================================================= +PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) diff --git a/cpu/ixp/pci.c b/cpu/ixp/pci.c index 33c1cfff56..84c4339ee6 100644 --- a/cpu/ixp/pci.c +++ b/cpu/ixp/pci.c @@ -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); |