ARM: OMAP: Change omap_cf.c and omap_nor.c to use omap_readw/writew instead of __REG

Change omap_cf.c and omap_nor.c to use omap_readw/writew instead of __REG.
This is needed for multi-omap in the future.

Cc: David Brownell <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Tony Lindren <[email protected]>
This commit is contained in:
Tony Lindgren 2008-07-03 12:24:41 +03:00
commit 030b15457d
4 changed files with 43 additions and 28 deletions

View file

@ -60,13 +60,22 @@ struct omapflash_info {
static void omap_set_vpp(struct map_info *map, int enable)
{
static int count;
u32 l;
if (enable) {
if (count++ == 0)
OMAP_EMIFS_CONFIG_REG |= OMAP_EMIFS_CONFIG_WP;
} else {
if (count && (--count == 0))
OMAP_EMIFS_CONFIG_REG &= ~OMAP_EMIFS_CONFIG_WP;
if (cpu_class_is_omap1()) {
if (enable) {
if (count++ == 0) {
l = omap_readl(EMIFS_CONFIG);
l |= OMAP_EMIFS_CONFIG_WP;
omap_writel(l, EMIFS_CONFIG);
}
} else {
if (count && (--count == 0)) {
l = omap_readl(EMIFS_CONFIG);
l &= ~OMAP_EMIFS_CONFIG_WP;
omap_writel(l, EMIFS_CONFIG);
}
}
}
}