This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 22nd, 2011  |  syntax: None  |  size: 0.86 KB  |  views: 108  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.             if (FlashSpec[chip].Vendor == TOSHIBA)
  2.             {
  3.                 totpages = FlashSpec[chip].PagePerBlock * FlashSpec[chip].TotBlks;
  4.  
  5.                 /* Interleave can be 0 or 1 */
  6.                 r12 = ((totpages/2)>>FlashSpec[chip].Interleave) * (row & 1);
  7.                 r3 = (row/2) % ((totpage/2)>>FlashSpec[chip].Interleave);
  8.                 r0 = row & (totpages >> FlashSpec[chip].Interleaved);
  9.  
  10.                 row = r0 + r3 + r12;
  11.             }
  12.             else
  13.             {
  14.                 /* dual plane */
  15.                 page_offset = (row/2) % FlashSpec[chip].PagePerBlockRaw;
  16.  
  17.                 /* PagePerBlock = PagePerBlockRaw*MulPlane */
  18.                 mulplane_offset = row & ~(FlashSpec[chip].PagePerBlock - 1);
  19.                 row = mulplne_offset + ((row & 1) * FlashSpec[chip].PagePerBlockRaw) + page_offset;
  20.             }
  21.  
  22.  
clone this paste RAW Paste Data