blob: afc1bc185e4bb0f41b87c93bf909b33823ee580e [file] [log] [blame]
Steve Sakoman9b8ea4e2010-07-15 16:19:16 -04001/*
2 * (C) Copyright 2010
3 * Texas Instruments, <www.ti.com>
4 *
5 * Steve Sakoman <steve@sakoman.com>
6 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Steve Sakoman9b8ea4e2010-07-15 16:19:16 -04008 */
9
10#include <asm/arch/cpu.h>
11#include <asm/arch/sys_proto.h>
12
13struct gpmc *gpmc_cfg;
14
15/*****************************************************
16 * gpmc_init(): init gpmc bus
17 * This code can only be executed from SRAM or SDRAM.
18 *****************************************************/
19void gpmc_init(void)
20{
21 gpmc_cfg = (struct gpmc *)GPMC_BASE;
22
23 /* global settings */
24 writel(0, &gpmc_cfg->irqenable); /* isr's sources masked */
25 writel(0, &gpmc_cfg->timeout_control);/* timeout disable */
26
27 /*
28 * Disable the GPMC0 config set by ROM code
29 * It conflicts with our MPDB (both at 0x08000000)
30 */
31 writel(0, &gpmc_cfg->cs[0].config7);
32}