42 static const u8 default_config_tab[][2] = {
54 struct io_mapping *
fb;
55 u32 patt = 0xdeadbeef;
61 fb = fbmem_init(nv_device(priv)->pdev);
63 nv_error(priv,
"failed to map fb\n");
67 strap = (nv_rd32(priv, 0x101000) & 0x0000003c) >> 2;
68 if ((data = bmp_mem_init_table(bios))) {
69 ramcfg[0] = nv_ro08(bios, data + 2 * strap + 0);
70 ramcfg[1] = nv_ro08(bios, data + 2 * strap + 1);
72 ramcfg[0] = default_config_tab[strap][0];
73 ramcfg[1] = default_config_tab[strap][1];
86 for (i = 0, data += 0x10; i < 8; i++, data += 4) {
87 u32 scramble = nv_ro32(bios, data);
98 nv_mask(priv,
NV04_PFB_CFG1, 0x700001, (ramcfg[1] & 1) << 20);
102 for (i = 0; i < 4; i++)
103 fbmem_poke(fb, 4 * i, patt);
105 if (fbmem_peek(fb, 0
xc) != patt)
113 (!fbmem_readback(fb, 0x1000000, ++patt) ||
114 !fbmem_readback(fb, 0, ++patt)))
119 !fbmem_readback(fb, 0x800000, ++patt))
123 if (!fbmem_readback(fb, 0x400000, ++patt))
142 *pobject = nv_object(priv);
146 priv->
base.meminit = nv05_devinit_meminit;
154 .ctor = nv05_devinit_ctor,