diff options
Diffstat (limited to 'drivers/video/sis/sis_main.c')
-rw-r--r-- | drivers/video/sis/sis_main.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index 3dde12b0ab06..7e3370f115b6 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
@@ -60,6 +60,11 @@ | |||
60 | #include "sis.h" | 60 | #include "sis.h" |
61 | #include "sis_main.h" | 61 | #include "sis_main.h" |
62 | 62 | ||
63 | #if !defined(CONFIG_FB_SIS_300) && !defined(CONFIG_FB_SIS_315) | ||
64 | #warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is set | ||
65 | #warning sisfb will not work! | ||
66 | #endif | ||
67 | |||
63 | static void sisfb_handle_command(struct sis_video_info *ivideo, | 68 | static void sisfb_handle_command(struct sis_video_info *ivideo, |
64 | struct sisfb_cmd *sisfb_command); | 69 | struct sisfb_cmd *sisfb_command); |
65 | 70 | ||
@@ -4114,14 +4119,6 @@ sisfb_find_rom(struct pci_dev *pdev) | |||
4114 | if(sisfb_check_rom(rom_base, ivideo)) { | 4119 | if(sisfb_check_rom(rom_base, ivideo)) { |
4115 | 4120 | ||
4116 | if((myrombase = vmalloc(65536))) { | 4121 | if((myrombase = vmalloc(65536))) { |
4117 | |||
4118 | /* Work around bug in pci/rom.c: Folks forgot to check | ||
4119 | * whether the size retrieved from the BIOS image eventually | ||
4120 | * is larger than the mapped size | ||
4121 | */ | ||
4122 | if(pci_resource_len(pdev, PCI_ROM_RESOURCE) < romsize) | ||
4123 | romsize = pci_resource_len(pdev, PCI_ROM_RESOURCE); | ||
4124 | |||
4125 | memcpy_fromio(myrombase, rom_base, | 4122 | memcpy_fromio(myrombase, rom_base, |
4126 | (romsize > 65536) ? 65536 : romsize); | 4123 | (romsize > 65536) ? 65536 : romsize); |
4127 | } | 4124 | } |
@@ -4155,23 +4152,6 @@ sisfb_find_rom(struct pci_dev *pdev) | |||
4155 | 4152 | ||
4156 | } | 4153 | } |
4157 | 4154 | ||
4158 | #else | ||
4159 | |||
4160 | pci_read_config_dword(pdev, PCI_ROM_ADDRESS, &temp); | ||
4161 | pci_write_config_dword(pdev, PCI_ROM_ADDRESS, | ||
4162 | (ivideo->video_base & PCI_ROM_ADDRESS_MASK) | PCI_ROM_ADDRESS_ENABLE); | ||
4163 | |||
4164 | rom_base = ioremap(ivideo->video_base, 65536); | ||
4165 | if(rom_base) { | ||
4166 | if(sisfb_check_rom(rom_base, ivideo)) { | ||
4167 | if((myrombase = vmalloc(65536))) | ||
4168 | memcpy_fromio(myrombase, rom_base, 65536); | ||
4169 | } | ||
4170 | iounmap(rom_base); | ||
4171 | } | ||
4172 | |||
4173 | pci_write_config_dword(pdev, PCI_ROM_ADDRESS, temp); | ||
4174 | |||
4175 | #endif | 4155 | #endif |
4176 | 4156 | ||
4177 | return myrombase; | 4157 | return myrombase; |