at91eb40a.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #define FLASH_BASE ((u_int *)0x01000000)
  2. #define FLASH_SIZE (2*1024*1024)
  3. /*
  4. * EBI initialization.
  5. *
  6. * 0x01000000, 16MB, 2 tdf, 16 bits, 7 WS
  7. */
  8. #define EBI_CSR_0 ((u_int *)(FLASH_BASE | 0x2539)
  9. #define EBI_CSR_1 ((u_int *)0x10000000)
  10. #define EBI_CSR_2 ((u_int *)0x20000000)
  11. #define EBI_CSR_3 ((u_int *)0x30000000)
  12. #define EBI_CSR_4 ((u_int *)0x40000000)
  13. #define EBI_CSR_5 ((u_int *)0x50000000)
  14. #define EBI_CSR_6 ((u_int *)0x60000000)
  15. #define EBI_CSR_7 ((u_int *)0x70000000)
  16. /*
  17. * LEDs
  18. */
  19. #define LED1 _BV(16)
  20. #define LED2 _BV(17)
  21. #define LED3 _BV(18)
  22. #define LED4 _BV(19)
  23. #define LED5 _BV(3)
  24. #define LED6 _BV(4)
  25. #define LED7 _BV(5)
  26. #define LED8 _BV(6)
  27. #define LED_PIO_CTRL 1
  28. #define LED_MASK (LED1|LED2|LED3|LED4|LED5|LED6|LED7|LED8)
  29. #define LED_ON PIO_CLEAR_OUT
  30. #define LED_OFF PIO_SET_OUT
  31. #define SW1_MASK _BV(12)
  32. #define SW2_MASK _BV(9)
  33. #define SW3_MASK _BV(1)
  34. #define SW4_MASK _BV(2)
  35. #define SW_MASK (SW1_MASK|SW2_MASK|SW3_MASK|SW4_MASK)
  36. /*
  37. * Push buttons.
  38. */
  39. #define SW1 _BV(12)
  40. #define SW2 _BV(9)
  41. #define SW3 _BV(1)
  42. #define SW4 _BV(2)
  43. #define PIO_SW1 _BV(12)
  44. #define PIO_SW2 _BV(9)
  45. #define PIO_SW3 _BV(1)
  46. #define PIO_SW4 _BV(2)
  47. /*
  48. * Serial EEPROM
  49. */
  50. #define SCL _BV(8)
  51. #define SDA _BV(7)
  52. #define PIO_SCL _BV(8)
  53. #define PIO_SDA _BV(7)
  54. /*
  55. * Master clock.
  56. */
  57. #define MCK 66000000
  58. #define MCKKHz (MCK/1000)