lld_emu.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * NAND Flash Controller Device Driver
  3. * Copyright (c) 2009, Intel Corporation and its suppliers.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms and conditions of the GNU General Public License,
  7. * version 2, as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  17. *
  18. */
  19. #ifndef _LLD_EMU_
  20. #define _LLD_EMU_
  21. #include "ffsport.h"
  22. #include "ffsdefs.h"
  23. /* prototypes: emulator API functions */
  24. extern u16 emu_Flash_Reset(void);
  25. extern u16 emu_Flash_Init(void);
  26. extern int emu_Flash_Release(void);
  27. extern u16 emu_Read_Device_ID(void);
  28. extern u16 emu_Erase_Block(u32 block_addr);
  29. extern u16 emu_Write_Page_Main(u8 *write_data, u32 Block,
  30. u16 Page, u16 PageCount);
  31. extern u16 emu_Read_Page_Main(u8 *read_data, u32 Block, u16 Page,
  32. u16 PageCount);
  33. extern u16 emu_Event_Status(void);
  34. extern void emu_Enable_Disable_Interrupts(u16 INT_ENABLE);
  35. extern u16 emu_Write_Page_Main_Spare(u8 *write_data, u32 Block,
  36. u16 Page, u16 PageCount);
  37. extern u16 emu_Write_Page_Spare(u8 *write_data, u32 Block,
  38. u16 Page, u16 PageCount);
  39. extern u16 emu_Read_Page_Main_Spare(u8 *read_data, u32 Block,
  40. u16 Page, u16 PageCount);
  41. extern u16 emu_Read_Page_Spare(u8 *read_data, u32 Block, u16 Page,
  42. u16 PageCount);
  43. extern u16 emu_Get_Bad_Block(u32 block);
  44. u16 emu_CDMA_Flash_Init(void);
  45. u16 emu_CDMA_Execute_CMDs(u16 tag_count);
  46. u16 emu_CDMA_Event_Status(void);
  47. #endif /*_LLD_EMU_*/