blob: c0402d17eb7ceb8e09c6c89d2315b08303b2d305 [file] [log] [blame]
wdenkf6f96f72003-07-15 20:04:06 +00001/*
2 * (C) Copyright 2003
3 * Texas Instruments <www.ti.com>
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkf6f96f72003-07-15 20:04:06 +00006 */
7
8#include <common.h>
9#include <command.h>
10#include <arm925t.h>
11
wdenkf6f96f72003-07-15 20:04:06 +000012#define MIF_CONFIG_REG 0xFFFECC0C
13#define FLASH_GLOBAL_CTRL_NWP 1
14
15void archflashwp (void *archdata, int wp)
16{
17 ulong *fgc = (ulong *) MIF_CONFIG_REG;
18
19 if (wp == 1)
20 *fgc &= ~FLASH_GLOBAL_CTRL_NWP;
21 else
22 *fgc |= FLASH_GLOBAL_CTRL_NWP;
23}