/* Tegra SoC common clock control functions */
#include <common.h>
+#include <div64.h>
+#include <dm.h>
#include <errno.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch-tegra/clk_rst.h>
#include <asm/arch-tegra/pmc.h>
#include <asm/arch-tegra/timer.h>
-#include <div64.h>
-#include <fdtdec.h>
/*
* This is our record of the current clock rate of each clock. We don't
* return value doesn't help. In summary this clock driver is
* quite broken but I'm afraid I have no idea how to fix it
* without completely replacing it.
+ *
+ * Be careful to avoid a divide by zero error.
*/
- div -= 2;
+ if (div >= 1)
+ div -= 2;
break;
#endif
default:
return 0;
}
+
+__weak bool clock_early_init_done(void)
+{
+ return true;
+}