Guest User

Untitled

a guest
May 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #ifndef HW_NAND_H
  2. #define HW_NAND_H
  3.  
  4. #include "hardware/s5l8900.h"
  5.  
  6. // Device
  7. #define NAND 0x38A00000
  8. #define NAND_CLOCK_GATE1 0x8
  9. #define NAND_CLOCK_GATE2 0xC
  10.  
  11. // Registers
  12. #define NAND_CONFIG 0x0
  13. #define NAND_CON 0x4
  14. #define NAND_CONFIG2 0x8
  15. #define NAND_CONFIG3 0xC
  16. #define NAND_CONFIG4 0x2C
  17. #define NAND_CONFIG5 0x30
  18. #define NAND_STATUS 0x48
  19. #define NAND_ID 0x80
  20. #define NAND_SETUP 0x100
  21.  
  22. // Values
  23.  
  24. #define NAND_CONFIG_DEFAULTS 0x801
  25. #define NAND_CONFIG_SETTING1SHIFT 12
  26. #define NAND_CONFIG_SETTING2SHIFT 16
  27. #define NAND_CONFIG_SETTING1MASK 0x7
  28. #define NAND_CONFIG_SETTING2MASK 0x7
  29.  
  30. #define NAND_CONFIG2_RESET 0xFF
  31. #define NAND_CONFIG2_SETTING1 0x90
  32. #define NAND_CON_SETTING1 0xC0
  33.  
  34. #define NAND_STATUS_READY 0x1
  35.  
  36. #define NAND_NUM_BANKS 8
  37.  
  38. #endif
Add Comment
Please, Sign In to add comment