Commit a93feb2edc60b9db76ec794bff5ad0fcb10ce3eb

Authored by Faiz Abbas
Committed by Tom Rini
1 parent ded509b44c

ARM: AM43XX: Call hw_data_init() again after relocation to update *ctrl

hw_data_init() is called before relocation to initialise hardware data.
Since ctrl is initialized to OMAP_SRAM_SCRATCH_SYS_CTRL in
arch/arm/mach-omap2/am33xx/hw_data.c, the pointer *ctrl will not be
updated during relocation and will hold a stale value.

Therefore call hw_data_init() again after relocation to
reinitialize *ctrl.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>

Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff

board/ti/am43xx/board.c
... ... @@ -580,6 +580,11 @@
580 580 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
581 581 gpmc_init();
582 582  
  583 + /*
  584 + * Call this to initialize *ctrl again
  585 + */
  586 + hw_data_init();
  587 +
583 588 /* Clear all important bits for DSS errata that may need to be tweaked*/
584 589 mreqprio_0 = readl(&cdev->mreqprio_0) & MREQPRIO_0_SAB_INIT1_MASK &
585 590 MREQPRIO_0_SAB_INIT0_MASK;