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 <david-b@pacbell.net> Cc: linux-pcmcia@lists.infradead.org Cc: linux-mtd@lists.infradead.org Signed-off-by: Tony Lindren <tony@atomide.com>
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user