Skip to content
Snippets Groups Projects
Commit 5641f34f authored by Mike Frysinger's avatar Mike Frysinger
Browse files

Blackfin: workaround anomaly 05000440


We cannot rely on the syscontrol rom func to program PLL_DIV with anomaly
05000440 is in effect, so manually program the MMR when necessary.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent e5d8984b
No related branches found
No related tags found
No related merge requests found
...@@ -391,7 +391,9 @@ program_clocks(ADI_BOOT_DATA *bs, bool put_into_srfs) ...@@ -391,7 +391,9 @@ program_clocks(ADI_BOOT_DATA *bs, bool put_into_srfs)
/* Always programming PLL_LOCKCNT avoids Anomaly 05000430 */ /* Always programming PLL_LOCKCNT avoids Anomaly 05000430 */
ADI_SYSCTRL_VALUES memory_settings; ADI_SYSCTRL_VALUES memory_settings;
uint32_t actions = SYSCTRL_WRITE | SYSCTRL_PLLCTL | SYSCTRL_PLLDIV | SYSCTRL_LOCKCNT; uint32_t actions = SYSCTRL_WRITE | SYSCTRL_PLLCTL | SYSCTRL_LOCKCNT;
if (!ANOMALY_05000440)
actions |= SYSCTRL_PLLDIV;
if (CONFIG_HAS_VR) { if (CONFIG_HAS_VR) {
actions |= SYSCTRL_VRCTL; actions |= SYSCTRL_VRCTL;
if (CONFIG_VR_CTL_VAL & FREQ_MASK) if (CONFIG_VR_CTL_VAL & FREQ_MASK)
...@@ -410,6 +412,8 @@ program_clocks(ADI_BOOT_DATA *bs, bool put_into_srfs) ...@@ -410,6 +412,8 @@ program_clocks(ADI_BOOT_DATA *bs, bool put_into_srfs)
serial_putc('e'); serial_putc('e');
bfrom_SysControl(actions, &memory_settings, NULL); bfrom_SysControl(actions, &memory_settings, NULL);
serial_putc('f'); serial_putc('f');
if (ANOMALY_05000440)
bfin_write_PLL_DIV(CONFIG_PLL_DIV_VAL);
#if ANOMALY_05000432 #if ANOMALY_05000432
bfin_write_SIC_IWR1(-1); bfin_write_SIC_IWR1(-1);
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment