};
 
 u8 nvbios_ramcfg_count(struct nouveau_bios *);
-u8 nvbios_ramcfg_index(struct nouveau_bios *);
+u8 nvbios_ramcfg_index(struct nouveau_subdev *);
 
 #endif
 
         * in case *not* re-reading the strap causes similar breakage.
         */
        if (!init->ramcfg || init->bios->version.major < 0x70)
-               init->ramcfg = 0x80000000 | nvbios_ramcfg_index(init->bios);
+               init->ramcfg = 0x80000000 | nvbios_ramcfg_index(init->subdev);
        return (init->ramcfg & 0x7fffffff);
 }
 
 
 #include <subdev/bios/ramcfg.h>
 
 static u8
-nvbios_ramcfg_strap(struct nouveau_bios *bios)
+nvbios_ramcfg_strap(struct nouveau_subdev *subdev)
 {
-       return (nv_rd32(bios, 0x101000) & 0x0000003c) >> 2;
+       return (nv_rd32(subdev, 0x101000) & 0x0000003c) >> 2;
 }
 
 u8
 }
 
 u8
-nvbios_ramcfg_index(struct nouveau_bios *bios)
+nvbios_ramcfg_index(struct nouveau_subdev *subdev)
 {
-       u8 strap = nvbios_ramcfg_strap(bios);
+       struct nouveau_bios *bios = nouveau_bios(subdev);
+       u8 strap = nvbios_ramcfg_strap(subdev);
        u32 xlat = 0x00000000;
        struct bit_entry bit_M;
 
 
        } while (perfE.memory < freq);
 
        /* locate specific data set for the attached memory */
-       strap = nvbios_ramcfg_index(bios);
+       strap = nvbios_ramcfg_index(nv_subdev(pfb));
        if (strap >= cnt) {
                nv_error(pfb, "invalid ramcfg strap\n");
                return -EINVAL;
 
        }
 
        /* locate specific data set for the attached memory */
-       strap = nvbios_ramcfg_index(bios);
+       strap = nvbios_ramcfg_index(nv_subdev(pfb));
        if (strap >= cnt) {
                nv_error(pfb, "invalid ramcfg strap\n");
                return -EINVAL;
 
        }
 
        /* locate specific data set for the attached memory */
-       strap = nvbios_ramcfg_index(bios);
+       strap = nvbios_ramcfg_index(nv_subdev(pfb));
        if (strap >= cnt) {
                nv_error(pfb, "invalid ramcfg strap\n");
                return -EINVAL;
 
        }
 
        /* locate specific data set for the attached memory */
+       strap = nvbios_ramcfg_index(nv_subdev(pfb));
        ram->base.ramcfg.data = nvbios_rammapSp(bios, ram->base.rammap.data,
                                                ram->base.rammap.version,
-                                               ram->base.rammap.size, cnt, len,
-                                               nvbios_ramcfg_index(bios),
+                                               ram->base.rammap.size,
+                                               cnt, len, strap,
                                                &ram->base.ramcfg.version,
                                                &ram->base.ramcfg.size,
                                                &data->bios);