7 #include <linux/module.h>
9 #include <linux/kernel.h>
15 #define PIIXE_IOBASE_RESOURCE 11
17 #define WINDOW_ADDR 0xfff00000
18 #define WINDOW_SIZE 0x00100000
23 #define TRIBUF_PORT (IOBASE+0x37)
24 #define VPP_PORT (IOBASE+0x28)
31 static int l440gx_vpp_refcnt;
38 if (++l440gx_vpp_refcnt == 1)
41 if (--l440gx_vpp_refcnt == 0)
44 spin_unlock_irqrestore(&l440gx_vpp_lock, flags);
47 static struct map_info l440gx_map = {
48 .name =
"L440GX BIOS",
56 .set_vpp = l440gx_set_vpp
60 static int __init init_l440gx(
void)
74 if (!dev || !pm_dev) {
75 printk(
KERN_NOTICE "L440GX flash mapping: failed to find PIIX4 ISA bridge, cannot continue\n");
82 if (!l440gx_map.
virt) {
97 pm_iobase->
name =
"pm iobase";
103 pci_read_config_dword(pm_dev, 0x40, &
iobase);
121 pci_write_config_dword(pm_dev, 0x40,
iobase | 1);
125 pci_read_config_word(dev, 0x4e, &word);
127 pci_write_config_word(dev, 0x4e, word);
130 l440gx_set_vpp(&l440gx_map, 1);
153 static void __exit cleanup_l440gx(
void)