mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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:
parent
137b3ee27a
commit
030b15457d
4 changed files with 43 additions and 28 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue