summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/edb93xx/flash_cfg.c
blob: 8400db69de33915eeb1b2a533d4fb3ef9e3f475b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: 2009 Matthias Kaehlcke <matthias@kaehlcke.net>

/* Flash setup for Cirrus edb93xx boards */

#include <common.h>
#include <mach/ep93xx-regs.h>
#include <io.h>

#define SMC_BCR6_VALUE	(2 << SMC_BCR_IDCY_SHIFT | 5 << SMC_BCR_WST1_SHIFT | \
				SMC_BCR_BLE | 2 << SMC_BCR_WST2_SHIFT | \
				1 << SMC_BCR_MW_SHIFT)

/* Called from assembly */
void flash_cfg(void);

void flash_cfg(void)
{
	struct smc_regs *smc = (struct smc_regs *)SMC_BASE;

	writel(SMC_BCR6_VALUE, &smc->bcr6);
}