Commit 49e03402327ab69a26f604398982ef14123900a2

Authored by Tero Kristo
Committed by Paul Walmsley
1 parent c6a2d839d0

ARM: OMAP3: control: add API for setting IVA bootmode

OMAP3 PM core requires IVA2 bootmode to be set to idle during init. Currently,
a direct register write is used for this. Add a new ctrl API for this purpose
instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>

Showing 3 changed files with 13 additions and 2 deletions Side-by-side Diff

arch/arm/mach-omap2/control.c
... ... @@ -569,5 +569,16 @@
569 569 return 0;
570 570 }
571 571  
  572 +/**
  573 + * omap3_ctrl_set_iva_bootmode_idle - sets the IVA2 bootmode to idle
  574 + *
  575 + * Sets the bootmode for IVA2 to idle. This is needed by the PM code to
  576 + * force disable IVA2 so that it does not prevent any low-power states.
  577 + */
  578 +void omap3_ctrl_set_iva_bootmode_idle(void)
  579 +{
  580 + omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE,
  581 + OMAP343X_CONTROL_IVA2_BOOTMOD);
  582 +}
572 583 #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
arch/arm/mach-omap2/control.h
... ... @@ -427,6 +427,7 @@
427 427 extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode);
428 428 extern void omap3630_ctrl_disable_rta(void);
429 429 extern int omap3_ctrl_save_padconf(void);
  430 +extern void omap3_ctrl_set_iva_bootmode_idle(void);
430 431 extern void omap2_set_globals_control(void __iomem *ctrl,
431 432 void __iomem *ctrl_pad);
432 433 #else
arch/arm/mach-omap2/pm34xx.c
... ... @@ -430,8 +430,7 @@
430 430 OMAP3430_IVA2_MOD, CM_FCLKEN);
431 431  
432 432 /* Set IVA2 boot mode to 'idle' */
433   - omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE,
434   - OMAP343X_CONTROL_IVA2_BOOTMOD);
  433 + omap3_ctrl_set_iva_bootmode_idle();
435 434  
436 435 /* Un-reset IVA2 */
437 436 omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);