From e370c33c882d52375334a654465e922f9e3860fe Mon Sep 17 00:00:00 2001 From: "Jose A. Deniz" Date: Fri, 7 Aug 2009 05:08:57 +0000 Subject: Refformating code. Some minor fixes in defs. git-svn-id: http://zaphfc.googlecode.com/svn/branches/2.2@3 6b77f504-82de-11de-a8c8-95b3e4aa02d0 --- drivers/dahdi/zaphfc/zaphfc.h | 51 ++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'drivers/dahdi/zaphfc/zaphfc.h') diff --git a/drivers/dahdi/zaphfc/zaphfc.h b/drivers/dahdi/zaphfc/zaphfc.h index efa897b..c9353cc 100644 --- a/drivers/dahdi/zaphfc/zaphfc.h +++ b/drivers/dahdi/zaphfc/zaphfc.h @@ -1,14 +1,17 @@ /* - * zaphfc.c - Zaptel driver for HFC-S PCI A based ISDN BRI cards + * zaphfc.h - Dahdi driver for HFC-S PCI A based ISDN BRI cards * + * Dahdi port by Jose A. Deniz + * + * Copyright (C) 2009 Jose A. Deniz * Copyright (C) 2006 headissue GmbH; Jens Wilke * Copyright (C) 2004 Daniele Orlandi * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH * * Jens Wilke - * + * * Orginal author of this code is - * Daniele "Vihai" Orlandi + * Daniele "Vihai" Orlandi * * Major rewrite of the driver made by * Klaus-Peter Junghanns @@ -120,7 +123,7 @@ /* bits in status register (READ) */ #define hfc_STATUS_PCI_PROC 0x02 -#define hfc_STATUS_NBUSY 0x04 +#define hfc_STATUS_NBUSY 0x04 #define hfc_STATUS_TIMER_ELAP 0x10 #define hfc_STATUS_STATINT 0x20 #define hfc_STATUS_FRAMEINT 0x40 @@ -243,11 +246,12 @@ #define hfc_UGLY_FRAMEBUF 0x2000 -#define hfc_TX_FIFO_PRELOAD DAHDI_CHUNKSIZE + 2 +#define hfc_TX_FIFO_PRELOAD (DAHDI_CHUNKSIZE + 2) #define hfc_RX_FIFO_PRELOAD 4 /* HDLC STUFF */ -#define hfc_HDLC_BUF_LEN 32 /* arbitrary, just the max # of byts we will send to DAHDI per call */ +#define hfc_HDLC_BUF_LEN 32 +/* arbitrary, just the max # of byts we will send to DAHDI per call */ /* NOTE: FIFO pointers are not declared volatile because accesses to the @@ -269,18 +273,18 @@ struct hfc_chan_simplex { int ugly_framebuf_size; u16 ugly_framebuf_off; - void *z1_base,*z2_base; + void *z1_base, *z2_base; void *fifo_base; void *z_base; u16 z_min; u16 z_max; u16 fifo_size; - u8 *f1,*f2; + u8 *f1, *f2; u8 f_min; u8 f_max; u8 f_num; - + unsigned long long frames; unsigned long long bytes; unsigned long long fifo_full; @@ -327,7 +331,7 @@ typedef struct hfc_card { struct proc_dir_entry *proc_bufs; unsigned long io_bus_mem; - void *io_mem; + void __iomem *io_mem; dma_addr_t fifo_bus_mem; void *fifo_mem; @@ -360,14 +364,14 @@ typedef struct hfc_card { int debug_event; - + spinlock_t lock; unsigned int irq; unsigned int iomem; - int ticks; - int clicks; + int ticks; + int clicks; unsigned char *pci_io; - void *fifomem; // start of the shared mem + void *fifomem; /* start of the shared mem */ unsigned int pcibus; unsigned int pcidevfn; @@ -375,10 +379,8 @@ typedef struct hfc_card { int drecinframe; unsigned char cardno; - struct hfc_card *next; - + struct hfc_card *next; - } hfc_card; typedef struct dahdi_hfc { @@ -387,14 +389,17 @@ typedef struct dahdi_hfc { struct dahdi_chan chans[3]; struct dahdi_chan *_chans[3]; struct hfc_card *card; - struct dahdi_chan *sigchan; /* pointer to the signalling channel for this span */ - int sigactive; /* nonzero means we're in the middle of sending an HDLC frame */ - atomic_t hdlc_pending; /* hdlc_hard_xmit() increments, hdlc_tx_frame() decrements */ - int frames_out; - int frames_in; -} dahdi_hfc; + /* pointer to the signalling channel for this span */ + struct dahdi_chan *sigchan; + /* nonzero means we're in the middle of sending an HDLC frame */ + int sigactive; + /* hdlc_hard_xmit() increments, hdlc_tx_frame() decrements */ + atomic_t hdlc_pending; + int frames_out; + int frames_in; +} dahdi_hfc; static inline u8 hfc_inb(struct hfc_card *card, int offset) { -- cgit v1.2.3