Bug 9425 - drivers/video/console/sticore.c needs to be updated to use PCI ROM API
Summary: drivers/video/console/sticore.c needs to be updated to use PCI ROM API
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Console/Framebuffers (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: James Simmons
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-20 14:33 UTC by Jon Smirl
Modified: 2008-06-05 15:10 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.24-rc3
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.