From 498b8db7f5ba6c4793cc2d235c7274408d0a63db Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 18 Apr 2004 22:26:17 +0000 Subject: * Patch by Matthew S. McClintock, 14 Apr 2004: fix initdram function for utx8245 board * Patch by Markus Pietrek, 14 Apr 2004: use ATAG_INITRD2 instead of deprecated ATAG_INITRD tag * Patch by Reinhard Meyer, 18 Apr 2004: provide the IDE Reset Function for EMK 5200 boards * Patch by Masami Komiya, 12 Apr 2004: fix pci_hose_write_config_{byte,word}_via_dword problems --- drivers/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/pci.c') diff --git a/drivers/pci.c b/drivers/pci.c index 5a9dae4..b9dcc5b 100644 --- a/drivers/pci.c +++ b/drivers/pci.c @@ -103,14 +103,14 @@ int pci_hose_write_config_##size##_via_dword(struct pci_controller *hose,\ pci_dev_t dev, \ int offset, type val) \ { \ - u32 val32, mask, ldata; \ + u32 val32, mask, ldata, shift; \ \ if (pci_hose_read_config_dword(hose, dev, offset & 0xfc, &val32) < 0)\ return -1; \ \ - mask = val_mask; \ - ldata = (((unsigned long)val) & mask) << ((offset & (int)off_mask) * 8);\ - mask <<= ((mask & (int)off_mask) * 8); \ + shift = ((offset & (int)off_mask) * 8); \ + ldata = (((unsigned long)val) & val_mask) << shift; \ + mask = val_mask << shift; \ val32 = (val32 & ~mask) | ldata; \ \ if (pci_hose_write_config_dword(hose, dev, offset & 0xfc, val32) < 0)\ -- cgit v1.1