Commit cefe8adb authored by Ondrej Zary's avatar Ondrej Zary Committed by Greg Kroah-Hartman

staging: ft1000-pcmcia: remove unused fields from struct ft1000_info

Remove 13 unused fields from struct ft1000_info.
Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8e0fd2cf
...@@ -324,25 +324,13 @@ struct ft1000_info { ...@@ -324,25 +324,13 @@ struct ft1000_info {
struct net_device_stats stats; struct net_device_stats stats;
u16 DrvErrNum; u16 DrvErrNum;
u16 AsicID; u16 AsicID;
int ASICResetNum;
int DspAsicReset;
int PktIntfErr; int PktIntfErr;
int DSPResetNum;
int NumIOCTLBufs;
int IOCTLBufLvl;
int DeviceCreated;
int CardReady; int CardReady;
int DspHibernateFlag;
int DSPReady;
u8 DeviceName[15];
int DeviceMajor;
int registered; int registered;
int mediastate; int mediastate;
u16 packetseqnum; u16 packetseqnum;
u8 squeseqnum; // sequence number on slow queue u8 squeseqnum; // sequence number on slow queue
spinlock_t dpram_lock; spinlock_t dpram_lock;
u16 CurrentInterruptEnableMask;
int InterruptsEnabled;
u16 fifo_cnt; u16 fifo_cnt;
u8 DspVer[DSPVERSZ]; // DSP version number u8 DspVer[DSPVERSZ]; // DSP version number
u8 HwSerNum[HWSERNUMSZ]; // Hardware Serial Number u8 HwSerNum[HWSERNUMSZ]; // Hardware Serial Number
...@@ -358,7 +346,6 @@ struct ft1000_info { ...@@ -358,7 +346,6 @@ struct ft1000_info {
u16 DSP_TIME[4]; u16 DSP_TIME[4];
struct list_head prov_list; struct list_head prov_list;
u16 DSPInfoBlklen; u16 DSPInfoBlklen;
u16 DrvMsgPend;
int (*ft1000_reset)(void *); int (*ft1000_reset)(void *);
void *link; void *link;
u16 DSPInfoBlk[MAX_DSP_SESS_REC]; u16 DSPInfoBlk[MAX_DSP_SESS_REC];
......
...@@ -323,17 +323,14 @@ void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value) ...@@ -323,17 +323,14 @@ void ft1000_write_dpram_mag_32(struct net_device *dev, int offset, u32 value)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void ft1000_enable_interrupts(struct net_device *dev) static void ft1000_enable_interrupts(struct net_device *dev)
{ {
struct ft1000_info *info = netdev_priv(dev);
u16 tempword; u16 tempword;
DEBUG(1, "ft1000_hw:ft1000_enable_interrupts()\n"); DEBUG(1, "ft1000_hw:ft1000_enable_interrupts()\n");
ft1000_write_reg(dev, FT1000_REG_SUP_IMASK, ft1000_write_reg(dev, FT1000_REG_SUP_IMASK, ISR_DEFAULT_MASK);
info->CurrentInterruptEnableMask);
tempword = ft1000_read_reg(dev, FT1000_REG_SUP_IMASK); tempword = ft1000_read_reg(dev, FT1000_REG_SUP_IMASK);
DEBUG(1, DEBUG(1,
"ft1000_hw:ft1000_enable_interrupts:current interrupt enable mask = 0x%x\n", "ft1000_hw:ft1000_enable_interrupts:current interrupt enable mask = 0x%x\n",
tempword); tempword);
info->InterruptsEnabled = TRUE;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -348,7 +345,6 @@ static void ft1000_enable_interrupts(struct net_device *dev) ...@@ -348,7 +345,6 @@ static void ft1000_enable_interrupts(struct net_device *dev)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void ft1000_disable_interrupts(struct net_device *dev) static void ft1000_disable_interrupts(struct net_device *dev)
{ {
struct ft1000_info *info = netdev_priv(dev);
u16 tempword; u16 tempword;
DEBUG(1, "ft1000_hw: ft1000_disable_interrupts()\n"); DEBUG(1, "ft1000_hw: ft1000_disable_interrupts()\n");
...@@ -357,7 +353,6 @@ static void ft1000_disable_interrupts(struct net_device *dev) ...@@ -357,7 +353,6 @@ static void ft1000_disable_interrupts(struct net_device *dev)
DEBUG(1, DEBUG(1,
"ft1000_hw:ft1000_disable_interrupts:current interrupt enable mask = 0x%x\n", "ft1000_hw:ft1000_disable_interrupts:current interrupt enable mask = 0x%x\n",
tempword); tempword);
info->InterruptsEnabled = FALSE;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -379,7 +374,6 @@ static void ft1000_reset_asic(struct net_device *dev) ...@@ -379,7 +374,6 @@ static void ft1000_reset_asic(struct net_device *dev)
DEBUG(1, "ft1000_hw:ft1000_reset_asic called\n"); DEBUG(1, "ft1000_hw:ft1000_reset_asic called\n");
(*info->ft1000_reset) (info->link); (*info->ft1000_reset) (info->link);
info->ASICResetNum++;
// Let's use the register provided by the Magnemite ASIC to reset the // Let's use the register provided by the Magnemite ASIC to reset the
// ASIC and DSP. // ASIC and DSP.
...@@ -456,7 +450,6 @@ static int ft1000_reset_card(struct net_device *dev) ...@@ -456,7 +450,6 @@ static int ft1000_reset_card(struct net_device *dev)
if (ft1000_card_present == 1) { if (ft1000_card_present == 1) {
spin_lock_irqsave(&info->dpram_lock, flags); spin_lock_irqsave(&info->dpram_lock, flags);
if (info->AsicID == ELECTRABUZZ_ID) { if (info->AsicID == ELECTRABUZZ_ID) {
if (info->DspHibernateFlag == 0) {
ft1000_write_reg(dev, FT1000_REG_DPRAM_ADDR, ft1000_write_reg(dev, FT1000_REG_DPRAM_ADDR,
FT1000_DPRAM_RX_BASE); FT1000_DPRAM_RX_BASE);
for (i = 0; i < MAX_DSP_SESS_REC; i++) { for (i = 0; i < MAX_DSP_SESS_REC; i++) {
...@@ -464,7 +457,6 @@ static int ft1000_reset_card(struct net_device *dev) ...@@ -464,7 +457,6 @@ static int ft1000_reset_card(struct net_device *dev)
ft1000_read_reg(dev, ft1000_read_reg(dev,
FT1000_REG_DPRAM_DATA); FT1000_REG_DPRAM_DATA);
} }
}
} else { } else {
ft1000_write_reg(dev, FT1000_REG_DPRAM_ADDR, ft1000_write_reg(dev, FT1000_REG_DPRAM_ADDR,
FT1000_DPRAM_MAG_RX_BASE); FT1000_DPRAM_MAG_RX_BASE);
...@@ -481,8 +473,6 @@ static int ft1000_reset_card(struct net_device *dev) ...@@ -481,8 +473,6 @@ static int ft1000_reset_card(struct net_device *dev)
//reset ASIC //reset ASIC
ft1000_reset_asic(dev); ft1000_reset_asic(dev);
info->DSPResetNum++;
DEBUG(1, "ft1000_hw:ft1000_reset_card:downloading dsp image\n"); DEBUG(1, "ft1000_hw:ft1000_reset_card:downloading dsp image\n");
if (info->AsicID == MAGNEMITE_ID) { if (info->AsicID == MAGNEMITE_ID) {
...@@ -1168,7 +1158,6 @@ void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1168,7 +1158,6 @@ void ft1000_proc_drvmsg(struct net_device *dev)
case DSP_GET_INFO: case DSP_GET_INFO:
DEBUG(1, "FT1000:drivermsg:Got DSP_GET_INFO\n"); DEBUG(1, "FT1000:drivermsg:Got DSP_GET_INFO\n");
// copy dsp info block to dsp // copy dsp info block to dsp
info->DrvMsgPend = 1;
// allow any outstanding ioctl to finish // allow any outstanding ioctl to finish
mdelay(10); mdelay(10);
tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL); tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);
...@@ -1211,13 +1200,11 @@ void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1211,13 +1200,11 @@ void ft1000_proc_drvmsg(struct net_device *dev)
htons(info->DSPInfoBlklen); htons(info->DSPInfoBlklen);
ft1000_send_cmd (dev, (PUSHORT)info->DSPInfoBlk, (USHORT)(info->DSPInfoBlklen+4), 0); ft1000_send_cmd (dev, (PUSHORT)info->DSPInfoBlk, (USHORT)(info->DSPInfoBlklen+4), 0);
} }
info->DrvMsgPend = 0;
break; break;
case GET_DRV_ERR_RPT_MSG: case GET_DRV_ERR_RPT_MSG:
DEBUG(1, "FT1000:drivermsg:Got GET_DRV_ERR_RPT_MSG\n"); DEBUG(1, "FT1000:drivermsg:Got GET_DRV_ERR_RPT_MSG\n");
// copy driver error message to dsp // copy driver error message to dsp
info->DrvMsgPend = 1;
// allow any outstanding ioctl to finish // allow any outstanding ioctl to finish
mdelay(10); mdelay(10);
tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL); tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL);
...@@ -1272,7 +1259,6 @@ void ft1000_proc_drvmsg(struct net_device *dev) ...@@ -1272,7 +1259,6 @@ void ft1000_proc_drvmsg(struct net_device *dev)
ft1000_send_cmd (dev, (PUSHORT)&tempbuffer[0], (USHORT)(0x0012), 0); ft1000_send_cmd (dev, (PUSHORT)&tempbuffer[0], (USHORT)(0x0012), 0);
info->DrvErrNum = 0; info->DrvErrNum = 0;
} }
info->DrvMsgPend = 0;
break; break;
default: default:
...@@ -1339,13 +1325,11 @@ int ft1000_parse_dpram_msg(struct net_device *dev) ...@@ -1339,13 +1325,11 @@ int ft1000_parse_dpram_msg(struct net_device *dev)
ft1000_write_reg(dev, FT1000_REG_SUP_CTRL, ft1000_write_reg(dev, FT1000_REG_SUP_CTRL,
HOST_INTF_BE); HOST_INTF_BE);
} }
info->DspAsicReset = 0;
} }
if (doorbell & FT1000_DSP_ASIC_RESET) { if (doorbell & FT1000_DSP_ASIC_RESET) {
DEBUG(0, DEBUG(0,
"FT1000:ft1000_parse_dpram_msg: Got a dsp ASIC reset message\n"); "FT1000:ft1000_parse_dpram_msg: Got a dsp ASIC reset message\n");
info->DspAsicReset = 1;
ft1000_write_reg(dev, FT1000_REG_DOORBELL, ft1000_write_reg(dev, FT1000_REG_DOORBELL,
FT1000_DSP_ASIC_RESET); FT1000_DSP_ASIC_RESET);
udelay(200); udelay(200);
...@@ -2198,16 +2182,11 @@ struct net_device *init_ft1000_card(struct pcmcia_device *link, ...@@ -2198,16 +2182,11 @@ struct net_device *init_ft1000_card(struct pcmcia_device *link,
spin_lock_init(&info->dpram_lock); spin_lock_init(&info->dpram_lock);
info->DrvErrNum = 0; info->DrvErrNum = 0;
info->ASICResetNum = 0;
info->registered = 1; info->registered = 1;
info->link = link; info->link = link;
info->ft1000_reset = ft1000_reset; info->ft1000_reset = ft1000_reset;
info->mediastate = 0; info->mediastate = 0;
info->fifo_cnt = 0; info->fifo_cnt = 0;
info->DeviceCreated = FALSE;
info->DeviceMajor = 0;
info->CurrentInterruptEnableMask = ISR_DEFAULT_MASK;
info->InterruptsEnabled = FALSE;
info->CardReady = 0; info->CardReady = 0;
info->DSP_TIME[0] = 0; info->DSP_TIME[0] = 0;
info->DSP_TIME[1] = 0; info->DSP_TIME[1] = 0;
......
...@@ -75,7 +75,6 @@ int ft1000ReadProc(char *page, char **start, off_t off, ...@@ -75,7 +75,6 @@ int ft1000ReadProc(char *page, char **start, off_t off,
/* Wrap-around */ /* Wrap-around */
if (info->AsicID == ELECTRABUZZ_ID) { if (info->AsicID == ELECTRABUZZ_ID) {
if (info->DspHibernateFlag == 0) {
if (info->ProgConStat != 0xFF) { if (info->ProgConStat != 0xFF) {
info->LedStat = info->LedStat =
ft1000_read_dpram(dev, FT1000_DSP_LED); ft1000_read_dpram(dev, FT1000_DSP_LED);
...@@ -85,7 +84,6 @@ int ft1000ReadProc(char *page, char **start, off_t off, ...@@ -85,7 +84,6 @@ int ft1000ReadProc(char *page, char **start, off_t off,
} else { } else {
info->ConStat = 0xf; info->ConStat = 0xf;
} }
}
} else { } else {
if (info->ProgConStat != 0xFF) { if (info->ProgConStat != 0xFF) {
info->LedStat = info->LedStat =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment