Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122692
b: refs/heads/master
c: 56bde88
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Dec 13, 2008
1 parent a883fb7 commit 1b7505a
Show file tree
Hide file tree
Showing 42 changed files with 2,347 additions and 1,314 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: a7b75207bd37cbbfa0b4ee7dbaf0dc6bafec8fea
refs/heads/master: 56bde885903bdb9d9531fd569096ec8c7a2d60ee
4 changes: 2 additions & 2 deletions trunk/drivers/isdn/hardware/mISDN/hfc_multi.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ struct hfc_multi {
void (*write_fifo)(struct hfc_multi *hc, u_char *data,
int len);
u_long pci_origmembase, plx_origmembase, dsp_origmembase;
u_char *pci_membase; /* PCI memory (MUST BE BYTE POINTER) */
u_char *plx_membase; /* PLX memory */
void __iomem *pci_membase; /* PCI memory */
void __iomem *plx_membase; /* PLX memory */
u_char *dsp_membase; /* DSP on PLX */
u_long pci_iobase; /* PCI IO */
struct hfcm_hw hw; /* remember data of write-only-registers */
Expand Down
67 changes: 35 additions & 32 deletions trunk/drivers/isdn/hardware/mISDN/hfcmulti.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ static int (*unregister_interrupt)(void);
static int interrupt_registered;

static struct hfc_multi *syncmaster;
int plxsd_master; /* if we have a master card (yet) */
static int plxsd_master; /* if we have a master card (yet) */
static spinlock_t plx_lock; /* may not acquire other lock inside */
EXPORT_SYMBOL(plx_lock);

#define TYP_E1 1
#define TYP_4S 4
Expand Down Expand Up @@ -422,7 +421,7 @@ HFC_wait_debug(struct hfc_multi *hc, const char *function, int line)
#endif

/* write fifo data (REGIO) */
void
static void
write_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
{
outb(A_FIFO_DATA0, (hc->pci_iobase)+4);
Expand All @@ -443,7 +442,7 @@ write_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
}
}
/* write fifo data (PCIMEM) */
void
static void
write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
{
while (len>>2) {
Expand All @@ -465,7 +464,7 @@ write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
}
}
/* read fifo data (REGIO) */
void
static void
read_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
{
outb(A_FIFO_DATA0, (hc->pci_iobase)+4);
Expand All @@ -487,7 +486,7 @@ read_fifo_regio(struct hfc_multi *hc, u_char *data, int len)
}

/* read fifo data (PCIMEM) */
void
static void
read_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len)
{
while (len>>2) {
Expand Down Expand Up @@ -706,7 +705,7 @@ vpm_out(struct hfc_multi *c, int which, unsigned short addr,
}


void
static void
vpm_init(struct hfc_multi *wc)
{
unsigned char reg;
Expand Down Expand Up @@ -789,7 +788,8 @@ vpm_init(struct hfc_multi *wc)
}
}

void
#ifdef UNUSED
static void
vpm_check(struct hfc_multi *hctmp)
{
unsigned char gpi2;
Expand All @@ -799,6 +799,7 @@ vpm_check(struct hfc_multi *hctmp)
if ((gpi2 & 0x3) != 0x3)
printk(KERN_DEBUG "Got interrupt 0x%x from VPM!\n", gpi2);
}
#endif /* UNUSED */


/*
Expand All @@ -812,7 +813,7 @@ vpm_check(struct hfc_multi *hctmp)
*
*/

void
static void
vpm_echocan_on(struct hfc_multi *hc, int ch, int taps)
{
unsigned int timeslot;
Expand Down Expand Up @@ -844,7 +845,7 @@ vpm_echocan_on(struct hfc_multi *hc, int ch, int taps)
vpm_out(hc, unit, timeslot, 0x7e);
}

void
static void
vpm_echocan_off(struct hfc_multi *hc, int ch)
{
unsigned int timeslot;
Expand Down Expand Up @@ -887,8 +888,9 @@ vpm_echocan_off(struct hfc_multi *hc, int ch)
static inline void
hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
{
struct hfc_multi *hc, *next, *pcmmaster = 0;
u_int *plx_acc_32, pv;
struct hfc_multi *hc, *next, *pcmmaster = NULL;
void __iomem *plx_acc_32;
u_int pv;
u_long flags;

spin_lock_irqsave(&HFClock, flags);
Expand Down Expand Up @@ -916,7 +918,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
/* Disable sync of all cards */
list_for_each_entry_safe(hc, next, &HFClist, list) {
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
plx_acc_32 = (u_int *)(hc->plx_membase+PLX_GPIOC);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
pv &= ~PLX_SYNC_O_EN;
writel(pv, plx_acc_32);
Expand All @@ -938,7 +940,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
printk(KERN_DEBUG "id=%d (0x%p) = syncronized with "
"interface.\n", hc->id, hc);
/* Enable new sync master */
plx_acc_32 = (u_int *)(hc->plx_membase+PLX_GPIOC);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
pv |= PLX_SYNC_O_EN;
writel(pv, plx_acc_32);
Expand Down Expand Up @@ -968,7 +970,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
"QUARTZ is automatically "
"enabled by HFC-%dS\n", hc->type);
}
plx_acc_32 = (u_int *)(hc->plx_membase+PLX_GPIOC);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
pv |= PLX_SYNC_O_EN;
writel(pv, plx_acc_32);
Expand Down Expand Up @@ -1013,7 +1015,8 @@ plxsd_checksync(struct hfc_multi *hc, int rm)
static void
release_io_hfcmulti(struct hfc_multi *hc)
{
u_int *plx_acc_32, pv;
void __iomem *plx_acc_32;
u_int pv;
u_long plx_flags;

if (debug & DEBUG_HFCMULTI_INIT)
Expand All @@ -1033,7 +1036,7 @@ release_io_hfcmulti(struct hfc_multi *hc)
printk(KERN_DEBUG "%s: release PLXSD card %d\n",
__func__, hc->id + 1);
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = (u_int *)(hc->plx_membase+PLX_GPIOC);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
writel(PLX_GPIOC_INIT, plx_acc_32);
pv = readl(plx_acc_32);
/* Termination off */
Expand All @@ -1055,9 +1058,9 @@ release_io_hfcmulti(struct hfc_multi *hc)
test_and_clear_bit(HFC_CHIP_PLXSD, &hc->chip); /* prevent resync */
pci_write_config_word(hc->pci_dev, PCI_COMMAND, 0);
if (hc->pci_membase)
iounmap((void *)hc->pci_membase);
iounmap(hc->pci_membase);
if (hc->plx_membase)
iounmap((void *)hc->plx_membase);
iounmap(hc->plx_membase);
if (hc->pci_iobase)
release_region(hc->pci_iobase, 8);

Expand All @@ -1080,7 +1083,8 @@ init_chip(struct hfc_multi *hc)
u_long flags, val, val2 = 0, rev;
int i, err = 0;
u_char r_conf_en, rval;
u_int *plx_acc_32, pv;
void __iomem *plx_acc_32;
u_int pv;
u_long plx_flags, hfc_flags;
int plx_count;
struct hfc_multi *pos, *next, *plx_last_hc;
Expand Down Expand Up @@ -1154,7 +1158,7 @@ init_chip(struct hfc_multi *hc)
printk(KERN_DEBUG "%s: initializing PLXSD card %d\n",
__func__, hc->id + 1);
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = (u_int *)(hc->plx_membase+PLX_GPIOC);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
writel(PLX_GPIOC_INIT, plx_acc_32);
pv = readl(plx_acc_32);
/* The first and the last cards are terminating the PCM bus */
Expand Down Expand Up @@ -1190,8 +1194,7 @@ init_chip(struct hfc_multi *hc)
"we disable termination\n",
__func__, plx_last_hc->id + 1);
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = (u_int *)(plx_last_hc->plx_membase
+ PLX_GPIOC);
plx_acc_32 = plx_last_hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
pv &= ~PLX_TERM_ON;
writel(pv, plx_acc_32);
Expand Down Expand Up @@ -1240,7 +1243,7 @@ init_chip(struct hfc_multi *hc)
/* Speech Design PLX bridge pcm and sync mode */
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = (u_int *)(hc->plx_membase+PLX_GPIOC);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
/* Connect PCM */
if (hc->hw.r_pcm_md0 & V_PCM_MD) {
Expand Down Expand Up @@ -1352,8 +1355,7 @@ init_chip(struct hfc_multi *hc)
/* retry with master clock */
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = (u_int *)(hc->plx_membase +
PLX_GPIOC);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
pv |= PLX_MASTER_EN | PLX_SLAVE_EN_N;
pv |= PLX_SYNC_O_EN;
Expand Down Expand Up @@ -1389,7 +1391,7 @@ init_chip(struct hfc_multi *hc)
if (test_bit(HFC_CHIP_PCM_MASTER, &hc->chip))
plxsd_master = 1;
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc_32 = (u_int *)(hc->plx_membase+PLX_GPIOC);
plx_acc_32 = hc->plx_membase + PLX_GPIOC;
pv = readl(plx_acc_32);
pv |= PLX_DSP_RES_N;
writel(pv, plx_acc_32);
Expand Down Expand Up @@ -2586,7 +2588,8 @@ hfcmulti_interrupt(int intno, void *dev_id)
struct dchannel *dch;
u_char r_irq_statech, status, r_irq_misc, r_irq_oview;
int i;
u_short *plx_acc, wval;
void __iomem *plx_acc;
u_short wval;
u_char e1_syncsta, temp;
u_long flags;

Expand All @@ -2606,7 +2609,7 @@ hfcmulti_interrupt(int intno, void *dev_id)

if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
spin_lock_irqsave(&plx_lock, flags);
plx_acc = (u_short *)(hc->plx_membase + PLX_INTCSR);
plx_acc = hc->plx_membase + PLX_INTCSR;
wval = readw(plx_acc);
spin_unlock_irqrestore(&plx_lock, flags);
if (!(wval & PLX_INTCSR_LINTI1_STATUS))
Expand Down Expand Up @@ -4091,7 +4094,7 @@ init_card(struct hfc_multi *hc)
{
int err = -EIO;
u_long flags;
u_short *plx_acc;
void __iomem *plx_acc;
u_long plx_flags;

if (debug & DEBUG_HFCMULTI_INIT)
Expand All @@ -4113,7 +4116,7 @@ init_card(struct hfc_multi *hc)

if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc = (u_short *)(hc->plx_membase+PLX_INTCSR);
plx_acc = hc->plx_membase + PLX_INTCSR;
writew((PLX_INTCSR_PCIINT_ENABLE | PLX_INTCSR_LINTI1_ENABLE),
plx_acc); /* enable PCI & LINT1 irq */
spin_unlock_irqrestore(&plx_lock, plx_flags);
Expand Down Expand Up @@ -4162,7 +4165,7 @@ init_card(struct hfc_multi *hc)
error:
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)) {
spin_lock_irqsave(&plx_lock, plx_flags);
plx_acc = (u_short *)(hc->plx_membase+PLX_INTCSR);
plx_acc = hc->plx_membase + PLX_INTCSR;
writew(0x00, plx_acc); /*disable IRQs*/
spin_unlock_irqrestore(&plx_lock, plx_flags);
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/isdn/mISDN/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ MODULE_LICENSE("GPL");
module_param(debug, uint, S_IRUGO | S_IWUSR);

static LIST_HEAD(devices);
DEFINE_RWLOCK(device_lock);
static DEFINE_RWLOCK(device_lock);
static u64 device_ids;
#define MAX_DEVICE_ID 63

static LIST_HEAD(Bprotocols);
DEFINE_RWLOCK(bp_lock);
static DEFINE_RWLOCK(bp_lock);

struct mISDNdevice
*get_mdevice(u_int id)
Expand Down Expand Up @@ -192,7 +192,7 @@ mISDN_unregister_Bprotocol(struct Bprotocol *bp)
}
EXPORT_SYMBOL(mISDN_unregister_Bprotocol);

int
static int
mISDNInit(void)
{
int err;
Expand Down Expand Up @@ -224,7 +224,7 @@ mISDNInit(void)
return err;
}

void mISDN_cleanup(void)
static void mISDN_cleanup(void)
{
misdn_sock_cleanup();
mISDN_timer_cleanup();
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/mISDN/dsp_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EXPORT_SYMBOL(dsp_audio_s16_to_law);
/* alaw -> ulaw */
u8 dsp_audio_alaw_to_ulaw[256];
/* ulaw -> alaw */
u8 dsp_audio_ulaw_to_alaw[256];
static u8 dsp_audio_ulaw_to_alaw[256];
u8 dsp_silence;


Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/isdn/mISDN/dsp_cmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1540,11 +1540,13 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
schedule_work(&dsp->workq);
}

u32 samplecount;
static u32 samplecount;
struct timer_list dsp_spl_tl;
u32 dsp_spl_jiffies; /* calculate the next time to fire */
u32 dsp_start_jiffies; /* jiffies at the time, the calculation begins */
struct timeval dsp_start_tv; /* time at start of calculation */
#ifdef UNUSED
static u32 dsp_start_jiffies; /* jiffies at the time, the calculation begins */
#endif /* UNUSED */
static struct timeval dsp_start_tv; /* time at start of calculation */

void
dsp_cmx_send(void *arg)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/isdn/mISDN/dsp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
#include "core.h"
#include "dsp.h"

const char *mISDN_dsp_revision = "2.0";
static const char *mISDN_dsp_revision = "2.0";

static int debug;
static int options;
Expand Down Expand Up @@ -631,7 +631,6 @@ dsp_function(struct mISDNchannel *ch, struct sk_buff *skb)
int ret = 0;
u8 *digits;
int cont;
struct sk_buff *nskb;
u_long flags;

hh = mISDN_HEAD_P(skb);
Expand Down Expand Up @@ -690,6 +689,7 @@ dsp_function(struct mISDNchannel *ch, struct sk_buff *skb)
digits = dsp_dtmf_goertzel_decode(dsp, skb->data,
skb->len, (dsp_options&DSP_OPT_ULAW)?1:0);
while (*digits) {
struct sk_buff *nskb;
if (dsp_debug & DEBUG_DSP_DTMF)
printk(KERN_DEBUG "%s: digit"
"(%c) to layer %s\n",
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/mISDN/dsp_pipeline.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
name = strsep(&tok, "(");
args = strsep(&tok, ")");
if (args && !*args)
args = 0;
args = NULL;

list_for_each_entry_safe(entry, n, &dsp_elements, list)
if (!strcmp(entry->elem->name, name)) {
Expand Down
Loading

0 comments on commit 1b7505a

Please sign in to comment.