blob: 1df3f666a28e05eeae35824587cdf25497aae017 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/****************************************************************************/
2
3/*
4 * coldfire.h -- Motorola ColdFire CPU sepecific defines
5 *
6 * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com)
7 * (C) Copyright 2000, Lineo (www.lineo.com)
8 */
9
10/****************************************************************************/
11#ifndef coldfire_h
12#define coldfire_h
13/****************************************************************************/
14
15#include <linux/config.h>
16
17/*
18 * Define the processor support peripherals base address.
19 * This is generally setup by the boards start up code.
20 */
21#define MCF_MBAR 0x10000000
22#define MCF_MBAR2 0x80000000
23#define MCF_IPSBAR 0x40000000
24
Greg Ungerer1bdd89d2005-09-09 09:32:14 +100025#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x)
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#undef MCF_MBAR
27#define MCF_MBAR MCF_IPSBAR
28#endif
29
30/*
31 * Define master clock frequency.
32 */
33#if defined(CONFIG_CLOCK_11MHz)
34#define MCF_CLK 11289600
35#elif defined(CONFIG_CLOCK_16MHz)
36#define MCF_CLK 16000000
37#elif defined(CONFIG_CLOCK_20MHz)
38#define MCF_CLK 20000000
39#elif defined(CONFIG_CLOCK_24MHz)
40#define MCF_CLK 24000000
41#elif defined(CONFIG_CLOCK_25MHz)
42#define MCF_CLK 25000000
43#elif defined(CONFIG_CLOCK_33MHz)
44#define MCF_CLK 33000000
45#elif defined(CONFIG_CLOCK_40MHz)
46#define MCF_CLK 40000000
47#elif defined(CONFIG_CLOCK_45MHz)
48#define MCF_CLK 45000000
49#elif defined(CONFIG_CLOCK_48MHz)
50#define MCF_CLK 48000000
51#elif defined(CONFIG_CLOCK_50MHz)
52#define MCF_CLK 50000000
53#elif defined(CONFIG_CLOCK_54MHz)
54#define MCF_CLK 54000000
55#elif defined(CONFIG_CLOCK_60MHz)
56#define MCF_CLK 60000000
Greg Ungerer1bdd89d2005-09-09 09:32:14 +100057#elif defined(CONFIG_CLOCK_62_5MHz)
58#define MCF_CLK 62500000
Linus Torvalds1da177e2005-04-16 15:20:36 -070059#elif defined(CONFIG_CLOCK_64MHz)
60#define MCF_CLK 64000000
61#elif defined(CONFIG_CLOCK_66MHz)
62#define MCF_CLK 66000000
63#elif defined(CONFIG_CLOCK_70MHz)
64#define MCF_CLK 70000000
65#elif defined(CONFIG_CLOCK_100MHz)
66#define MCF_CLK 100000000
67#elif defined(CONFIG_CLOCK_140MHz)
68#define MCF_CLK 140000000
69#elif defined(CONFIG_CLOCK_150MHz)
70#define MCF_CLK 150000000
71#elif defined(CONFIG_CLOCK_166MHz)
72#define MCF_CLK 166000000
73#else
74#error "Don't know what your ColdFire CPU clock frequency is??"
75#endif
76
77/*
78 * One some ColdFire family members the bus clock (used by internal
79 * peripherals) is not the same as the CPU clock.
80 */
Greg Ungerer1bdd89d2005-09-09 09:32:14 +100081#if defined(CONFIG_M523x) || defined(CONFIG_M5249) || defined(CONFIG_M527x)
Linus Torvalds1da177e2005-04-16 15:20:36 -070082#define MCF_BUSCLK (MCF_CLK / 2)
83#else
84#define MCF_BUSCLK MCF_CLK
85#endif
86
87/****************************************************************************/
88#endif /* coldfire_h */