summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/74xx_7xx/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/cpu/74xx_7xx/cpu.c')
-rw-r--r--arch/powerpc/cpu/74xx_7xx/cpu.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/powerpc/cpu/74xx_7xx/cpu.c b/arch/powerpc/cpu/74xx_7xx/cpu.c
index 3c17277..9248702 100644
--- a/arch/powerpc/cpu/74xx_7xx/cpu.c
+++ b/arch/powerpc/cpu/74xx_7xx/cpu.c
@@ -277,19 +277,17 @@ do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/*
* For the 7400 the TB clock runs at 1/4 the cpu bus speed.
*/
-#if defined(CONFIG_AMIGAONEG3SE) || defined(CONFIG_SYS_CONFIG_BUS_CLK)
+#if defined(CONFIG_AMIGAONEG3SE) || !defined(CONFIG_SYS_BUS_CLK)
+#define CONFIG_SYS_BUS_CLK gd->bus_clk
+#endif
+
unsigned long get_tbclk(void)
{
- return (gd->bus_clk / 4);
+ return CONFIG_SYS_BUS_CLK / 4;
}
-#else /* ! CONFIG_AMIGAONEG3SE and !CONFIG_SYS_CONFIG_BUS_CLK*/
-unsigned long get_tbclk (void)
-{
- return CONFIG_SYS_BUS_HZ / 4;
-}
-#endif /* CONFIG_AMIGAONEG3SE or CONFIG_SYS_CONFIG_BUS_CLK*/
/* ------------------------------------------------------------------------- */
+
#if defined(CONFIG_WATCHDOG)
#if !defined(CONFIG_PCIPPC2) && !defined(CONFIG_BAB7xx)
void