[PATCH 1/8] tegra: fix fallout from relocatable code changes in PLLX init

Lucas Stach dev at lynxeye.de
Tue Dec 3 14:56:55 EST 2013


Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
Urgh, the only reason why this didn't blew earlier is that it was
covered by another bug, which caused the main CPU complex to run off OSC
clock.
---
 arch/arm/mach-tegra/tegra_avp_init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-tegra/tegra_avp_init.c b/arch/arm/mach-tegra/tegra_avp_init.c
index 6cabdb3..2c2d6fc 100644
--- a/arch/arm/mach-tegra/tegra_avp_init.c
+++ b/arch/arm/mach-tegra/tegra_avp_init.c
@@ -103,6 +103,8 @@ static void init_pllx(void)
 		    CRC_OSC_CTRL_OSC_FREQ_MASK) >> CRC_OSC_CTRL_OSC_FREQ_SHIFT;
 
 	conf = &pllx_config_table[chiptype][osc_freq];
+	/* we are not relocated yet - globals are a bit more tricky here */
+	conf = (struct pll_config *)((char *)conf - get_runtime_offset());
 
 	/* set PLL bypass and frequency parameters */
 	reg = CRC_PLLX_BASE_BYPASS;
-- 
1.8.3.1




More information about the barebox mailing list