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 | 31f4fde | 2006-06-26 10:58:09 +1000 | [diff] [blame] | 17 | * Define master clock frequency. This is essentially done at config |
| 18 | * time now. No point enumerating dozens of possible clock options |
| 19 | * here. Also the peripheral clock (bus clock) divide ratio is set |
| 20 | * at config time too. |
| 21 | */ |
| 22 | #ifdef CONFIG_CLOCK_SET |
| 23 | #define MCF_CLK CONFIG_CLOCK_FREQ |
| 24 | #define MCF_BUSCLK (CONFIG_CLOCK_FREQ / CONFIG_CLOCK_DIV) |
| 25 | #else |
| 26 | #error "Don't know what your ColdFire CPU clock frequency is??" |
| 27 | #endif |
| 28 | |
| 29 | /* |
Greg Ungerer | b195c47 | 2011-03-06 01:01:31 +1000 | [diff] [blame^] | 30 | * Define the processor internal peripherals base address. |
| 31 | * |
| 32 | * The majority of ColdFire parts use an MBAR register to set |
| 33 | * the base address. Some have an IPSBAR register instead, and it |
| 34 | * has slightly different rules on its size and alignment. Some |
| 35 | * parts have fixed addresses and the internal peripherals cannot |
| 36 | * be relocated in the address space. |
| 37 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | * This is generally setup by the boards start up code. |
| 39 | */ |
Greg Ungerer | 571f060 | 2011-03-05 23:50:37 +1000 | [diff] [blame] | 40 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) |
Greg Ungerer | b195c47 | 2011-03-06 01:01:31 +1000 | [diff] [blame^] | 41 | #define MCF_IPSBAR 0x40000000 |
| 42 | #else |
| 43 | #define MCF_MBAR 0x10000000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | #endif |
| 45 | |
| 46 | /****************************************************************************/ |
| 47 | #endif /* coldfire_h */ |