coldfire.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #if defined(CONFIG_M520x)
  30. #define MCF_IPSBAR 0xFC000000
  31. #else
  32. #define MCF_IPSBAR 0x40000000
  33. #endif
  34. #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
  35. defined(CONFIG_M520x)
  36. #undef MCF_MBAR
  37. #define MCF_MBAR MCF_IPSBAR
  38. #endif
  39. /****************************************************************************/
  40. #endif /* coldfire_h */