Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************/ |
| 2 | |
| 3 | /* |
| 4 | * coldfire.h -- Motorola ColdFire CPU sepecific defines |
| 5 | * |
Greg Ungerer | 31f4fde | 2006-06-26 10:58:09 +1000 | [diff] [blame] | 6 | * (C) Copyright 1999-2006, Greg Ungerer (gerg@snapgear.com) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * (C) Copyright 2000, Lineo (www.lineo.com) |
| 8 | */ |
| 9 | |
| 10 | /****************************************************************************/ |
| 11 | #ifndef coldfire_h |
| 12 | #define coldfire_h |
| 13 | /****************************************************************************/ |
| 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
| 16 | /* |
Greg Ungerer | ce3de78 | 2011-03-09 14:19:08 +1000 | [diff] [blame] | 17 | * Define master clock frequency. This is done at config time now. |
| 18 | * No point enumerating dozens of possible clock options here. And |
| 19 | * in any case new boards come along from time to time that have yet |
| 20 | * another different clocking frequency. |
Greg Ungerer | 31f4fde | 2006-06-26 10:58:09 +1000 | [diff] [blame] | 21 | */ |
| 22 | #ifdef CONFIG_CLOCK_SET |
| 23 | #define MCF_CLK CONFIG_CLOCK_FREQ |
Greg Ungerer | 31f4fde | 2006-06-26 10:58:09 +1000 | [diff] [blame] | 24 | #else |
| 25 | #error "Don't know what your ColdFire CPU clock frequency is??" |
| 26 | #endif |
| 27 | |
| 28 | /* |
Greg Ungerer | b195c47 | 2011-03-06 01:01:31 +1000 | [diff] [blame] | 29 | * Define the processor internal peripherals base address. |
| 30 | * |
| 31 | * The majority of ColdFire parts use an MBAR register to set |
| 32 | * the base address. Some have an IPSBAR register instead, and it |
| 33 | * has slightly different rules on its size and alignment. Some |
| 34 | * parts have fixed addresses and the internal peripherals cannot |
Greg Ungerer | d4852a3 | 2011-03-06 21:53:28 +1000 | [diff] [blame] | 35 | * be relocated in the CPU address space. |
Greg Ungerer | b195c47 | 2011-03-06 01:01:31 +1000 | [diff] [blame] | 36 | * |
Greg Ungerer | d4852a3 | 2011-03-06 21:53:28 +1000 | [diff] [blame] | 37 | * The value of MBAR or IPSBAR is config time selectable, we no |
| 38 | * longer hard define it here. No MBAR or IPSBAR will be defined if |
| 39 | * this part has a fixed peripheral address map. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | */ |
Greg Ungerer | d4852a3 | 2011-03-06 21:53:28 +1000 | [diff] [blame] | 41 | #ifdef CONFIG_MBAR |
| 42 | #define MCF_MBAR CONFIG_MBAR |
| 43 | #endif |
| 44 | #ifdef CONFIG_IPSBAR |
| 45 | #define MCF_IPSBAR CONFIG_IPSBAR |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | #endif |
| 47 | |
| 48 | /****************************************************************************/ |
| 49 | #endif /* coldfire_h */ |