diff options
author | Greg Ungerer <gerg@snapgear.com> | 2006-06-26 02:58:09 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 06:04:24 +0200 |
commit | 31f4fde38c5027ca05941db4a05c163d6314278e (patch) | |
tree | cebb2e24cd98ec55109c4c0b9119199db89c60a9 | |
parent | [PATCH] m68knommu: configurable frequency selection (diff) | |
download | linux-31f4fde38c5027ca05941db4a05c163d6314278e.tar.xz linux-31f4fde38c5027ca05941db4a05c163d6314278e.zip |
[PATCH] m68knommu: configurable frequency selection header
Remove list of fixed clock frequency options used for configuring master
clock, and make field an int. Much more flexible this way, no need to add
more options for every new used freqency.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/asm-m68knommu/coldfire.h | 76 |
1 files changed, 17 insertions, 59 deletions
diff --git a/include/asm-m68knommu/coldfire.h b/include/asm-m68knommu/coldfire.h index 2fabca91df83..83a9fa4e618a 100644 --- a/include/asm-m68knommu/coldfire.h +++ b/include/asm-m68knommu/coldfire.h @@ -3,7 +3,7 @@ /* * coldfire.h -- Motorola ColdFire CPU sepecific defines * - * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com) + * (C) Copyright 1999-2006, Greg Ungerer (gerg@snapgear.com) * (C) Copyright 2000, Lineo (www.lineo.com) */ @@ -14,6 +14,19 @@ /* + * Define master clock frequency. This is essentially done at config + * time now. No point enumerating dozens of possible clock options + * here. Also the peripheral clock (bus clock) divide ratio is set + * at config time too. + */ +#ifdef CONFIG_CLOCK_SET +#define MCF_CLK CONFIG_CLOCK_FREQ +#define MCF_BUSCLK (CONFIG_CLOCK_FREQ / CONFIG_CLOCK_DIV) +#else +#error "Don't know what your ColdFire CPU clock frequency is??" +#endif + +/* * Define the processor support peripherals base address. * This is generally setup by the boards start up code. */ @@ -29,64 +42,9 @@ defined(CONFIG_M520x) #undef MCF_MBAR #define MCF_MBAR MCF_IPSBAR -#endif - -/* - * Define master clock frequency. - */ -#if defined(CONFIG_CLOCK_11MHz) -#define MCF_CLK 11289600 -#elif defined(CONFIG_CLOCK_16MHz) -#define MCF_CLK 16000000 -#elif defined(CONFIG_CLOCK_20MHz) -#define MCF_CLK 20000000 -#elif defined(CONFIG_CLOCK_24MHz) -#define MCF_CLK 24000000 -#elif defined(CONFIG_CLOCK_25MHz) -#define MCF_CLK 25000000 -#elif defined(CONFIG_CLOCK_33MHz) -#define MCF_CLK 33000000 -#elif defined(CONFIG_CLOCK_40MHz) -#define MCF_CLK 40000000 -#elif defined(CONFIG_CLOCK_45MHz) -#define MCF_CLK 45000000 -#elif defined(CONFIG_CLOCK_48MHz) -#define MCF_CLK 48000000 -#elif defined(CONFIG_CLOCK_50MHz) -#define MCF_CLK 50000000 -#elif defined(CONFIG_CLOCK_54MHz) -#define MCF_CLK 54000000 -#elif defined(CONFIG_CLOCK_60MHz) -#define MCF_CLK 60000000 -#elif defined(CONFIG_CLOCK_62_5MHz) -#define MCF_CLK 62500000 -#elif defined(CONFIG_CLOCK_64MHz) -#define MCF_CLK 64000000 -#elif defined(CONFIG_CLOCK_66MHz) -#define MCF_CLK 66000000 -#elif defined(CONFIG_CLOCK_70MHz) -#define MCF_CLK 70000000 -#elif defined(CONFIG_CLOCK_100MHz) -#define MCF_CLK 100000000 -#elif defined(CONFIG_CLOCK_140MHz) -#define MCF_CLK 140000000 -#elif defined(CONFIG_CLOCK_150MHz) -#define MCF_CLK 150000000 -#elif defined(CONFIG_CLOCK_166MHz) -#define MCF_CLK 166000000 -#else -#error "Don't know what your ColdFire CPU clock frequency is??" -#endif - -/* - * One some ColdFire family members the bus clock (used by internal - * peripherals) is not the same as the CPU clock. - */ -#if defined(CONFIG_M523x) || defined(CONFIG_M5249) || defined(CONFIG_M527x) || \ - defined(CONFIG_M520x) -#define MCF_BUSCLK (MCF_CLK / 2) -#else -#define MCF_BUSCLK MCF_CLK +#elif defined(CONFIG_M532x) +#undef MCF_MBAR +#define MCF_MBAR 0x00000000 #endif /****************************************************************************/ |