Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298158
b: refs/heads/master
c: 5fbabf3
h: refs/heads/master
v: v3
  • Loading branch information
Paul Parsons authored and David Woodhouse committed Mar 26, 2012
1 parent 712e952 commit 3610af2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 876fe76d793d03077eb61ba3afab4a383f46c554
refs/heads/master: 5fbabf3f45a15c2b39170980cee01368138f4d79
14 changes: 9 additions & 5 deletions trunk/drivers/mtd/maps/l440gx.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,21 @@ static struct mtd_info *mymtd;


/* Is this really the vpp port? */
static DEFINE_SPINLOCK(l440gx_vpp_lock);
static int l440gx_vpp_refcnt;
static void l440gx_set_vpp(struct map_info *map, int vpp)
{
unsigned long l;
unsigned long flags;

l = inl(VPP_PORT);
spin_lock_irqsave(&l440gx_vpp_lock, flags);
if (vpp) {
l |= 1;
if (++l440gx_vpp_refcnt == 1) /* first nested 'on' */
outl(inl(VPP_PORT) | 1, VPP_PORT);
} else {
l &= ~1;
if (--l440gx_vpp_refcnt == 0) /* last nested 'off' */
outl(inl(VPP_PORT) & ~1, VPP_PORT);
}
outl(l, VPP_PORT);
spin_unlock_irqrestore(&l440gx_vpp_lock, flags);
}

static struct map_info l440gx_map = {
Expand Down

0 comments on commit 3610af2

Please sign in to comment.