smp-regs.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* MN10300/AM33v2 Microcontroller SMP registers
  2. *
  3. * Copyright (C) 2006 Matsushita Electric Industrial Co., Ltd.
  4. * All Rights Reserved.
  5. * Created:
  6. * 13-Nov-2006 MEI Add extended cache and atomic operation register
  7. * for SMP support.
  8. * 23-Feb-2007 MEI Add define for gdbstub SMP.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License
  12. * as published by the Free Software Foundation; either version
  13. * 2 of the License, or (at your option) any later version.
  14. */
  15. #ifndef _ASM_PROC_SMP_REGS_H
  16. #define _ASM_PROC_SMP_REGS_H
  17. #ifdef __KERNEL__
  18. #ifndef __ASSEMBLY__
  19. #include <linux/types.h>
  20. #endif
  21. #include <asm/cpu-regs.h>
  22. /*
  23. * Reference to the interrupt controllers of other CPUs
  24. */
  25. #define CROSS_ICR_CPU_SHIFT 16
  26. #define CROSS_GxICR(X, CPU) __SYSREG(0xc4000000 + (X) * 4 + \
  27. ((X) >= 64 && (X) < 192) * 0xf00 + ((CPU) << CROSS_ICR_CPU_SHIFT), u16)
  28. #define CROSS_GxICR_u8(X, CPU) __SYSREG(0xc4000000 + (X) * 4 + \
  29. (((X) >= 64) && ((X) < 192)) * 0xf00 + ((CPU) << CROSS_ICR_CPU_SHIFT), u8)
  30. /* CPU ID register */
  31. #define CPUID __SYSREGC(0xc0000054, u32)
  32. #define CPUID_MASK 0x00000007 /* CPU ID mask */
  33. /* extended cache control register */
  34. #define ECHCTR __SYSREG(0xc0000c20, u32)
  35. #define ECHCTR_IBCM 0x00000001 /* instruction cache broad cast mask */
  36. #define ECHCTR_DBCM 0x00000002 /* data cache broad cast mask */
  37. #define ECHCTR_ISPM 0x00000004 /* instruction cache snoop mask */
  38. #define ECHCTR_DSPM 0x00000008 /* data cache snoop mask */
  39. #define NMIAGR __SYSREG(0xd400013c, u16)
  40. #define NMIAGR_GN 0x03fc
  41. #endif /* __KERNEL__ */
  42. #endif /* _ASM_PROC_SMP_REGS_H */