coldfire.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /****************************************************************************/
  2. /*
  3. * coldfire.h -- Motorola ColdFire CPU sepecific defines
  4. *
  5. * (C) Copyright 1999-2006, Greg Ungerer (gerg@snapgear.com)
  6. * (C) Copyright 2000, Lineo (www.lineo.com)
  7. */
  8. /****************************************************************************/
  9. #ifndef coldfire_h
  10. #define coldfire_h
  11. /****************************************************************************/
  12. /*
  13. * Define master clock frequency. This is essentially done at config
  14. * time now. No point enumerating dozens of possible clock options
  15. * here. Also the peripheral clock (bus clock) divide ratio is set
  16. * at config time too.
  17. */
  18. #ifdef CONFIG_CLOCK_SET
  19. #define MCF_CLK CONFIG_CLOCK_FREQ
  20. #define MCF_BUSCLK (CONFIG_CLOCK_FREQ / CONFIG_CLOCK_DIV)
  21. #else
  22. #error "Don't know what your ColdFire CPU clock frequency is??"
  23. #endif
  24. /*
  25. * Define the processor support peripherals base address.
  26. * This is generally setup by the boards start up code.
  27. */
  28. #define MCF_MBAR 0x10000000
  29. #define MCF_MBAR2 0x80000000
  30. #if defined(CONFIG_M520x)
  31. #define MCF_IPSBAR 0xFC000000
  32. #else
  33. #define MCF_IPSBAR 0x40000000
  34. #endif
  35. #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
  36. defined(CONFIG_M520x)
  37. #undef MCF_MBAR
  38. #define MCF_MBAR MCF_IPSBAR
  39. #elif defined(CONFIG_M532x)
  40. #undef MCF_MBAR
  41. #define MCF_MBAR 0x00000000
  42. #endif
  43. /****************************************************************************/
  44. #endif /* coldfire_h */