diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:22 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:37:44 +1000 |
commit | 3429f5fd3a2e989f7c93e86ab7c6d8381162c011 (patch) | |
tree | 34d2efffe236abd159a506eaa54058b8af8de3ce /drm/nouveau/include/nvkm | |
parent | 946ff8bc3f584c85b28f269c58918b7c3ae5425b (diff) | |
download | nouveau-3429f5fd3a2e989f7c93e86ab7c6d8381162c011.tar.gz |
mc: move device irq handling to platform-specific code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drm/nouveau/include/nvkm')
-rw-r--r-- | drm/nouveau/include/nvkm/core/device.h | 4 | ||||
-rw-r--r-- | drm/nouveau/include/nvkm/core/tegra.h | 1 | ||||
-rw-r--r-- | drm/nouveau/include/nvkm/subdev/mc.h | 9 | ||||
-rw-r--r-- | drm/nouveau/include/nvkm/subdev/pci.h | 4 |
4 files changed, 6 insertions, 12 deletions
diff --git a/drm/nouveau/include/nvkm/core/device.h b/drm/nouveau/include/nvkm/core/device.h index bc151c64b..b4974505a 100644 --- a/drm/nouveau/include/nvkm/core/device.h +++ b/drm/nouveau/include/nvkm/core/device.h @@ -146,6 +146,7 @@ struct nvkm_device_func { struct nvkm_device_tegra *(*tegra)(struct nvkm_device *); void *(*dtor)(struct nvkm_device *); int (*preinit)(struct nvkm_device *); + int (*init)(struct nvkm_device *); void (*fini)(struct nvkm_device *, bool suspend); }; @@ -247,9 +248,6 @@ nv_device_resource_start(struct nvkm_device *device, unsigned int bar); resource_size_t nv_device_resource_len(struct nvkm_device *device, unsigned int bar); -int -nv_device_get_irq(struct nvkm_device *device, bool stall); - struct platform_device; enum nv_bus_type { diff --git a/drm/nouveau/include/nvkm/core/tegra.h b/drm/nouveau/include/nvkm/core/tegra.h index 162986e7f..1755c2d30 100644 --- a/drm/nouveau/include/nvkm/core/tegra.h +++ b/drm/nouveau/include/nvkm/core/tegra.h @@ -5,6 +5,7 @@ struct nvkm_device_tegra { struct nvkm_device device; struct platform_device *pdev; + int irq; }; int nvkm_device_tegra_new(struct platform_device *, diff --git a/drm/nouveau/include/nvkm/subdev/mc.h b/drm/nouveau/include/nvkm/subdev/mc.h index 1fbbdaad7..4de05e718 100644 --- a/drm/nouveau/include/nvkm/subdev/mc.h +++ b/drm/nouveau/include/nvkm/subdev/mc.h @@ -5,24 +5,17 @@ struct nvkm_mc { const struct nvkm_mc_func *func; struct nvkm_subdev subdev; - - unsigned int irq; - bool use_msi; }; +void nvkm_mc_intr(struct nvkm_mc *, bool *handled); void nvkm_mc_intr_unarm(struct nvkm_mc *); void nvkm_mc_intr_rearm(struct nvkm_mc *); -u32 nvkm_mc_intr_mask(struct nvkm_mc *); void nvkm_mc_unk260(struct nvkm_mc *, u32 data); int nv04_mc_new(struct nvkm_device *, int, struct nvkm_mc **); -int nv40_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int nv44_mc_new(struct nvkm_device *, int, struct nvkm_mc **); -int nv4c_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int nv50_mc_new(struct nvkm_device *, int, struct nvkm_mc **); -int g94_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int g98_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int gf100_mc_new(struct nvkm_device *, int, struct nvkm_mc **); -int gf106_mc_new(struct nvkm_device *, int, struct nvkm_mc **); int gk20a_mc_new(struct nvkm_device *, int, struct nvkm_mc **); #endif diff --git a/drm/nouveau/include/nvkm/subdev/pci.h b/drm/nouveau/include/nvkm/subdev/pci.h index ea4b0cce6..ac14fdf2f 100644 --- a/drm/nouveau/include/nvkm/subdev/pci.h +++ b/drm/nouveau/include/nvkm/subdev/pci.h @@ -5,13 +5,15 @@ struct nvkm_pci { const struct nvkm_pci_func *func; struct nvkm_subdev subdev; + struct pci_dev *pdev; + int irq; + bool msi; }; u32 nvkm_pci_rd32(struct nvkm_pci *, u16 addr); void nvkm_pci_wr08(struct nvkm_pci *, u16 addr, u8 data); void nvkm_pci_wr32(struct nvkm_pci *, u16 addr, u32 data); void nvkm_pci_rom_shadow(struct nvkm_pci *, bool shadow); -void nvkm_pci_msi_rearm(struct nvkm_pci *); int nv04_pci_new(struct nvkm_device *, int, struct nvkm_pci **); int nv40_pci_new(struct nvkm_device *, int, struct nvkm_pci **); |