for (i = 0; i < ARRAY_SIZE(nv10_graph_ctx_regs); i++)
                nv_wr32(priv, nv10_graph_ctx_regs[i], chan->nv10[i]);
 
-       if (nv_device(priv)->chipset >= 0x17) {
+       if (nv_device(priv)->card_type >= NV_11 &&
+           nv_device(priv)->chipset >= 0x17) {
                for (i = 0; i < ARRAY_SIZE(nv17_graph_ctx_regs); i++)
                        nv_wr32(priv, nv17_graph_ctx_regs[i], chan->nv17[i]);
        }
        for (i = 0; i < ARRAY_SIZE(nv10_graph_ctx_regs); i++)
                chan->nv10[i] = nv_rd32(priv, nv10_graph_ctx_regs[i]);
 
-       if (nv_device(priv)->chipset >= 0x17) {
+       if (nv_device(priv)->card_type >= NV_11 &&
+           nv_device(priv)->chipset >= 0x17) {
                for (i = 0; i < ARRAY_SIZE(nv17_graph_ctx_regs); i++)
                        chan->nv17[i] = nv_rd32(priv, nv17_graph_ctx_regs[i]);
        }
        NV_WRITE_CTX(0x00400e14, 0x00001000);
        NV_WRITE_CTX(0x00400e30, 0x00080008);
        NV_WRITE_CTX(0x00400e34, 0x00080008);
-       if (nv_device(priv)->chipset >= 0x17) {
+       if (nv_device(priv)->card_type >= NV_11 &&
+           nv_device(priv)->chipset >= 0x17) {
                /* is it really needed ??? */
                NV17_WRITE_CTX(NV10_PGRAPH_DEBUG_4,
                                        nv_rd32(priv, NV10_PGRAPH_DEBUG_4));
                nv_engine(priv)->sclass = nv10_graph_sclass;
        else
        if (nv_device(priv)->chipset <  0x17 ||
-           nv_device(priv)->chipset == 0x1a)
+           nv_device(priv)->card_type < NV_11)
                nv_engine(priv)->sclass = nv15_graph_sclass;
        else
                nv_engine(priv)->sclass = nv17_graph_sclass;
        nv_wr32(priv, NV04_PGRAPH_DEBUG_2, 0x25f92ad9);
        nv_wr32(priv, NV04_PGRAPH_DEBUG_3, 0x55DE0830 | (1 << 29) | (1 << 31));
 
-       if (nv_device(priv)->chipset >= 0x17) {
+       if (nv_device(priv)->card_type >= NV_11 &&
+           nv_device(priv)->chipset >= 0x17) {
                nv_wr32(priv, NV10_PGRAPH_DEBUG_4, 0x1f000000);
                nv_wr32(priv, 0x400a10, 0x03ff3fb6);
                nv_wr32(priv, 0x400838, 0x002f8684);
 
 nv10_devinit_meminit(struct nouveau_devinit *devinit)
 {
        struct nv10_devinit_priv *priv = (void *)devinit;
-       const int mem_width[] = { 0x10, 0x00, 0x20 };
-       const int mem_width_count = nv_device(priv)->chipset >= 0x17 ? 3 : 2;
+       static const int mem_width[] = { 0x10, 0x00, 0x20 };
+       int mem_width_count;
        uint32_t patt = 0xdeadbeef;
        struct io_mapping *fb;
        int i, j, k;
 
+       if (nv_device(priv)->card_type >= NV_11 &&
+           nv_device(priv)->chipset >= 0x17)
+               mem_width_count = 3;
+       else
+               mem_width_count = 2;
+
        /* Map the framebuffer aperture */
        fb = fbmem_init(nv_device(priv)->pdev);
        if (!fb) {
 
 
        /* initialise synchronisation routines */
        if      (device->card_type < NV_10) ret = nv04_fence_create(drm);
-       else if (device->chipset   <  0x17) ret = nv10_fence_create(drm);
+       else if (device->card_type < NV_11 ||
+                device->chipset   <  0x17) ret = nv10_fence_create(drm);
        else if (device->card_type < NV_50) ret = nv17_fence_create(drm);
        else if (device->chipset   <  0x84) ret = nv50_fence_create(drm);
        else if (device->card_type < NV_C0) ret = nv84_fence_create(drm);