Bug 9425

Summary: drivers/video/console/sticore.c needs to be updated to use PCI ROM API
Product: Drivers Reporter: Jon Smirl (jonsmirl)
Component: Console/FramebuffersAssignee: James Simmons (jsimmons)
Status: RESOLVED CODE_FIX    
Severity: normal CC: adaplas, deller, protasnb
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24-rc3 Subsystem:
Regression: --- Bisected commit-id:

Description Jon Smirl 2007-11-20 14:33:38 UTC
This code needs to be updated to use the PCI ROM API

        rom_base = pci_resource_start(pd, PCI_ROM_RESOURCE);
        rom_len = pci_resource_len(pd, PCI_ROM_RESOURCE);
        if (rom_base) {
                pci_write_config_dword(pd, PCI_ROM_ADDRESS, rom_base | PCI_ROM_ADDRESS_ENABLE);
                DPRINTK((KERN_DEBUG "STI PCI ROM enabled at 0x%08lx\n", rom_base));
        }

        printk(KERN_INFO "STI PCI graphic ROM found at %08lx (%u kB), fb at %08lx (%u MB)\n",
                rom_base, rom_len/1024, fb_base, fb_len/1024/1024);

        DPRINTK((KERN_DEBUG "Trying PCI STI ROM at %08lx, PCI hpa at %08lx\n",
                    rom_base, fb_base));

        sti = sti_try_rom_generic(rom_base, fb_base, pd);

----------------

        /* disable STI PCI ROM. ROM and card RAM overlap and
         * leaving it enabled would force HPMCs
         */
        if (sti->pd) {
                unsigned long rom_base;
                rom_base = pci_resource_start(sti->pd, PCI_ROM_RESOURCE);
                pci_write_config_dword(sti->pd, PCI_ROM_ADDRESS, rom_base & ~PCI_ROM_ADDRESS_ENABLE);
                DPRINTK((KERN_DEBUG "STI PCI ROM disabled\n"));
Comment 1 Natalie Protasevich 2008-02-18 23:04:06 UTC
Jon, I encourage you to create a patch and submit to LKML.
Thanks.
Comment 2 Andrew Morton 2008-06-05 15:10:34 UTC
Merged fbdev-convert-sticorec-to-pci-rom-api.patch into -mm, closing.