Skip to content

Commit

Permalink
OMAP: disable gpmc timeout safely for reenabling
Browse files Browse the repository at this point in the history
gpmc timeout is disabled and the reset counter
is set to 0. However, if later a driver activates
the timeout setting the reset to a valid value,
the old reset value with zero is still valid
for the first access. In fact, the timeout block
loads the reset counter after a successful access.

Found on a am335x board with a FPGA connected
to the GPMC bus together with the NAND.
When the FPGA driver in kernel activates
the timeout, the system hangs at the first access
by the NAND driver.

Signed-off-by: Stefano Babic <[email protected]>
  • Loading branch information
sbabic authored and trini committed Jun 19, 2014
1 parent fd3f401 commit 734af24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/cpu/armv7/omap-common/mem-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ void gpmc_init(void)
writel(0x00000008, &gpmc_cfg->sysconfig);
writel(0x00000000, &gpmc_cfg->irqstatus);
writel(0x00000000, &gpmc_cfg->irqenable);
writel(0x00000000, &gpmc_cfg->timeout_control);
/* disable timeout, set a safe reset value */
writel(0x00001ff0, &gpmc_cfg->timeout_control);
#ifdef CONFIG_NOR
writel(0x00000200, &gpmc_cfg->config);
#else
Expand Down

0 comments on commit 734af24

Please sign in to comment.