/* * * 3780i.h -- declarations for 3780i.c * * * Written By: Mike Sullivan IBM Corporation * * Copyright (C) 1999 IBM Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * NO WARRANTY * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is * solely responsible for determining the appropriateness of using and * distributing the Program and assumes all risks associated with its * exercise of rights under this Agreement, including but not limited to * the risks and costs of program errors, damage to or loss of data, * programs or equipment, and unavailability or interruption of operations. * * DISCLAIMER OF LIABILITY * NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED * HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * 10/23/2000 - Alpha Release * First release to the public
*/
#ifndef _LINUX_3780I_H #define _LINUX_3780I_H
#include <asm/io.h>
/* DSP I/O port offsets and definitions */ #define DSP_IsaSlaveControl 0x0000 /* ISA slave control register */ #define DSP_IsaSlaveStatus 0x0001 /* ISA slave status register */ #define DSP_ConfigAddress 0x0002 /* General config address register */ #define DSP_ConfigData 0x0003 /* General config data register */ #define DSP_HBridgeControl 0x0002 /* HBridge control register */ #define DSP_MsaAddrLow 0x0004 /* MSP System Address, low word */ #define DSP_MsaAddrHigh 0x0006 /* MSP System Address, high word */ #define DSP_MsaDataDSISHigh 0x0008 /* MSA data register: d-store word or high byte of i-store */ #define DSP_MsaDataISLow 0x000A /* MSA data register: low word of i-store */ #define DSP_ReadAndClear 0x000C /* MSA read and clear data register */ #define DSP_Interrupt 0x000E /* Interrupt register (IPC source) */
typedefstruct { unsignedchar Dma:3; /* RW: DMA channel selection */ unsignedchar NumTransfers:2; /* RW: Maximum # of transfers once being granted the ISA bus */ unsignedchar ReRequest:2; /* RW: Minimum delay between releasing the ISA bus and requesting it again */ unsignedchar MEMCS16:1; /* RW: ISA signal MEMCS16: 0=disabled, 1=enabled */
} DSP_BUSMASTER_CFG_1;
/* Component masks that are defined in dspmgr.h */ #define MW_ADC_MASK 0x0001 #define MW_AIC2_MASK 0x0006 #define MW_MIDI_MASK 0x0008 #define MW_CDDAC_MASK 0x8001 #define MW_AIC1_MASK 0xE006 #define MW_UART_MASK 0xE00A #define MW_ACI_MASK 0xE00B
/* * Definition of 3780i configuration structure. Unless otherwise stated, * these values are provided as input to the 3780i support layer. At present, * the only values maintained by the 3780i support layer are the saved UART * registers.
*/ typedefstruct _DSP_3780I_CONFIG_SETTINGS {
/* Location of base configuration register */ unsignedshort usBaseConfigIO;
/* Enables for various DSP components */ int bDSPEnabled; int bModemEnabled; int bInterruptClaimed;
/* IRQ, DMA, and Base I/O addresses for various DSP components */ unsignedshort usDspIrq; unsignedshort usDspDma; unsignedshort usDspBaseIO; unsignedshort usUartIrq; unsignedshort usUartBaseIO;
/* IRQ modes for various DSP components */ int bDspIrqActiveLow; int bUartIrqActiveLow; int bDspIrqPulse; int bUartIrqPulse;
/* Adapter specific 3780i settings */ unsignedshort usNumTransfers; unsignedshort usReRequest; int bEnableMEMCS16; unsignedshort usIsaMemCmdWidth; int bGateIOCHRDY; int bEnablePwrMgmt; unsignedshort usHBusTimerLoadValue; int bDisableLBusTimeout; unsignedshort usN_Divisor; unsignedshort usM_Multiplier; int bPllBypass; unsignedshort usChipletEnable; /* Used with the chip reset register to enable specific chiplets */
/* Saved UART registers. These are maintained by the 3780i support layer. */ int bUartSaved; /* True after a successful save of the UART registers */ unsignedchar ucIER; /* Interrupt enable register */ unsignedchar ucFCR; /* FIFO control register */ unsignedchar ucLCR; /* Line control register */ unsignedchar ucMCR; /* Modem control register */ unsignedchar ucSCR; /* Scratch register */ unsignedchar ucDLL; /* Divisor latch, low byte */ unsignedchar ucDLM; /* Divisor latch, high byte */
} DSP_3780I_CONFIG_SETTINGS;
/* 3780i support functions */ int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings, unsignedshort *pIrqMap, unsignedshort *pDmaMap); int dsp3780I_DisableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings); int dsp3780I_Reset(DSP_3780I_CONFIG_SETTINGS * pSettings); int dsp3780I_Run(DSP_3780I_CONFIG_SETTINGS * pSettings); int dsp3780I_ReadDStore(unsignedshort usDspBaseIO, void __user *pvBuffer, unsigned uCount, unsignedlong ulDSPAddr); int dsp3780I_ReadAndClearDStore(unsignedshort usDspBaseIO, void __user *pvBuffer, unsigned uCount, unsignedlong ulDSPAddr); int dsp3780I_WriteDStore(unsignedshort usDspBaseIO, void __user *pvBuffer, unsigned uCount, unsignedlong ulDSPAddr); int dsp3780I_ReadIStore(unsignedshort usDspBaseIO, void __user *pvBuffer, unsigned uCount, unsignedlong ulDSPAddr); int dsp3780I_WriteIStore(unsignedshort usDspBaseIO, void __user *pvBuffer, unsigned uCount, unsignedlong ulDSPAddr); unsignedshort dsp3780I_ReadMsaCfg(unsignedshort usDspBaseIO, unsignedlong ulMsaAddr); void dsp3780I_WriteMsaCfg(unsignedshort usDspBaseIO, unsignedlong ulMsaAddr, unsignedshort usValue); int dsp3780I_GetIPCSource(unsignedshort usDspBaseIO, unsignedshort *pusIPCSource);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.