Displaying 2 results from an estimated 2 matches for "nv_wo08".
Did you mean:
nv_ro08
2014 Mar 25
2
[PATCH 4/4] vbios/prom: fetch the vbios using only aligned 32-bit accesses
...stem memory */
- bios->size = nv_rd08(bios, 0x300002) * 512;
+ bios->size = ((nv_rd32(bios, 0x300000) >> 16) & 0xff) * 512;
if (!bios->size)
goto out;
bios->data = kmalloc(bios->size, GFP_KERNEL);
if (bios->data) {
- for (i = 0; i < bios->size; i++)
- nv_wo08(bios, i, nv_rd08(bios, 0x300000 + i));
+ for (i = 0; i < bios->size; i+=4)
+ nv_wo32(bios, i, nv_rd32(bios, 0x300000 + i));
+ }
+
+ /* check the PCI record header again, now that we can make
+ * un-aligned accesses
+ */
+ if (bios->data[pcir + 0] != 'P' ||
+ bios->data[...
2014 Mar 25
0
[PATCH 4/4] vbios/prom: fetch the vbios using only aligned 32-bit accesses
...are laid out in a different order
on be.
> if (!bios->size)
> goto out;
>
> bios->data = kmalloc(bios->size, GFP_KERNEL);
> if (bios->data) {
> - for (i = 0; i < bios->size; i++)
> - nv_wo08(bios, i, nv_rd08(bios, 0x300000 + i));
> + for (i = 0; i < bios->size; i+=4)
> + nv_wo32(bios, i, nv_rd32(bios, 0x300000 + i));
> + }
> +
> + /* check the PCI record header again, now that we can make
> + * un-aligned ac...