diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-09-23 12:25:10 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-09-26 21:00:12 -0400 |
commit | 4ab13943612673ef0822e1a041a9e629ba13a87c (patch) | |
tree | cdb5838852edf12ab70873c80752d11f5c9ba33e /drivers/mtd/maps | |
parent | e416de5e61e1a9b7f987804cbb67230b5f5293c6 (diff) |
[MTD] [NOR] intel_dc21285 switch to ROM API
Now that the needed helpers are exported, it becomes a nice simple
switch over. Closes #9420
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r-- | drivers/mtd/maps/pci.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c index 5c6a25c90380..d978c2e28b1d 100644 --- a/drivers/mtd/maps/pci.c +++ b/drivers/mtd/maps/pci.c | |||
@@ -203,15 +203,8 @@ intel_dc21285_init(struct pci_dev *dev, struct map_pci_info *map) | |||
203 | * not enabled, should we be allocating a new resource for it | 203 | * not enabled, should we be allocating a new resource for it |
204 | * or simply enabling it? | 204 | * or simply enabling it? |
205 | */ | 205 | */ |
206 | if (!(pci_resource_flags(dev, PCI_ROM_RESOURCE) & | 206 | pci_enable_rom(dev); |
207 | IORESOURCE_ROM_ENABLE)) { | 207 | printk("%s: enabling expansion ROM\n", pci_name(dev)); |
208 | u32 val; | ||
209 | pci_resource_flags(dev, PCI_ROM_RESOURCE) |= IORESOURCE_ROM_ENABLE; | ||
210 | pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val); | ||
211 | val |= PCI_ROM_ADDRESS_ENABLE; | ||
212 | pci_write_config_dword(dev, PCI_ROM_ADDRESS, val); | ||
213 | printk("%s: enabling expansion ROM\n", pci_name(dev)); | ||
214 | } | ||
215 | } | 208 | } |
216 | 209 | ||
217 | if (!len || !base) | 210 | if (!len || !base) |
@@ -240,10 +233,7 @@ intel_dc21285_exit(struct pci_dev *dev, struct map_pci_info *map) | |||
240 | /* | 233 | /* |
241 | * We need to undo the PCI BAR2/PCI ROM BAR address alteration. | 234 | * We need to undo the PCI BAR2/PCI ROM BAR address alteration. |
242 | */ | 235 | */ |
243 | pci_resource_flags(dev, PCI_ROM_RESOURCE) &= ~IORESOURCE_ROM_ENABLE; | 236 | pci_disable_rom(dev); |
244 | pci_read_config_dword(dev, PCI_ROM_ADDRESS, &val); | ||
245 | val &= ~PCI_ROM_ADDRESS_ENABLE; | ||
246 | pci_write_config_dword(dev, PCI_ROM_ADDRESS, val); | ||
247 | } | 237 | } |
248 | 238 | ||
249 | static unsigned long | 239 | static unsigned long |