summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c
index be116f3..ffa4b39 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c
@@ -22,6 +22,8 @@
*/
#include "priv.h"
+#include <subdev/pci.h>
+
static u32
prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios)
{
@@ -39,23 +41,16 @@ static void
prom_fini(void *data)
{
struct nvkm_device *device = data;
- if (device->card_type < NV_50)
- nvkm_mask(device, 0x001850, 0x00000001, 0x00000001);
- else
- nvkm_mask(device, 0x088050, 0x00000001, 0x00000001);
+ nvkm_pci_rom_shadow(device->pci, true);
}
static void *
prom_init(struct nvkm_bios *bios, const char *name)
{
struct nvkm_device *device = bios->subdev.device;
- if (device->card_type < NV_50) {
- if (device->card_type == NV_40 && device->chipset >= 0x4c)
- return ERR_PTR(-ENODEV);
- nvkm_mask(device, 0x001850, 0x00000001, 0x00000000);
- } else {
- nvkm_mask(device, 0x088050, 0x00000001, 0x00000000);
- }
+ if (device->card_type == NV_40 && device->chipset >= 0x4c)
+ return ERR_PTR(-ENODEV);
+ nvkm_pci_rom_shadow(device->pci, false);
return device;
}
OpenPOWER on IntegriCloud