Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116021
b: refs/heads/master
c: 4ab1394
h: refs/heads/master
i:
  116019: ad17a8c
v: v3
  • Loading branch information
Alan Cox authored and David Woodhouse committed Sep 27, 2008
1 parent 2310541 commit d955838
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e416de5e61e1a9b7f987804cbb67230b5f5293c6
refs/heads/master: 4ab13943612673ef0822e1a041a9e629ba13a87c
16 changes: 3 additions & 13 deletions trunk/drivers/mtd/maps/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,8 @@ intel_dc21285_init(struct pci_dev *dev, struct map_pci_info *map)
* not enabled, should we be allocating a new resource for it
* or simply enabling it?
*/
if (!(pci_resource_flags(dev, PCI_ROM_RESOURCE) &
IORESOURCE_ROM_ENABLE)) {
u32 val;
pci_resource_flags(dev, PCI_ROM_RESOURCE) |= IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val);
val |= PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(dev, PCI_ROM_ADDRESS, val);
printk("%s: enabling expansion ROM\n", pci_name(dev));
}
pci_enable_rom(dev);
printk("%s: enabling expansion ROM\n", pci_name(dev));
}

if (!len || !base)
Expand Down Expand Up @@ -240,10 +233,7 @@ intel_dc21285_exit(struct pci_dev *dev, struct map_pci_info *map)
/*
* We need to undo the PCI BAR2/PCI ROM BAR address alteration.
*/
pci_resource_flags(dev, PCI_ROM_RESOURCE) &= ~IORESOURCE_ROM_ENABLE;
pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val);
val &= ~PCI_ROM_ADDRESS_ENABLE;
pci_write_config_dword(dev, PCI_ROM_ADDRESS, val);
pci_disable_rom(dev);
}

static unsigned long
Expand Down

0 comments on commit d955838

Please sign in to comment.