summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-11-29 17:37:23 -0800
committerGerrit <chrome-bot@google.com>2011-12-12 10:23:42 -0800
commit341a71f7c6c8e70c0d92bb0557903ff3e31ebe98 (patch)
tree9047a4bfc02eb0310735a5b81ec1a73719901314
parent6f22f8c501202a48d386465d2808afd1bdc6825e (diff)
tegra: Update clocks after fdt is available
Some clocks cannot be set to the final value until we have the fdt and know what PLLP should be set to. For now the only example is coresight - so this adds a call to update this clock once the A9 is up and running with the fdt. BUG=chromium-os:23496 TEST=build and boot on Seaboard, T33, Kaen Change-Id: I7a07306cfb0a24cec4dcdb08cac78659a1afc73f Reviewed-on: https://gerrit.chromium.org/gerrit/12251 Commit-Ready: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
-rw-r--r--arch/arm/cpu/armv7/tegra-common/ap20.c5
-rw-r--r--arch/arm/cpu/armv7/tegra-common/clock.c1
-rw-r--r--arch/arm/include/asm/arch-tegra/ap20.h5
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/tegra-common/ap20.c b/arch/arm/cpu/armv7/tegra-common/ap20.c
index 774567374a5..529ce84860b 100644
--- a/arch/arm/cpu/armv7/tegra-common/ap20.c
+++ b/arch/arm/cpu/armv7/tegra-common/ap20.c
@@ -605,3 +605,8 @@ void tegra_start(void)
is_tegra_processor_reset = check_is_tegra_processor_reset();
}
+void tegra_update_clocks(void)
+{
+ /* Enable CoreSight with new clock speed */
+ clock_enable_coresight(1);
+}
diff --git a/arch/arm/cpu/armv7/tegra-common/clock.c b/arch/arm/cpu/armv7/tegra-common/clock.c
index 8964c66208c..01caab6b9fa 100644
--- a/arch/arm/cpu/armv7/tegra-common/clock.c
+++ b/arch/arm/cpu/armv7/tegra-common/clock.c
@@ -1384,6 +1384,7 @@ int clock_early_init(ulong pllp_base)
clock_set_rate(CLOCK_ID_PERIPH, 432, osc_freq_mhz, 1, 8);
clock_set_rate(CLOCK_ID_CGENERAL, 600, osc_freq_mhz, 0, 8);
}
+ tegra_update_clocks();
return 0;
}
diff --git a/arch/arm/include/asm/arch-tegra/ap20.h b/arch/arm/include/asm/arch-tegra/ap20.h
index 6c1e57eea31..3d834e678d9 100644
--- a/arch/arm/include/asm/arch-tegra/ap20.h
+++ b/arch/arm/include/asm/arch-tegra/ap20.h
@@ -129,3 +129,8 @@ int ap20_get_num_cpus(void);
* @return SOC type - see TEGRA_SOC...
*/
int tegra_get_chip_type(void);
+
+/**
+ * Update any clocks that need to be adjusted after the fdt is available
+ */
+void tegra_update_clocks(void);