Back to home page

OSCL-LXR

 
 

    


0001 /*
0002 *
0003 * tp3780i.h -- declarations for tp3780i.c
0004 *
0005 *
0006 * Written By: Mike Sullivan IBM Corporation
0007 *
0008 * Copyright (C) 1999 IBM Corporation
0009 *
0010 * This program is free software; you can redistribute it and/or modify
0011 * it under the terms of the GNU General Public License as published by
0012 * the Free Software Foundation; either version 2 of the License, or
0013 * (at your option) any later version.
0014 *
0015 * This program is distributed in the hope that it will be useful,
0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0018 * GNU General Public License for more details.
0019 *
0020 * NO WARRANTY
0021 * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
0022 * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
0023 * LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
0024 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
0025 * solely responsible for determining the appropriateness of using and
0026 * distributing the Program and assumes all risks associated with its
0027 * exercise of rights under this Agreement, including but not limited to
0028 * the risks and costs of program errors, damage to or loss of data,
0029 * programs or equipment, and unavailability or interruption of operations.
0030 *
0031 * DISCLAIMER OF LIABILITY
0032 * NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
0033 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0034 * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
0035 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
0036 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
0037 * USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
0038 * HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
0039 *
0040 * You should have received a copy of the GNU General Public License
0041 * along with this program; if not, write to the Free Software
0042 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0043 *
0044 *
0045 * 10/23/2000 - Alpha Release
0046 *   First release to the public
0047 */
0048 
0049 #ifndef _LINUX_TP3780I_H
0050 #define _LINUX_TP3780I_H
0051 
0052 #include <asm/io.h>
0053 #include "mwavepub.h"
0054 
0055 
0056 /* DSP abilities constants for 3780i based Thinkpads */
0057 #define TP_ABILITIES_INTS_PER_SEC       39160800
0058 #define TP_ABILITIES_DATA_SIZE          32768
0059 #define TP_ABILITIES_INST_SIZE          32768
0060 #define TP_ABILITIES_MWAVEOS_NAME       "mwaveos0700.dsp"
0061 #define TP_ABILITIES_BIOSTASK_NAME      "mwbio701.dsp"
0062 
0063 
0064 /* DSP configuration values for 3780i based Thinkpads */
0065 #define TP_CFG_NumTransfers     3   /* 16 transfers */
0066 #define TP_CFG_RerequestTimer   1   /* 2 usec */
0067 #define TP_CFG_MEMCS16          0   /* Disabled, 16-bit memory assumed */
0068 #define TP_CFG_IsaMemCmdWidth   3   /* 295 nsec (16-bit) */
0069 #define TP_CFG_GateIOCHRDY      0   /* No IOCHRDY gating */
0070 #define TP_CFG_EnablePwrMgmt    1   /* Enable low poser suspend/resume */
0071 #define TP_CFG_HBusTimerValue 255   /* HBus timer load value */
0072 #define TP_CFG_DisableLBusTimeout 0 /* Enable LBus timeout */
0073 #define TP_CFG_N_Divisor       32   /* Clock = 39.1608 Mhz */
0074 #define TP_CFG_M_Multiplier    37   /* " */
0075 #define TP_CFG_PllBypass        0   /* don't bypass */
0076 #define TP_CFG_ChipletEnable 0xFFFF /* Enable all chiplets */
0077 
0078 typedef struct {
0079     int bDSPEnabled;
0080     int bShareDspIrq;
0081     int bShareUartIrq;
0082     DSP_3780I_CONFIG_SETTINGS rDspSettings;
0083 } THINKPAD_BD_DATA;
0084 
0085 int tp3780I_InitializeBoardData(THINKPAD_BD_DATA * pBDData);
0086 int tp3780I_CalcResources(THINKPAD_BD_DATA * pBDData);
0087 int tp3780I_ClaimResources(THINKPAD_BD_DATA * pBDData);
0088 int tp3780I_ReleaseResources(THINKPAD_BD_DATA * pBDData);
0089 int tp3780I_EnableDSP(THINKPAD_BD_DATA * pBDData);
0090 int tp3780I_DisableDSP(THINKPAD_BD_DATA * pBDData);
0091 int tp3780I_ResetDSP(THINKPAD_BD_DATA * pBDData);
0092 int tp3780I_StartDSP(THINKPAD_BD_DATA * pBDData);
0093 int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbilities);
0094 void tp3780I_Cleanup(THINKPAD_BD_DATA *pBDData);
0095 int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
0096                                void __user *pvBuffer, unsigned int uCount,
0097                                unsigned long ulDSPAddr);
0098 int tp3780I_ReadWriteDspIStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
0099                                void __user *pvBuffer, unsigned int uCount,
0100                                unsigned long ulDSPAddr);
0101 
0102 
0103 #endif