drm/nouveau/core: split device index enum out on its own
authorBen Skeggs <bskeggs@redhat.com>
Wed, 14 Jan 2015 06:58:51 +0000 (16:58 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 22 Jan 2015 02:17:48 +0000 (12:17 +1000)
To avoid having to include core/device.h where it's not otherwise
required.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/devidx.h [new file with mode: 0644]
drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h

index 2b90ec9..23d71c5 100644 (file)
@@ -6,66 +6,6 @@
 #include <core/engine.h>
 #include <core/event.h>
 
-enum nv_subdev_type {
-       NVDEV_ENGINE_DEVICE,
-       NVDEV_SUBDEV_VBIOS,
-
-       /* All subdevs from DEVINIT to DEVINIT_LAST will be created before
-        * *any* of them are initialised.  This subdev category is used
-        * for any subdevs that the VBIOS init table parsing may call out
-        * to during POST.
-        */
-       NVDEV_SUBDEV_DEVINIT,
-       NVDEV_SUBDEV_IBUS,
-       NVDEV_SUBDEV_GPIO,
-       NVDEV_SUBDEV_I2C,
-       NVDEV_SUBDEV_DEVINIT_LAST = NVDEV_SUBDEV_I2C,
-
-       /* This grouping of subdevs are initialised right after they've
-        * been created, and are allowed to assume any subdevs in the
-        * list above them exist and have been initialised.
-        */
-       NVDEV_SUBDEV_FUSE,
-       NVDEV_SUBDEV_MXM,
-       NVDEV_SUBDEV_MC,
-       NVDEV_SUBDEV_BUS,
-       NVDEV_SUBDEV_TIMER,
-       NVDEV_SUBDEV_FB,
-       NVDEV_SUBDEV_LTC,
-       NVDEV_SUBDEV_INSTMEM,
-       NVDEV_SUBDEV_MMU,
-       NVDEV_SUBDEV_BAR,
-       NVDEV_SUBDEV_PMU,
-       NVDEV_SUBDEV_VOLT,
-       NVDEV_SUBDEV_THERM,
-       NVDEV_SUBDEV_CLK,
-
-       NVDEV_ENGINE_FIRST,
-       NVDEV_ENGINE_DMAOBJ = NVDEV_ENGINE_FIRST,
-       NVDEV_ENGINE_IFB,
-       NVDEV_ENGINE_FIFO,
-       NVDEV_ENGINE_SW,
-       NVDEV_ENGINE_GR,
-       NVDEV_ENGINE_MPEG,
-       NVDEV_ENGINE_ME,
-       NVDEV_ENGINE_VP,
-       NVDEV_ENGINE_CIPHER,
-       NVDEV_ENGINE_BSP,
-       NVDEV_ENGINE_MSPPP,
-       NVDEV_ENGINE_CE0,
-       NVDEV_ENGINE_CE1,
-       NVDEV_ENGINE_CE2,
-       NVDEV_ENGINE_VIC,
-       NVDEV_ENGINE_MSENC,
-       NVDEV_ENGINE_DISP,
-       NVDEV_ENGINE_PM,
-       NVDEV_ENGINE_MSVLD,
-       NVDEV_ENGINE_SEC,
-       NVDEV_ENGINE_MSPDEC,
-
-       NVDEV_SUBDEV_NR,
-};
-
 struct nouveau_device {
        struct nouveau_engine engine;
        struct list_head head;
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/devidx.h b/drivers/gpu/drm/nouveau/include/nvkm/core/devidx.h
new file mode 100644 (file)
index 0000000..60c5888
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef __NVKM_DEVIDX_H__
+#define __NVKM_DEVIDX_H__
+enum nvkm_devidx {
+       NVDEV_ENGINE_DEVICE,
+       NVDEV_SUBDEV_VBIOS,
+
+       /* All subdevs from DEVINIT to DEVINIT_LAST will be created before
+        * *any* of them are initialised.  This subdev category is used
+        * for any subdevs that the VBIOS init table parsing may call out
+        * to during POST.
+        */
+       NVDEV_SUBDEV_DEVINIT,
+       NVDEV_SUBDEV_IBUS,
+       NVDEV_SUBDEV_GPIO,
+       NVDEV_SUBDEV_I2C,
+       NVDEV_SUBDEV_DEVINIT_LAST = NVDEV_SUBDEV_I2C,
+
+       /* This grouping of subdevs are initialised right after they've
+        * been created, and are allowed to assume any subdevs in the
+        * list above them exist and have been initialised.
+        */
+       NVDEV_SUBDEV_FUSE,
+       NVDEV_SUBDEV_MXM,
+       NVDEV_SUBDEV_MC,
+       NVDEV_SUBDEV_BUS,
+       NVDEV_SUBDEV_TIMER,
+       NVDEV_SUBDEV_FB,
+       NVDEV_SUBDEV_LTC,
+       NVDEV_SUBDEV_INSTMEM,
+       NVDEV_SUBDEV_MMU,
+       NVDEV_SUBDEV_BAR,
+       NVDEV_SUBDEV_PMU,
+       NVDEV_SUBDEV_VOLT,
+       NVDEV_SUBDEV_THERM,
+       NVDEV_SUBDEV_CLK,
+
+       NVDEV_ENGINE_FIRST,
+       NVDEV_ENGINE_DMAOBJ = NVDEV_ENGINE_FIRST,
+       NVDEV_ENGINE_IFB,
+       NVDEV_ENGINE_FIFO,
+       NVDEV_ENGINE_SW,
+       NVDEV_ENGINE_GR,
+       NVDEV_ENGINE_MPEG,
+       NVDEV_ENGINE_ME,
+       NVDEV_ENGINE_VP,
+       NVDEV_ENGINE_CIPHER,
+       NVDEV_ENGINE_BSP,
+       NVDEV_ENGINE_MSPPP,
+       NVDEV_ENGINE_CE0,
+       NVDEV_ENGINE_CE1,
+       NVDEV_ENGINE_CE2,
+       NVDEV_ENGINE_VIC,
+       NVDEV_ENGINE_MSENC,
+       NVDEV_ENGINE_DISP,
+       NVDEV_ENGINE_PM,
+       NVDEV_ENGINE_MSVLD,
+       NVDEV_ENGINE_SEC,
+       NVDEV_ENGINE_MSPDEC,
+
+       NVDEV_SUBDEV_NR,
+};
+#endif
index 68f1c41..152c842 100644 (file)
@@ -2,6 +2,7 @@
 #define __NOUVEAU_SUBDEV_H__
 
 #include <core/object.h>
+#include <core/devidx.h>
 
 #define NV_SUBDEV_(sub,var) (NV_SUBDEV_CLASS | ((var) << 8) | (sub))
 #define NV_SUBDEV(name,var)  NV_SUBDEV_(NVDEV_SUBDEV_##name, (var))