linux/drivers/char/mwave/3780i.h

/*
*
* 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
#define DSP_IsaSlaveStatus
#define DSP_ConfigAddress
#define DSP_ConfigData
#define DSP_HBridgeControl
#define DSP_MsaAddrLow
#define DSP_MsaAddrHigh
#define DSP_MsaDataDSISHigh
#define DSP_MsaDataISLow
#define DSP_ReadAndClear
#define DSP_Interrupt

DSP_ISA_SLAVE_CONTROL;


DSP_HBRIDGE_CONTROL;


/* DSP register indexes used with the configuration register address (index) register */
#define DSP_UartCfg1Index
#define DSP_UartCfg2Index
#define DSP_HBridgeCfg1Index
#define DSP_HBridgeCfg2Index
#define DSP_BusMasterCfg1Index
#define DSP_BusMasterCfg2Index
#define DSP_IsaProtCfgIndex
#define DSP_PowerMgCfgIndex
#define DSP_HBusTimerCfgIndex

DSP_UART_CFG_1;

DSP_UART_CFG_2;

DSP_HBRIDGE_CFG_1;

DSP_HBRIDGE_CFG_2;


DSP_BUSMASTER_CFG_1;

DSP_BUSMASTER_CFG_2;


DSP_ISA_PROT_CFG;

DSP_POWER_MGMT_CFG;

DSP_HBUS_TIMER_CFG;



/* DSP registers that exist in MSA I/O space */
#define DSP_ChipID
#define DSP_MspBootDomain
#define DSP_LBusTimeoutDisable
#define DSP_ClockControl_1
#define DSP_ClockControl_2
#define DSP_ChipReset
#define DSP_GpioModeControl_15_8
#define DSP_GpioDriverEnable_15_8
#define DSP_GpioOutputData_15_8

DSP_BOOT_DOMAIN;

DSP_LBUS_TIMEOUT_DISABLE;

DSP_CHIP_RESET;

DSP_CLOCK_CONTROL_1;

DSP_CLOCK_CONTROL_2;

DSP_GPIO_OUTPUT_DATA_15_8;

DSP_GPIO_DRIVER_ENABLE_15_8;

DSP_GPIO_MODE_15_8;

/* Component masks that are defined in dspmgr.h */
#define MW_ADC_MASK
#define MW_AIC2_MASK
#define MW_MIDI_MASK
#define MW_CDDAC_MASK
#define MW_AIC1_MASK
#define MW_UART_MASK
#define MW_ACI_MASK

/*
* 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.
*/
DSP_3780I_CONFIG_SETTINGS;


/* 3780i support functions */
int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings,
                       unsigned short *pIrqMap,
                       unsigned short *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(unsigned short usDspBaseIO, void __user *pvBuffer,
                        unsigned uCount, unsigned long ulDSPAddr);
int dsp3780I_ReadAndClearDStore(unsigned short usDspBaseIO,
                                void __user *pvBuffer, unsigned uCount,
                                unsigned long ulDSPAddr);
int dsp3780I_WriteDStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                         unsigned uCount, unsigned long ulDSPAddr);
int dsp3780I_ReadIStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                        unsigned uCount, unsigned long ulDSPAddr);
int dsp3780I_WriteIStore(unsigned short usDspBaseIO, void __user *pvBuffer,
                         unsigned uCount, unsigned long ulDSPAddr);
unsigned short dsp3780I_ReadMsaCfg(unsigned short usDspBaseIO,
                                   unsigned long ulMsaAddr);
void dsp3780I_WriteMsaCfg(unsigned short usDspBaseIO,
                          unsigned long ulMsaAddr, unsigned short usValue);
int dsp3780I_GetIPCSource(unsigned short usDspBaseIO,
                          unsigned short *pusIPCSource);

/* I/O port access macros */
#define MKWORD(var)
#define MKBYTE(var)

#define WriteMsaCfg(addr,value)
#define ReadMsaCfg(addr)
#define WriteGenCfg(index,value)
#define ReadGenCfg(index)

#define InWordDsp(index)
#define InByteDsp(index)
#define OutWordDsp(index,value)
#define OutByteDsp(index,value)

#endif