ubc.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * include/asm-sh/ubc.h
  3. *
  4. * Copyright (C) 1999 Niibe Yutaka
  5. * Copyright (C) 2002, 2003 Paul Mundt
  6. *
  7. * This file is subject to the terms and conditions of the GNU General Public
  8. * License. See the file "COPYING" in the main directory of this archive
  9. * for more details.
  10. */
  11. #ifndef __ASM_SH_UBC_H
  12. #define __ASM_SH_UBC_H
  13. #ifdef __KERNEL__
  14. #include <cpu/ubc.h>
  15. /* User Break Controller */
  16. #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709)
  17. #define UBC_TYPE_SH7729 (current_cpu_data.type == CPU_SH7729)
  18. #else
  19. #define UBC_TYPE_SH7729 0
  20. #endif
  21. #define BAMR_ASID (1 << 2)
  22. #define BAMR_NONE 0
  23. #define BAMR_10 0x1
  24. #define BAMR_12 0x2
  25. #define BAMR_ALL 0x3
  26. #define BAMR_16 0x8
  27. #define BAMR_20 0x9
  28. #define BBR_INST (1 << 4)
  29. #define BBR_DATA (2 << 4)
  30. #define BBR_READ (1 << 2)
  31. #define BBR_WRITE (2 << 2)
  32. #define BBR_BYTE 0x1
  33. #define BBR_HALF 0x2
  34. #define BBR_LONG 0x3
  35. #define BBR_QUAD (1 << 6) /* SH7750 */
  36. #define BBR_CPU (1 << 6) /* SH7709A,SH7729 */
  37. #define BBR_DMA (2 << 6) /* SH7709A,SH7729 */
  38. #define BRCR_CMFA (1 << 15)
  39. #define BRCR_CMFB (1 << 14)
  40. #if defined CONFIG_CPU_SH2A
  41. #define BRCR_CMFCA (1 << 15)
  42. #define BRCR_CMFCB (1 << 14)
  43. #define BRCR_CMFDA (1 << 13)
  44. #define BRCR_CMFDB (1 << 12)
  45. #define BRCR_PCBB (1 << 6) /* 1: after execution */
  46. #define BRCR_PCBA (1 << 5) /* 1: after execution */
  47. #define BRCR_PCTE 0
  48. #else
  49. #define BRCR_PCTE (1 << 11)
  50. #define BRCR_PCBA (1 << 10) /* 1: after execution */
  51. #define BRCR_DBEB (1 << 7)
  52. #define BRCR_PCBB (1 << 6)
  53. #define BRCR_SEQ (1 << 3)
  54. #define BRCR_UBDE (1 << 0)
  55. #endif
  56. #ifndef __ASSEMBLY__
  57. /* arch/sh/kernel/cpu/ubc.S */
  58. extern void ubc_sleep(void);
  59. #ifdef CONFIG_UBC_WAKEUP
  60. extern void ubc_wakeup(void);
  61. #else
  62. #define ubc_wakeup() do { } while (0)
  63. #endif
  64. #endif
  65. #endif /* __KERNEL__ */
  66. #endif /* __ASM_SH_UBC_H */