Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296276
b: refs/heads/master
c: 6ad1b61
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Feb 9, 2012
1 parent 1cd05c9 commit 8044883
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 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: 710455201f6690841e9a40bedba09ddd0a7e0620
refs/heads/master: 6ad1b614007c556129989b9f6b020d0d2e058121
4 changes: 4 additions & 0 deletions trunk/arch/arm/mach-sa1100/include/mach/neponset.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,8 @@
#define NCR_A0VPP (1<<5)
#define NCR_A1VPP (1<<6)

void neponset_ncr_frob(unsigned int, unsigned int);
#define neponset_ncr_set(v) neponset_ncr_frob(0, v)
#define neponset_ncr_clear(v) neponset_ncr_frob(v, 0)

#endif
9 changes: 9 additions & 0 deletions trunk/arch/arm/mach-sa1100/neponset.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
#include <asm/hardware/sa1111.h>
#include <asm/sizes.h>

void neponset_ncr_frob(unsigned int mask, unsigned int val)
{
unsigned long flags;

local_irq_save(flags);
NCR_0 = (NCR_0 & ~mask) | val;
local_irq_restore(flags);
}

/*
* Install handler for Neponset IRQ. Note that we have to loop here
* since the ETHERNET and USAR IRQs are level based, and we need to
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/smsc/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2281,7 +2281,7 @@ static int __devinit smc_drv_probe(struct platform_device *pdev)
if (ret)
goto out_release_io;
#if defined(CONFIG_SA1100_ASSABET)
NCR_0 |= NCR_ENET_OSC_EN;
neponset_ncr_set(NCR_ENET_OSC_EN);
#endif
platform_set_drvdata(pdev, ndev);
ret = smc_enable_device(pdev);
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/pcmcia/sa1100_neponset.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,7 @@ neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_sta

ret = sa1111_pcmcia_configure_socket(skt, state);
if (ret == 0) {
unsigned long flags;

local_irq_save(flags);
NCR_0 = (NCR_0 & ~ncr_mask) | ncr_set;

local_irq_restore(flags);
neponset_ncr_frob(ncr_mask, ncr_set);
sa1111_set_io(s->dev, pa_dwr_mask, pa_dwr_set);
}

Expand Down

0 comments on commit 8044883

Please sign in to comment.