summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm925t/omap925.c
blob: c0402d17eb7ceb8e09c6c89d2315b08303b2d305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * (C) Copyright 2003
 * Texas Instruments <www.ti.com>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#include <common.h>
#include <command.h>
#include <arm925t.h>

#define MIF_CONFIG_REG 0xFFFECC0C
#define FLASH_GLOBAL_CTRL_NWP 1

void archflashwp (void *archdata, int wp)
{
	ulong *fgc = (ulong *) MIF_CONFIG_REG;

	if (wp == 1)
		*fgc &= ~FLASH_GLOBAL_CTRL_NWP;
	else
		*fgc |= FLASH_GLOBAL_CTRL_NWP;
}