blackfin.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * File: include/asm-blackfin/mach-bf538/blackfin.h
  3. * Based on:
  4. * Author:
  5. *
  6. * Created:
  7. * Description:
  8. *
  9. * Rev:
  10. *
  11. * Modified:
  12. *
  13. *
  14. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  15. *
  16. * This program is free software; you can redistribute it and/or modify
  17. * it under the terms of the GNU General Public License as published by
  18. * the Free Software Foundation; either version 2, or (at your option)
  19. * any later version.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with this program; see the file COPYING.
  28. * If not, write to the Free Software Foundation,
  29. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  30. */
  31. #ifndef _MACH_BLACKFIN_H_
  32. #define _MACH_BLACKFIN_H_
  33. #define BF538_FAMILY
  34. #include "bf538.h"
  35. #include "mem_map.h"
  36. #include "defBF539.h"
  37. #include "anomaly.h"
  38. #if !defined(__ASSEMBLY__)
  39. #include "cdefBF538.h"
  40. #if defined(CONFIG_BF539)
  41. #include "cdefBF539.h"
  42. #endif
  43. #endif
  44. /* UART_IIR Register */
  45. #define STATUS(x) ((x << 1) & 0x06)
  46. #define STATUS_P1 0x02
  47. #define STATUS_P0 0x01
  48. #define BFIN_UART_NR_PORTS 3
  49. #define OFFSET_THR 0x00 /* Transmit Holding register */
  50. #define OFFSET_RBR 0x00 /* Receive Buffer register */
  51. #define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
  52. #define OFFSET_IER 0x04 /* Interrupt Enable Register */
  53. #define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
  54. #define OFFSET_IIR 0x08 /* Interrupt Identification Register */
  55. #define OFFSET_LCR 0x0C /* Line Control Register */
  56. #define OFFSET_MCR 0x10 /* Modem Control Register */
  57. #define OFFSET_LSR 0x14 /* Line Status Register */
  58. #define OFFSET_MSR 0x18 /* Modem Status Register */
  59. #define OFFSET_SCR 0x1C /* SCR Scratch Register */
  60. #define OFFSET_GCTL 0x24 /* Global Control Register */
  61. #define bfin_write_MDMA_D0_IRQ_STATUS bfin_write_MDMA0_D0_IRQ_STATUS
  62. #define bfin_write_MDMA_D0_START_ADDR bfin_write_MDMA0_D0_START_ADDR
  63. #define bfin_write_MDMA_S0_START_ADDR bfin_write_MDMA0_S0_START_ADDR
  64. #define bfin_write_MDMA_D0_X_COUNT bfin_write_MDMA0_D0_X_COUNT
  65. #define bfin_write_MDMA_S0_X_COUNT bfin_write_MDMA0_S0_X_COUNT
  66. #define bfin_write_MDMA_D0_Y_COUNT bfin_write_MDMA0_D0_Y_COUNT
  67. #define bfin_write_MDMA_S0_Y_COUNT bfin_write_MDMA0_S0_Y_COUNT
  68. #define bfin_write_MDMA_D0_X_MODIFY bfin_write_MDMA0_D0_X_MODIFY
  69. #define bfin_write_MDMA_S0_X_MODIFY bfin_write_MDMA0_S0_X_MODIFY
  70. #define bfin_write_MDMA_D0_Y_MODIFY bfin_write_MDMA0_D0_Y_MODIFY
  71. #define bfin_write_MDMA_S0_Y_MODIFY bfin_write_MDMA0_S0_Y_MODIFY
  72. #define bfin_write_MDMA_S0_CONFIG bfin_write_MDMA0_S0_CONFIG
  73. #define bfin_write_MDMA_D0_CONFIG bfin_write_MDMA0_D0_CONFIG
  74. #define bfin_read_MDMA_S0_CONFIG bfin_read_MDMA0_S0_CONFIG
  75. #define bfin_read_MDMA_D0_IRQ_STATUS bfin_read_MDMA0_D0_IRQ_STATUS
  76. #define bfin_write_MDMA_S0_IRQ_STATUS bfin_write_MDMA0_S0_IRQ_STATUS
  77. /* DPMC*/
  78. #define bfin_read_STOPCK_OFF() bfin_read_STOPCK()
  79. #define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
  80. #define STOPCK_OFF STOPCK
  81. /* PLL_DIV Masks */
  82. #define CCLK_DIV1 CSEL_DIV1 /* CCLK = VCO / 1 */
  83. #define CCLK_DIV2 CSEL_DIV2 /* CCLK = VCO / 2 */
  84. #define CCLK_DIV4 CSEL_DIV4 /* CCLK = VCO / 4 */
  85. #define CCLK_DIV8 CSEL_DIV8 /* CCLK = VCO / 8 */
  86. #endif