Steve Sakoman | 9b8ea4e | 2010-07-15 16:19:16 -0400 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2010 |
| 3 | * Texas Instruments, <www.ti.com> |
| 4 | * |
| 5 | * Steve Sakoman <steve@sakoman.com> |
| 6 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Steve Sakoman | 9b8ea4e | 2010-07-15 16:19:16 -0400 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <asm/arch/cpu.h> |
| 11 | #include <asm/arch/sys_proto.h> |
| 12 | |
| 13 | struct gpmc *gpmc_cfg; |
| 14 | |
| 15 | /***************************************************** |
| 16 | * gpmc_init(): init gpmc bus |
| 17 | * This code can only be executed from SRAM or SDRAM. |
| 18 | *****************************************************/ |
| 19 | void 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 | } |