Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2011
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  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.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement