162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci#ifndef __SOUND_CS46XX_H 362306a36Sopenharmony_ci#define __SOUND_CS46XX_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci/* 662306a36Sopenharmony_ci * Copyright (c) by Jaroslav Kysela <perex@perex.cz>, 762306a36Sopenharmony_ci * Cirrus Logic, Inc. 862306a36Sopenharmony_ci * Definitions for Cirrus Logic CS46xx chips 962306a36Sopenharmony_ci */ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#include <sound/pcm.h> 1262306a36Sopenharmony_ci#include <sound/pcm-indirect.h> 1362306a36Sopenharmony_ci#include <sound/rawmidi.h> 1462306a36Sopenharmony_ci#include <sound/ac97_codec.h> 1562306a36Sopenharmony_ci#include "cs46xx_dsp_spos.h" 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci/* 1862306a36Sopenharmony_ci * Direct registers 1962306a36Sopenharmony_ci */ 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci/* 2262306a36Sopenharmony_ci * The following define the offsets of the registers accessed via base address 2362306a36Sopenharmony_ci * register zero on the CS46xx part. 2462306a36Sopenharmony_ci */ 2562306a36Sopenharmony_ci#define BA0_HISR 0x00000000 2662306a36Sopenharmony_ci#define BA0_HSR0 0x00000004 2762306a36Sopenharmony_ci#define BA0_HICR 0x00000008 2862306a36Sopenharmony_ci#define BA0_DMSR 0x00000100 2962306a36Sopenharmony_ci#define BA0_HSAR 0x00000110 3062306a36Sopenharmony_ci#define BA0_HDAR 0x00000114 3162306a36Sopenharmony_ci#define BA0_HDMR 0x00000118 3262306a36Sopenharmony_ci#define BA0_HDCR 0x0000011C 3362306a36Sopenharmony_ci#define BA0_PFMC 0x00000200 3462306a36Sopenharmony_ci#define BA0_PFCV1 0x00000204 3562306a36Sopenharmony_ci#define BA0_PFCV2 0x00000208 3662306a36Sopenharmony_ci#define BA0_PCICFG00 0x00000300 3762306a36Sopenharmony_ci#define BA0_PCICFG04 0x00000304 3862306a36Sopenharmony_ci#define BA0_PCICFG08 0x00000308 3962306a36Sopenharmony_ci#define BA0_PCICFG0C 0x0000030C 4062306a36Sopenharmony_ci#define BA0_PCICFG10 0x00000310 4162306a36Sopenharmony_ci#define BA0_PCICFG14 0x00000314 4262306a36Sopenharmony_ci#define BA0_PCICFG18 0x00000318 4362306a36Sopenharmony_ci#define BA0_PCICFG1C 0x0000031C 4462306a36Sopenharmony_ci#define BA0_PCICFG20 0x00000320 4562306a36Sopenharmony_ci#define BA0_PCICFG24 0x00000324 4662306a36Sopenharmony_ci#define BA0_PCICFG28 0x00000328 4762306a36Sopenharmony_ci#define BA0_PCICFG2C 0x0000032C 4862306a36Sopenharmony_ci#define BA0_PCICFG30 0x00000330 4962306a36Sopenharmony_ci#define BA0_PCICFG34 0x00000334 5062306a36Sopenharmony_ci#define BA0_PCICFG38 0x00000338 5162306a36Sopenharmony_ci#define BA0_PCICFG3C 0x0000033C 5262306a36Sopenharmony_ci#define BA0_CLKCR1 0x00000400 5362306a36Sopenharmony_ci#define BA0_CLKCR2 0x00000404 5462306a36Sopenharmony_ci#define BA0_PLLM 0x00000408 5562306a36Sopenharmony_ci#define BA0_PLLCC 0x0000040C 5662306a36Sopenharmony_ci#define BA0_FRR 0x00000410 5762306a36Sopenharmony_ci#define BA0_CFL1 0x00000414 5862306a36Sopenharmony_ci#define BA0_CFL2 0x00000418 5962306a36Sopenharmony_ci#define BA0_SERMC1 0x00000420 6062306a36Sopenharmony_ci#define BA0_SERMC2 0x00000424 6162306a36Sopenharmony_ci#define BA0_SERC1 0x00000428 6262306a36Sopenharmony_ci#define BA0_SERC2 0x0000042C 6362306a36Sopenharmony_ci#define BA0_SERC3 0x00000430 6462306a36Sopenharmony_ci#define BA0_SERC4 0x00000434 6562306a36Sopenharmony_ci#define BA0_SERC5 0x00000438 6662306a36Sopenharmony_ci#define BA0_SERBSP 0x0000043C 6762306a36Sopenharmony_ci#define BA0_SERBST 0x00000440 6862306a36Sopenharmony_ci#define BA0_SERBCM 0x00000444 6962306a36Sopenharmony_ci#define BA0_SERBAD 0x00000448 7062306a36Sopenharmony_ci#define BA0_SERBCF 0x0000044C 7162306a36Sopenharmony_ci#define BA0_SERBWP 0x00000450 7262306a36Sopenharmony_ci#define BA0_SERBRP 0x00000454 7362306a36Sopenharmony_ci#ifndef NO_CS4612 7462306a36Sopenharmony_ci#define BA0_ASER_FADDR 0x00000458 7562306a36Sopenharmony_ci#endif 7662306a36Sopenharmony_ci#define BA0_ACCTL 0x00000460 7762306a36Sopenharmony_ci#define BA0_ACSTS 0x00000464 7862306a36Sopenharmony_ci#define BA0_ACOSV 0x00000468 7962306a36Sopenharmony_ci#define BA0_ACCAD 0x0000046C 8062306a36Sopenharmony_ci#define BA0_ACCDA 0x00000470 8162306a36Sopenharmony_ci#define BA0_ACISV 0x00000474 8262306a36Sopenharmony_ci#define BA0_ACSAD 0x00000478 8362306a36Sopenharmony_ci#define BA0_ACSDA 0x0000047C 8462306a36Sopenharmony_ci#define BA0_JSPT 0x00000480 8562306a36Sopenharmony_ci#define BA0_JSCTL 0x00000484 8662306a36Sopenharmony_ci#define BA0_JSC1 0x00000488 8762306a36Sopenharmony_ci#define BA0_JSC2 0x0000048C 8862306a36Sopenharmony_ci#define BA0_MIDCR 0x00000490 8962306a36Sopenharmony_ci#define BA0_MIDSR 0x00000494 9062306a36Sopenharmony_ci#define BA0_MIDWP 0x00000498 9162306a36Sopenharmony_ci#define BA0_MIDRP 0x0000049C 9262306a36Sopenharmony_ci#define BA0_JSIO 0x000004A0 9362306a36Sopenharmony_ci#ifndef NO_CS4612 9462306a36Sopenharmony_ci#define BA0_ASER_MASTER 0x000004A4 9562306a36Sopenharmony_ci#endif 9662306a36Sopenharmony_ci#define BA0_CFGI 0x000004B0 9762306a36Sopenharmony_ci#define BA0_SSVID 0x000004B4 9862306a36Sopenharmony_ci#define BA0_GPIOR 0x000004B8 9962306a36Sopenharmony_ci#ifndef NO_CS4612 10062306a36Sopenharmony_ci#define BA0_EGPIODR 0x000004BC 10162306a36Sopenharmony_ci#define BA0_EGPIOPTR 0x000004C0 10262306a36Sopenharmony_ci#define BA0_EGPIOTR 0x000004C4 10362306a36Sopenharmony_ci#define BA0_EGPIOWR 0x000004C8 10462306a36Sopenharmony_ci#define BA0_EGPIOSR 0x000004CC 10562306a36Sopenharmony_ci#define BA0_SERC6 0x000004D0 10662306a36Sopenharmony_ci#define BA0_SERC7 0x000004D4 10762306a36Sopenharmony_ci#define BA0_SERACC 0x000004D8 10862306a36Sopenharmony_ci#define BA0_ACCTL2 0x000004E0 10962306a36Sopenharmony_ci#define BA0_ACSTS2 0x000004E4 11062306a36Sopenharmony_ci#define BA0_ACOSV2 0x000004E8 11162306a36Sopenharmony_ci#define BA0_ACCAD2 0x000004EC 11262306a36Sopenharmony_ci#define BA0_ACCDA2 0x000004F0 11362306a36Sopenharmony_ci#define BA0_ACISV2 0x000004F4 11462306a36Sopenharmony_ci#define BA0_ACSAD2 0x000004F8 11562306a36Sopenharmony_ci#define BA0_ACSDA2 0x000004FC 11662306a36Sopenharmony_ci#define BA0_IOTAC0 0x00000500 11762306a36Sopenharmony_ci#define BA0_IOTAC1 0x00000504 11862306a36Sopenharmony_ci#define BA0_IOTAC2 0x00000508 11962306a36Sopenharmony_ci#define BA0_IOTAC3 0x0000050C 12062306a36Sopenharmony_ci#define BA0_IOTAC4 0x00000510 12162306a36Sopenharmony_ci#define BA0_IOTAC5 0x00000514 12262306a36Sopenharmony_ci#define BA0_IOTAC6 0x00000518 12362306a36Sopenharmony_ci#define BA0_IOTAC7 0x0000051C 12462306a36Sopenharmony_ci#define BA0_IOTAC8 0x00000520 12562306a36Sopenharmony_ci#define BA0_IOTAC9 0x00000524 12662306a36Sopenharmony_ci#define BA0_IOTAC10 0x00000528 12762306a36Sopenharmony_ci#define BA0_IOTAC11 0x0000052C 12862306a36Sopenharmony_ci#define BA0_IOTFR0 0x00000540 12962306a36Sopenharmony_ci#define BA0_IOTFR1 0x00000544 13062306a36Sopenharmony_ci#define BA0_IOTFR2 0x00000548 13162306a36Sopenharmony_ci#define BA0_IOTFR3 0x0000054C 13262306a36Sopenharmony_ci#define BA0_IOTFR4 0x00000550 13362306a36Sopenharmony_ci#define BA0_IOTFR5 0x00000554 13462306a36Sopenharmony_ci#define BA0_IOTFR6 0x00000558 13562306a36Sopenharmony_ci#define BA0_IOTFR7 0x0000055C 13662306a36Sopenharmony_ci#define BA0_IOTFIFO 0x00000580 13762306a36Sopenharmony_ci#define BA0_IOTRRD 0x00000584 13862306a36Sopenharmony_ci#define BA0_IOTFP 0x00000588 13962306a36Sopenharmony_ci#define BA0_IOTCR 0x0000058C 14062306a36Sopenharmony_ci#define BA0_DPCID 0x00000590 14162306a36Sopenharmony_ci#define BA0_DPCIA 0x00000594 14262306a36Sopenharmony_ci#define BA0_DPCIC 0x00000598 14362306a36Sopenharmony_ci#define BA0_PCPCIR 0x00000600 14462306a36Sopenharmony_ci#define BA0_PCPCIG 0x00000604 14562306a36Sopenharmony_ci#define BA0_PCPCIEN 0x00000608 14662306a36Sopenharmony_ci#define BA0_EPCIPMC 0x00000610 14762306a36Sopenharmony_ci#endif 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ci/* 15062306a36Sopenharmony_ci * The following define the offsets of the registers and memories accessed via 15162306a36Sopenharmony_ci * base address register one on the CS46xx part. 15262306a36Sopenharmony_ci */ 15362306a36Sopenharmony_ci#define BA1_SP_DMEM0 0x00000000 15462306a36Sopenharmony_ci#define BA1_SP_DMEM1 0x00010000 15562306a36Sopenharmony_ci#define BA1_SP_PMEM 0x00020000 15662306a36Sopenharmony_ci#define BA1_SP_REG 0x00030000 15762306a36Sopenharmony_ci#define BA1_SPCR 0x00030000 15862306a36Sopenharmony_ci#define BA1_DREG 0x00030004 15962306a36Sopenharmony_ci#define BA1_DSRWP 0x00030008 16062306a36Sopenharmony_ci#define BA1_TWPR 0x0003000C 16162306a36Sopenharmony_ci#define BA1_SPWR 0x00030010 16262306a36Sopenharmony_ci#define BA1_SPIR 0x00030014 16362306a36Sopenharmony_ci#define BA1_FGR1 0x00030020 16462306a36Sopenharmony_ci#define BA1_SPCS 0x00030028 16562306a36Sopenharmony_ci#define BA1_SDSR 0x0003002C 16662306a36Sopenharmony_ci#define BA1_FRMT 0x00030030 16762306a36Sopenharmony_ci#define BA1_FRCC 0x00030034 16862306a36Sopenharmony_ci#define BA1_FRSC 0x00030038 16962306a36Sopenharmony_ci#define BA1_OMNI_MEM 0x000E0000 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ci 17262306a36Sopenharmony_ci/* 17362306a36Sopenharmony_ci * The following defines are for the flags in the host interrupt status 17462306a36Sopenharmony_ci * register. 17562306a36Sopenharmony_ci */ 17662306a36Sopenharmony_ci#define HISR_VC_MASK 0x0000FFFF 17762306a36Sopenharmony_ci#define HISR_VC0 0x00000001 17862306a36Sopenharmony_ci#define HISR_VC1 0x00000002 17962306a36Sopenharmony_ci#define HISR_VC2 0x00000004 18062306a36Sopenharmony_ci#define HISR_VC3 0x00000008 18162306a36Sopenharmony_ci#define HISR_VC4 0x00000010 18262306a36Sopenharmony_ci#define HISR_VC5 0x00000020 18362306a36Sopenharmony_ci#define HISR_VC6 0x00000040 18462306a36Sopenharmony_ci#define HISR_VC7 0x00000080 18562306a36Sopenharmony_ci#define HISR_VC8 0x00000100 18662306a36Sopenharmony_ci#define HISR_VC9 0x00000200 18762306a36Sopenharmony_ci#define HISR_VC10 0x00000400 18862306a36Sopenharmony_ci#define HISR_VC11 0x00000800 18962306a36Sopenharmony_ci#define HISR_VC12 0x00001000 19062306a36Sopenharmony_ci#define HISR_VC13 0x00002000 19162306a36Sopenharmony_ci#define HISR_VC14 0x00004000 19262306a36Sopenharmony_ci#define HISR_VC15 0x00008000 19362306a36Sopenharmony_ci#define HISR_INT0 0x00010000 19462306a36Sopenharmony_ci#define HISR_INT1 0x00020000 19562306a36Sopenharmony_ci#define HISR_DMAI 0x00040000 19662306a36Sopenharmony_ci#define HISR_FROVR 0x00080000 19762306a36Sopenharmony_ci#define HISR_MIDI 0x00100000 19862306a36Sopenharmony_ci#ifdef NO_CS4612 19962306a36Sopenharmony_ci#define HISR_RESERVED 0x0FE00000 20062306a36Sopenharmony_ci#else 20162306a36Sopenharmony_ci#define HISR_SBINT 0x00200000 20262306a36Sopenharmony_ci#define HISR_RESERVED 0x0FC00000 20362306a36Sopenharmony_ci#endif 20462306a36Sopenharmony_ci#define HISR_H0P 0x40000000 20562306a36Sopenharmony_ci#define HISR_INTENA 0x80000000 20662306a36Sopenharmony_ci 20762306a36Sopenharmony_ci/* 20862306a36Sopenharmony_ci * The following defines are for the flags in the host signal register 0. 20962306a36Sopenharmony_ci */ 21062306a36Sopenharmony_ci#define HSR0_VC_MASK 0xFFFFFFFF 21162306a36Sopenharmony_ci#define HSR0_VC16 0x00000001 21262306a36Sopenharmony_ci#define HSR0_VC17 0x00000002 21362306a36Sopenharmony_ci#define HSR0_VC18 0x00000004 21462306a36Sopenharmony_ci#define HSR0_VC19 0x00000008 21562306a36Sopenharmony_ci#define HSR0_VC20 0x00000010 21662306a36Sopenharmony_ci#define HSR0_VC21 0x00000020 21762306a36Sopenharmony_ci#define HSR0_VC22 0x00000040 21862306a36Sopenharmony_ci#define HSR0_VC23 0x00000080 21962306a36Sopenharmony_ci#define HSR0_VC24 0x00000100 22062306a36Sopenharmony_ci#define HSR0_VC25 0x00000200 22162306a36Sopenharmony_ci#define HSR0_VC26 0x00000400 22262306a36Sopenharmony_ci#define HSR0_VC27 0x00000800 22362306a36Sopenharmony_ci#define HSR0_VC28 0x00001000 22462306a36Sopenharmony_ci#define HSR0_VC29 0x00002000 22562306a36Sopenharmony_ci#define HSR0_VC30 0x00004000 22662306a36Sopenharmony_ci#define HSR0_VC31 0x00008000 22762306a36Sopenharmony_ci#define HSR0_VC32 0x00010000 22862306a36Sopenharmony_ci#define HSR0_VC33 0x00020000 22962306a36Sopenharmony_ci#define HSR0_VC34 0x00040000 23062306a36Sopenharmony_ci#define HSR0_VC35 0x00080000 23162306a36Sopenharmony_ci#define HSR0_VC36 0x00100000 23262306a36Sopenharmony_ci#define HSR0_VC37 0x00200000 23362306a36Sopenharmony_ci#define HSR0_VC38 0x00400000 23462306a36Sopenharmony_ci#define HSR0_VC39 0x00800000 23562306a36Sopenharmony_ci#define HSR0_VC40 0x01000000 23662306a36Sopenharmony_ci#define HSR0_VC41 0x02000000 23762306a36Sopenharmony_ci#define HSR0_VC42 0x04000000 23862306a36Sopenharmony_ci#define HSR0_VC43 0x08000000 23962306a36Sopenharmony_ci#define HSR0_VC44 0x10000000 24062306a36Sopenharmony_ci#define HSR0_VC45 0x20000000 24162306a36Sopenharmony_ci#define HSR0_VC46 0x40000000 24262306a36Sopenharmony_ci#define HSR0_VC47 0x80000000 24362306a36Sopenharmony_ci 24462306a36Sopenharmony_ci/* 24562306a36Sopenharmony_ci * The following defines are for the flags in the host interrupt control 24662306a36Sopenharmony_ci * register. 24762306a36Sopenharmony_ci */ 24862306a36Sopenharmony_ci#define HICR_IEV 0x00000001 24962306a36Sopenharmony_ci#define HICR_CHGM 0x00000002 25062306a36Sopenharmony_ci 25162306a36Sopenharmony_ci/* 25262306a36Sopenharmony_ci * The following defines are for the flags in the DMA status register. 25362306a36Sopenharmony_ci */ 25462306a36Sopenharmony_ci#define DMSR_HP 0x00000001 25562306a36Sopenharmony_ci#define DMSR_HR 0x00000002 25662306a36Sopenharmony_ci#define DMSR_SP 0x00000004 25762306a36Sopenharmony_ci#define DMSR_SR 0x00000008 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci/* 26062306a36Sopenharmony_ci * The following defines are for the flags in the host DMA source address 26162306a36Sopenharmony_ci * register. 26262306a36Sopenharmony_ci */ 26362306a36Sopenharmony_ci#define HSAR_HOST_ADDR_MASK 0xFFFFFFFF 26462306a36Sopenharmony_ci#define HSAR_DSP_ADDR_MASK 0x0000FFFF 26562306a36Sopenharmony_ci#define HSAR_MEMID_MASK 0x000F0000 26662306a36Sopenharmony_ci#define HSAR_MEMID_SP_DMEM0 0x00000000 26762306a36Sopenharmony_ci#define HSAR_MEMID_SP_DMEM1 0x00010000 26862306a36Sopenharmony_ci#define HSAR_MEMID_SP_PMEM 0x00020000 26962306a36Sopenharmony_ci#define HSAR_MEMID_SP_DEBUG 0x00030000 27062306a36Sopenharmony_ci#define HSAR_MEMID_OMNI_MEM 0x000E0000 27162306a36Sopenharmony_ci#define HSAR_END 0x40000000 27262306a36Sopenharmony_ci#define HSAR_ERR 0x80000000 27362306a36Sopenharmony_ci 27462306a36Sopenharmony_ci/* 27562306a36Sopenharmony_ci * The following defines are for the flags in the host DMA destination address 27662306a36Sopenharmony_ci * register. 27762306a36Sopenharmony_ci */ 27862306a36Sopenharmony_ci#define HDAR_HOST_ADDR_MASK 0xFFFFFFFF 27962306a36Sopenharmony_ci#define HDAR_DSP_ADDR_MASK 0x0000FFFF 28062306a36Sopenharmony_ci#define HDAR_MEMID_MASK 0x000F0000 28162306a36Sopenharmony_ci#define HDAR_MEMID_SP_DMEM0 0x00000000 28262306a36Sopenharmony_ci#define HDAR_MEMID_SP_DMEM1 0x00010000 28362306a36Sopenharmony_ci#define HDAR_MEMID_SP_PMEM 0x00020000 28462306a36Sopenharmony_ci#define HDAR_MEMID_SP_DEBUG 0x00030000 28562306a36Sopenharmony_ci#define HDAR_MEMID_OMNI_MEM 0x000E0000 28662306a36Sopenharmony_ci#define HDAR_END 0x40000000 28762306a36Sopenharmony_ci#define HDAR_ERR 0x80000000 28862306a36Sopenharmony_ci 28962306a36Sopenharmony_ci/* 29062306a36Sopenharmony_ci * The following defines are for the flags in the host DMA control register. 29162306a36Sopenharmony_ci */ 29262306a36Sopenharmony_ci#define HDMR_AC_MASK 0x0000F000 29362306a36Sopenharmony_ci#define HDMR_AC_8_16 0x00001000 29462306a36Sopenharmony_ci#define HDMR_AC_M_S 0x00002000 29562306a36Sopenharmony_ci#define HDMR_AC_B_L 0x00004000 29662306a36Sopenharmony_ci#define HDMR_AC_S_U 0x00008000 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_ci/* 29962306a36Sopenharmony_ci * The following defines are for the flags in the host DMA control register. 30062306a36Sopenharmony_ci */ 30162306a36Sopenharmony_ci#define HDCR_COUNT_MASK 0x000003FF 30262306a36Sopenharmony_ci#define HDCR_DONE 0x00004000 30362306a36Sopenharmony_ci#define HDCR_OPT 0x00008000 30462306a36Sopenharmony_ci#define HDCR_WBD 0x00400000 30562306a36Sopenharmony_ci#define HDCR_WBS 0x00800000 30662306a36Sopenharmony_ci#define HDCR_DMS_MASK 0x07000000 30762306a36Sopenharmony_ci#define HDCR_DMS_LINEAR 0x00000000 30862306a36Sopenharmony_ci#define HDCR_DMS_16_DWORDS 0x01000000 30962306a36Sopenharmony_ci#define HDCR_DMS_32_DWORDS 0x02000000 31062306a36Sopenharmony_ci#define HDCR_DMS_64_DWORDS 0x03000000 31162306a36Sopenharmony_ci#define HDCR_DMS_128_DWORDS 0x04000000 31262306a36Sopenharmony_ci#define HDCR_DMS_256_DWORDS 0x05000000 31362306a36Sopenharmony_ci#define HDCR_DMS_512_DWORDS 0x06000000 31462306a36Sopenharmony_ci#define HDCR_DMS_1024_DWORDS 0x07000000 31562306a36Sopenharmony_ci#define HDCR_DH 0x08000000 31662306a36Sopenharmony_ci#define HDCR_SMS_MASK 0x70000000 31762306a36Sopenharmony_ci#define HDCR_SMS_LINEAR 0x00000000 31862306a36Sopenharmony_ci#define HDCR_SMS_16_DWORDS 0x10000000 31962306a36Sopenharmony_ci#define HDCR_SMS_32_DWORDS 0x20000000 32062306a36Sopenharmony_ci#define HDCR_SMS_64_DWORDS 0x30000000 32162306a36Sopenharmony_ci#define HDCR_SMS_128_DWORDS 0x40000000 32262306a36Sopenharmony_ci#define HDCR_SMS_256_DWORDS 0x50000000 32362306a36Sopenharmony_ci#define HDCR_SMS_512_DWORDS 0x60000000 32462306a36Sopenharmony_ci#define HDCR_SMS_1024_DWORDS 0x70000000 32562306a36Sopenharmony_ci#define HDCR_SH 0x80000000 32662306a36Sopenharmony_ci#define HDCR_COUNT_SHIFT 0 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_ci/* 32962306a36Sopenharmony_ci * The following defines are for the flags in the performance monitor control 33062306a36Sopenharmony_ci * register. 33162306a36Sopenharmony_ci */ 33262306a36Sopenharmony_ci#define PFMC_C1SS_MASK 0x0000001F 33362306a36Sopenharmony_ci#define PFMC_C1EV 0x00000020 33462306a36Sopenharmony_ci#define PFMC_C1RS 0x00008000 33562306a36Sopenharmony_ci#define PFMC_C2SS_MASK 0x001F0000 33662306a36Sopenharmony_ci#define PFMC_C2EV 0x00200000 33762306a36Sopenharmony_ci#define PFMC_C2RS 0x80000000 33862306a36Sopenharmony_ci#define PFMC_C1SS_SHIFT 0 33962306a36Sopenharmony_ci#define PFMC_C2SS_SHIFT 16 34062306a36Sopenharmony_ci#define PFMC_BUS_GRANT 0 34162306a36Sopenharmony_ci#define PFMC_GRANT_AFTER_REQ 1 34262306a36Sopenharmony_ci#define PFMC_TRANSACTION 2 34362306a36Sopenharmony_ci#define PFMC_DWORD_TRANSFER 3 34462306a36Sopenharmony_ci#define PFMC_SLAVE_READ 4 34562306a36Sopenharmony_ci#define PFMC_SLAVE_WRITE 5 34662306a36Sopenharmony_ci#define PFMC_PREEMPTION 6 34762306a36Sopenharmony_ci#define PFMC_DISCONNECT_RETRY 7 34862306a36Sopenharmony_ci#define PFMC_INTERRUPT 8 34962306a36Sopenharmony_ci#define PFMC_BUS_OWNERSHIP 9 35062306a36Sopenharmony_ci#define PFMC_TRANSACTION_LAG 10 35162306a36Sopenharmony_ci#define PFMC_PCI_CLOCK 11 35262306a36Sopenharmony_ci#define PFMC_SERIAL_CLOCK 12 35362306a36Sopenharmony_ci#define PFMC_SP_CLOCK 13 35462306a36Sopenharmony_ci 35562306a36Sopenharmony_ci/* 35662306a36Sopenharmony_ci * The following defines are for the flags in the performance counter value 1 35762306a36Sopenharmony_ci * register. 35862306a36Sopenharmony_ci */ 35962306a36Sopenharmony_ci#define PFCV1_PC1V_MASK 0xFFFFFFFF 36062306a36Sopenharmony_ci#define PFCV1_PC1V_SHIFT 0 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_ci/* 36362306a36Sopenharmony_ci * The following defines are for the flags in the performance counter value 2 36462306a36Sopenharmony_ci * register. 36562306a36Sopenharmony_ci */ 36662306a36Sopenharmony_ci#define PFCV2_PC2V_MASK 0xFFFFFFFF 36762306a36Sopenharmony_ci#define PFCV2_PC2V_SHIFT 0 36862306a36Sopenharmony_ci 36962306a36Sopenharmony_ci/* 37062306a36Sopenharmony_ci * The following defines are for the flags in the clock control register 1. 37162306a36Sopenharmony_ci */ 37262306a36Sopenharmony_ci#define CLKCR1_OSCS 0x00000001 37362306a36Sopenharmony_ci#define CLKCR1_OSCP 0x00000002 37462306a36Sopenharmony_ci#define CLKCR1_PLLSS_MASK 0x0000000C 37562306a36Sopenharmony_ci#define CLKCR1_PLLSS_SERIAL 0x00000000 37662306a36Sopenharmony_ci#define CLKCR1_PLLSS_CRYSTAL 0x00000004 37762306a36Sopenharmony_ci#define CLKCR1_PLLSS_PCI 0x00000008 37862306a36Sopenharmony_ci#define CLKCR1_PLLSS_RESERVED 0x0000000C 37962306a36Sopenharmony_ci#define CLKCR1_PLLP 0x00000010 38062306a36Sopenharmony_ci#define CLKCR1_SWCE 0x00000020 38162306a36Sopenharmony_ci#define CLKCR1_PLLOS 0x00000040 38262306a36Sopenharmony_ci 38362306a36Sopenharmony_ci/* 38462306a36Sopenharmony_ci * The following defines are for the flags in the clock control register 2. 38562306a36Sopenharmony_ci */ 38662306a36Sopenharmony_ci#define CLKCR2_PDIVS_MASK 0x0000000F 38762306a36Sopenharmony_ci#define CLKCR2_PDIVS_1 0x00000001 38862306a36Sopenharmony_ci#define CLKCR2_PDIVS_2 0x00000002 38962306a36Sopenharmony_ci#define CLKCR2_PDIVS_4 0x00000004 39062306a36Sopenharmony_ci#define CLKCR2_PDIVS_7 0x00000007 39162306a36Sopenharmony_ci#define CLKCR2_PDIVS_8 0x00000008 39262306a36Sopenharmony_ci#define CLKCR2_PDIVS_16 0x00000000 39362306a36Sopenharmony_ci 39462306a36Sopenharmony_ci/* 39562306a36Sopenharmony_ci * The following defines are for the flags in the PLL multiplier register. 39662306a36Sopenharmony_ci */ 39762306a36Sopenharmony_ci#define PLLM_MASK 0x000000FF 39862306a36Sopenharmony_ci#define PLLM_SHIFT 0 39962306a36Sopenharmony_ci 40062306a36Sopenharmony_ci/* 40162306a36Sopenharmony_ci * The following defines are for the flags in the PLL capacitor coefficient 40262306a36Sopenharmony_ci * register. 40362306a36Sopenharmony_ci */ 40462306a36Sopenharmony_ci#define PLLCC_CDR_MASK 0x00000007 40562306a36Sopenharmony_ci#ifndef NO_CS4610 40662306a36Sopenharmony_ci#define PLLCC_CDR_240_350_MHZ 0x00000000 40762306a36Sopenharmony_ci#define PLLCC_CDR_184_265_MHZ 0x00000001 40862306a36Sopenharmony_ci#define PLLCC_CDR_144_205_MHZ 0x00000002 40962306a36Sopenharmony_ci#define PLLCC_CDR_111_160_MHZ 0x00000003 41062306a36Sopenharmony_ci#define PLLCC_CDR_87_123_MHZ 0x00000004 41162306a36Sopenharmony_ci#define PLLCC_CDR_67_96_MHZ 0x00000005 41262306a36Sopenharmony_ci#define PLLCC_CDR_52_74_MHZ 0x00000006 41362306a36Sopenharmony_ci#define PLLCC_CDR_45_58_MHZ 0x00000007 41462306a36Sopenharmony_ci#endif 41562306a36Sopenharmony_ci#ifndef NO_CS4612 41662306a36Sopenharmony_ci#define PLLCC_CDR_271_398_MHZ 0x00000000 41762306a36Sopenharmony_ci#define PLLCC_CDR_227_330_MHZ 0x00000001 41862306a36Sopenharmony_ci#define PLLCC_CDR_167_239_MHZ 0x00000002 41962306a36Sopenharmony_ci#define PLLCC_CDR_150_215_MHZ 0x00000003 42062306a36Sopenharmony_ci#define PLLCC_CDR_107_154_MHZ 0x00000004 42162306a36Sopenharmony_ci#define PLLCC_CDR_98_140_MHZ 0x00000005 42262306a36Sopenharmony_ci#define PLLCC_CDR_73_104_MHZ 0x00000006 42362306a36Sopenharmony_ci#define PLLCC_CDR_63_90_MHZ 0x00000007 42462306a36Sopenharmony_ci#endif 42562306a36Sopenharmony_ci#define PLLCC_LPF_MASK 0x000000F8 42662306a36Sopenharmony_ci#ifndef NO_CS4610 42762306a36Sopenharmony_ci#define PLLCC_LPF_23850_60000_KHZ 0x00000000 42862306a36Sopenharmony_ci#define PLLCC_LPF_7960_26290_KHZ 0x00000008 42962306a36Sopenharmony_ci#define PLLCC_LPF_4160_10980_KHZ 0x00000018 43062306a36Sopenharmony_ci#define PLLCC_LPF_1740_4580_KHZ 0x00000038 43162306a36Sopenharmony_ci#define PLLCC_LPF_724_1910_KHZ 0x00000078 43262306a36Sopenharmony_ci#define PLLCC_LPF_317_798_KHZ 0x000000F8 43362306a36Sopenharmony_ci#endif 43462306a36Sopenharmony_ci#ifndef NO_CS4612 43562306a36Sopenharmony_ci#define PLLCC_LPF_25580_64530_KHZ 0x00000000 43662306a36Sopenharmony_ci#define PLLCC_LPF_14360_37270_KHZ 0x00000008 43762306a36Sopenharmony_ci#define PLLCC_LPF_6100_16020_KHZ 0x00000018 43862306a36Sopenharmony_ci#define PLLCC_LPF_2540_6690_KHZ 0x00000038 43962306a36Sopenharmony_ci#define PLLCC_LPF_1050_2780_KHZ 0x00000078 44062306a36Sopenharmony_ci#define PLLCC_LPF_450_1160_KHZ 0x000000F8 44162306a36Sopenharmony_ci#endif 44262306a36Sopenharmony_ci 44362306a36Sopenharmony_ci/* 44462306a36Sopenharmony_ci * The following defines are for the flags in the feature reporting register. 44562306a36Sopenharmony_ci */ 44662306a36Sopenharmony_ci#define FRR_FAB_MASK 0x00000003 44762306a36Sopenharmony_ci#define FRR_MASK_MASK 0x0000001C 44862306a36Sopenharmony_ci#ifdef NO_CS4612 44962306a36Sopenharmony_ci#define FRR_CFOP_MASK 0x000000E0 45062306a36Sopenharmony_ci#else 45162306a36Sopenharmony_ci#define FRR_CFOP_MASK 0x00000FE0 45262306a36Sopenharmony_ci#endif 45362306a36Sopenharmony_ci#define FRR_CFOP_NOT_DVD 0x00000020 45462306a36Sopenharmony_ci#define FRR_CFOP_A3D 0x00000040 45562306a36Sopenharmony_ci#define FRR_CFOP_128_PIN 0x00000080 45662306a36Sopenharmony_ci#ifndef NO_CS4612 45762306a36Sopenharmony_ci#define FRR_CFOP_CS4280 0x00000800 45862306a36Sopenharmony_ci#endif 45962306a36Sopenharmony_ci#define FRR_FAB_SHIFT 0 46062306a36Sopenharmony_ci#define FRR_MASK_SHIFT 2 46162306a36Sopenharmony_ci#define FRR_CFOP_SHIFT 5 46262306a36Sopenharmony_ci 46362306a36Sopenharmony_ci/* 46462306a36Sopenharmony_ci * The following defines are for the flags in the configuration load 1 46562306a36Sopenharmony_ci * register. 46662306a36Sopenharmony_ci */ 46762306a36Sopenharmony_ci#define CFL1_CLOCK_SOURCE_MASK 0x00000003 46862306a36Sopenharmony_ci#define CFL1_CLOCK_SOURCE_CS423X 0x00000000 46962306a36Sopenharmony_ci#define CFL1_CLOCK_SOURCE_AC97 0x00000001 47062306a36Sopenharmony_ci#define CFL1_CLOCK_SOURCE_CRYSTAL 0x00000002 47162306a36Sopenharmony_ci#define CFL1_CLOCK_SOURCE_DUAL_AC97 0x00000003 47262306a36Sopenharmony_ci#define CFL1_VALID_DATA_MASK 0x000000FF 47362306a36Sopenharmony_ci 47462306a36Sopenharmony_ci/* 47562306a36Sopenharmony_ci * The following defines are for the flags in the configuration load 2 47662306a36Sopenharmony_ci * register. 47762306a36Sopenharmony_ci */ 47862306a36Sopenharmony_ci#define CFL2_VALID_DATA_MASK 0x000000FF 47962306a36Sopenharmony_ci 48062306a36Sopenharmony_ci/* 48162306a36Sopenharmony_ci * The following defines are for the flags in the serial port master control 48262306a36Sopenharmony_ci * register 1. 48362306a36Sopenharmony_ci */ 48462306a36Sopenharmony_ci#define SERMC1_MSPE 0x00000001 48562306a36Sopenharmony_ci#define SERMC1_PTC_MASK 0x0000000E 48662306a36Sopenharmony_ci#define SERMC1_PTC_CS423X 0x00000000 48762306a36Sopenharmony_ci#define SERMC1_PTC_AC97 0x00000002 48862306a36Sopenharmony_ci#define SERMC1_PTC_DAC 0x00000004 48962306a36Sopenharmony_ci#define SERMC1_PLB 0x00000010 49062306a36Sopenharmony_ci#define SERMC1_XLB 0x00000020 49162306a36Sopenharmony_ci 49262306a36Sopenharmony_ci/* 49362306a36Sopenharmony_ci * The following defines are for the flags in the serial port master control 49462306a36Sopenharmony_ci * register 2. 49562306a36Sopenharmony_ci */ 49662306a36Sopenharmony_ci#define SERMC2_LROE 0x00000001 49762306a36Sopenharmony_ci#define SERMC2_MCOE 0x00000002 49862306a36Sopenharmony_ci#define SERMC2_MCDIV 0x00000004 49962306a36Sopenharmony_ci 50062306a36Sopenharmony_ci/* 50162306a36Sopenharmony_ci * The following defines are for the flags in the serial port 1 configuration 50262306a36Sopenharmony_ci * register. 50362306a36Sopenharmony_ci */ 50462306a36Sopenharmony_ci#define SERC1_SO1EN 0x00000001 50562306a36Sopenharmony_ci#define SERC1_SO1F_MASK 0x0000000E 50662306a36Sopenharmony_ci#define SERC1_SO1F_CS423X 0x00000000 50762306a36Sopenharmony_ci#define SERC1_SO1F_AC97 0x00000002 50862306a36Sopenharmony_ci#define SERC1_SO1F_DAC 0x00000004 50962306a36Sopenharmony_ci#define SERC1_SO1F_SPDIF 0x00000006 51062306a36Sopenharmony_ci 51162306a36Sopenharmony_ci/* 51262306a36Sopenharmony_ci * The following defines are for the flags in the serial port 2 configuration 51362306a36Sopenharmony_ci * register. 51462306a36Sopenharmony_ci */ 51562306a36Sopenharmony_ci#define SERC2_SI1EN 0x00000001 51662306a36Sopenharmony_ci#define SERC2_SI1F_MASK 0x0000000E 51762306a36Sopenharmony_ci#define SERC2_SI1F_CS423X 0x00000000 51862306a36Sopenharmony_ci#define SERC2_SI1F_AC97 0x00000002 51962306a36Sopenharmony_ci#define SERC2_SI1F_ADC 0x00000004 52062306a36Sopenharmony_ci#define SERC2_SI1F_SPDIF 0x00000006 52162306a36Sopenharmony_ci 52262306a36Sopenharmony_ci/* 52362306a36Sopenharmony_ci * The following defines are for the flags in the serial port 3 configuration 52462306a36Sopenharmony_ci * register. 52562306a36Sopenharmony_ci */ 52662306a36Sopenharmony_ci#define SERC3_SO2EN 0x00000001 52762306a36Sopenharmony_ci#define SERC3_SO2F_MASK 0x00000006 52862306a36Sopenharmony_ci#define SERC3_SO2F_DAC 0x00000000 52962306a36Sopenharmony_ci#define SERC3_SO2F_SPDIF 0x00000002 53062306a36Sopenharmony_ci 53162306a36Sopenharmony_ci/* 53262306a36Sopenharmony_ci * The following defines are for the flags in the serial port 4 configuration 53362306a36Sopenharmony_ci * register. 53462306a36Sopenharmony_ci */ 53562306a36Sopenharmony_ci#define SERC4_SO3EN 0x00000001 53662306a36Sopenharmony_ci#define SERC4_SO3F_MASK 0x00000006 53762306a36Sopenharmony_ci#define SERC4_SO3F_DAC 0x00000000 53862306a36Sopenharmony_ci#define SERC4_SO3F_SPDIF 0x00000002 53962306a36Sopenharmony_ci 54062306a36Sopenharmony_ci/* 54162306a36Sopenharmony_ci * The following defines are for the flags in the serial port 5 configuration 54262306a36Sopenharmony_ci * register. 54362306a36Sopenharmony_ci */ 54462306a36Sopenharmony_ci#define SERC5_SI2EN 0x00000001 54562306a36Sopenharmony_ci#define SERC5_SI2F_MASK 0x00000006 54662306a36Sopenharmony_ci#define SERC5_SI2F_ADC 0x00000000 54762306a36Sopenharmony_ci#define SERC5_SI2F_SPDIF 0x00000002 54862306a36Sopenharmony_ci 54962306a36Sopenharmony_ci/* 55062306a36Sopenharmony_ci * The following defines are for the flags in the serial port backdoor sample 55162306a36Sopenharmony_ci * pointer register. 55262306a36Sopenharmony_ci */ 55362306a36Sopenharmony_ci#define SERBSP_FSP_MASK 0x0000000F 55462306a36Sopenharmony_ci#define SERBSP_FSP_SHIFT 0 55562306a36Sopenharmony_ci 55662306a36Sopenharmony_ci/* 55762306a36Sopenharmony_ci * The following defines are for the flags in the serial port backdoor status 55862306a36Sopenharmony_ci * register. 55962306a36Sopenharmony_ci */ 56062306a36Sopenharmony_ci#define SERBST_RRDY 0x00000001 56162306a36Sopenharmony_ci#define SERBST_WBSY 0x00000002 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ci/* 56462306a36Sopenharmony_ci * The following defines are for the flags in the serial port backdoor command 56562306a36Sopenharmony_ci * register. 56662306a36Sopenharmony_ci */ 56762306a36Sopenharmony_ci#define SERBCM_RDC 0x00000001 56862306a36Sopenharmony_ci#define SERBCM_WRC 0x00000002 56962306a36Sopenharmony_ci 57062306a36Sopenharmony_ci/* 57162306a36Sopenharmony_ci * The following defines are for the flags in the serial port backdoor address 57262306a36Sopenharmony_ci * register. 57362306a36Sopenharmony_ci */ 57462306a36Sopenharmony_ci#ifdef NO_CS4612 57562306a36Sopenharmony_ci#define SERBAD_FAD_MASK 0x000000FF 57662306a36Sopenharmony_ci#else 57762306a36Sopenharmony_ci#define SERBAD_FAD_MASK 0x000001FF 57862306a36Sopenharmony_ci#endif 57962306a36Sopenharmony_ci#define SERBAD_FAD_SHIFT 0 58062306a36Sopenharmony_ci 58162306a36Sopenharmony_ci/* 58262306a36Sopenharmony_ci * The following defines are for the flags in the serial port backdoor 58362306a36Sopenharmony_ci * configuration register. 58462306a36Sopenharmony_ci */ 58562306a36Sopenharmony_ci#define SERBCF_HBP 0x00000001 58662306a36Sopenharmony_ci 58762306a36Sopenharmony_ci/* 58862306a36Sopenharmony_ci * The following defines are for the flags in the serial port backdoor write 58962306a36Sopenharmony_ci * port register. 59062306a36Sopenharmony_ci */ 59162306a36Sopenharmony_ci#define SERBWP_FWD_MASK 0x000FFFFF 59262306a36Sopenharmony_ci#define SERBWP_FWD_SHIFT 0 59362306a36Sopenharmony_ci 59462306a36Sopenharmony_ci/* 59562306a36Sopenharmony_ci * The following defines are for the flags in the serial port backdoor read 59662306a36Sopenharmony_ci * port register. 59762306a36Sopenharmony_ci */ 59862306a36Sopenharmony_ci#define SERBRP_FRD_MASK 0x000FFFFF 59962306a36Sopenharmony_ci#define SERBRP_FRD_SHIFT 0 60062306a36Sopenharmony_ci 60162306a36Sopenharmony_ci/* 60262306a36Sopenharmony_ci * The following defines are for the flags in the async FIFO address register. 60362306a36Sopenharmony_ci */ 60462306a36Sopenharmony_ci#ifndef NO_CS4612 60562306a36Sopenharmony_ci#define ASER_FADDR_A1_MASK 0x000001FF 60662306a36Sopenharmony_ci#define ASER_FADDR_EN1 0x00008000 60762306a36Sopenharmony_ci#define ASER_FADDR_A2_MASK 0x01FF0000 60862306a36Sopenharmony_ci#define ASER_FADDR_EN2 0x80000000 60962306a36Sopenharmony_ci#define ASER_FADDR_A1_SHIFT 0 61062306a36Sopenharmony_ci#define ASER_FADDR_A2_SHIFT 16 61162306a36Sopenharmony_ci#endif 61262306a36Sopenharmony_ci 61362306a36Sopenharmony_ci/* 61462306a36Sopenharmony_ci * The following defines are for the flags in the AC97 control register. 61562306a36Sopenharmony_ci */ 61662306a36Sopenharmony_ci#define ACCTL_RSTN 0x00000001 61762306a36Sopenharmony_ci#define ACCTL_ESYN 0x00000002 61862306a36Sopenharmony_ci#define ACCTL_VFRM 0x00000004 61962306a36Sopenharmony_ci#define ACCTL_DCV 0x00000008 62062306a36Sopenharmony_ci#define ACCTL_CRW 0x00000010 62162306a36Sopenharmony_ci#define ACCTL_ASYN 0x00000020 62262306a36Sopenharmony_ci#ifndef NO_CS4612 62362306a36Sopenharmony_ci#define ACCTL_TC 0x00000040 62462306a36Sopenharmony_ci#endif 62562306a36Sopenharmony_ci 62662306a36Sopenharmony_ci/* 62762306a36Sopenharmony_ci * The following defines are for the flags in the AC97 status register. 62862306a36Sopenharmony_ci */ 62962306a36Sopenharmony_ci#define ACSTS_CRDY 0x00000001 63062306a36Sopenharmony_ci#define ACSTS_VSTS 0x00000002 63162306a36Sopenharmony_ci#ifndef NO_CS4612 63262306a36Sopenharmony_ci#define ACSTS_WKUP 0x00000004 63362306a36Sopenharmony_ci#endif 63462306a36Sopenharmony_ci 63562306a36Sopenharmony_ci/* 63662306a36Sopenharmony_ci * The following defines are for the flags in the AC97 output slot valid 63762306a36Sopenharmony_ci * register. 63862306a36Sopenharmony_ci */ 63962306a36Sopenharmony_ci#define ACOSV_SLV3 0x00000001 64062306a36Sopenharmony_ci#define ACOSV_SLV4 0x00000002 64162306a36Sopenharmony_ci#define ACOSV_SLV5 0x00000004 64262306a36Sopenharmony_ci#define ACOSV_SLV6 0x00000008 64362306a36Sopenharmony_ci#define ACOSV_SLV7 0x00000010 64462306a36Sopenharmony_ci#define ACOSV_SLV8 0x00000020 64562306a36Sopenharmony_ci#define ACOSV_SLV9 0x00000040 64662306a36Sopenharmony_ci#define ACOSV_SLV10 0x00000080 64762306a36Sopenharmony_ci#define ACOSV_SLV11 0x00000100 64862306a36Sopenharmony_ci#define ACOSV_SLV12 0x00000200 64962306a36Sopenharmony_ci 65062306a36Sopenharmony_ci/* 65162306a36Sopenharmony_ci * The following defines are for the flags in the AC97 command address 65262306a36Sopenharmony_ci * register. 65362306a36Sopenharmony_ci */ 65462306a36Sopenharmony_ci#define ACCAD_CI_MASK 0x0000007F 65562306a36Sopenharmony_ci#define ACCAD_CI_SHIFT 0 65662306a36Sopenharmony_ci 65762306a36Sopenharmony_ci/* 65862306a36Sopenharmony_ci * The following defines are for the flags in the AC97 command data register. 65962306a36Sopenharmony_ci */ 66062306a36Sopenharmony_ci#define ACCDA_CD_MASK 0x0000FFFF 66162306a36Sopenharmony_ci#define ACCDA_CD_SHIFT 0 66262306a36Sopenharmony_ci 66362306a36Sopenharmony_ci/* 66462306a36Sopenharmony_ci * The following defines are for the flags in the AC97 input slot valid 66562306a36Sopenharmony_ci * register. 66662306a36Sopenharmony_ci */ 66762306a36Sopenharmony_ci#define ACISV_ISV3 0x00000001 66862306a36Sopenharmony_ci#define ACISV_ISV4 0x00000002 66962306a36Sopenharmony_ci#define ACISV_ISV5 0x00000004 67062306a36Sopenharmony_ci#define ACISV_ISV6 0x00000008 67162306a36Sopenharmony_ci#define ACISV_ISV7 0x00000010 67262306a36Sopenharmony_ci#define ACISV_ISV8 0x00000020 67362306a36Sopenharmony_ci#define ACISV_ISV9 0x00000040 67462306a36Sopenharmony_ci#define ACISV_ISV10 0x00000080 67562306a36Sopenharmony_ci#define ACISV_ISV11 0x00000100 67662306a36Sopenharmony_ci#define ACISV_ISV12 0x00000200 67762306a36Sopenharmony_ci 67862306a36Sopenharmony_ci/* 67962306a36Sopenharmony_ci * The following defines are for the flags in the AC97 status address 68062306a36Sopenharmony_ci * register. 68162306a36Sopenharmony_ci */ 68262306a36Sopenharmony_ci#define ACSAD_SI_MASK 0x0000007F 68362306a36Sopenharmony_ci#define ACSAD_SI_SHIFT 0 68462306a36Sopenharmony_ci 68562306a36Sopenharmony_ci/* 68662306a36Sopenharmony_ci * The following defines are for the flags in the AC97 status data register. 68762306a36Sopenharmony_ci */ 68862306a36Sopenharmony_ci#define ACSDA_SD_MASK 0x0000FFFF 68962306a36Sopenharmony_ci#define ACSDA_SD_SHIFT 0 69062306a36Sopenharmony_ci 69162306a36Sopenharmony_ci/* 69262306a36Sopenharmony_ci * The following defines are for the flags in the joystick poll/trigger 69362306a36Sopenharmony_ci * register. 69462306a36Sopenharmony_ci */ 69562306a36Sopenharmony_ci#define JSPT_CAX 0x00000001 69662306a36Sopenharmony_ci#define JSPT_CAY 0x00000002 69762306a36Sopenharmony_ci#define JSPT_CBX 0x00000004 69862306a36Sopenharmony_ci#define JSPT_CBY 0x00000008 69962306a36Sopenharmony_ci#define JSPT_BA1 0x00000010 70062306a36Sopenharmony_ci#define JSPT_BA2 0x00000020 70162306a36Sopenharmony_ci#define JSPT_BB1 0x00000040 70262306a36Sopenharmony_ci#define JSPT_BB2 0x00000080 70362306a36Sopenharmony_ci 70462306a36Sopenharmony_ci/* 70562306a36Sopenharmony_ci * The following defines are for the flags in the joystick control register. 70662306a36Sopenharmony_ci */ 70762306a36Sopenharmony_ci#define JSCTL_SP_MASK 0x00000003 70862306a36Sopenharmony_ci#define JSCTL_SP_SLOW 0x00000000 70962306a36Sopenharmony_ci#define JSCTL_SP_MEDIUM_SLOW 0x00000001 71062306a36Sopenharmony_ci#define JSCTL_SP_MEDIUM_FAST 0x00000002 71162306a36Sopenharmony_ci#define JSCTL_SP_FAST 0x00000003 71262306a36Sopenharmony_ci#define JSCTL_ARE 0x00000004 71362306a36Sopenharmony_ci 71462306a36Sopenharmony_ci/* 71562306a36Sopenharmony_ci * The following defines are for the flags in the joystick coordinate pair 1 71662306a36Sopenharmony_ci * readback register. 71762306a36Sopenharmony_ci */ 71862306a36Sopenharmony_ci#define JSC1_Y1V_MASK 0x0000FFFF 71962306a36Sopenharmony_ci#define JSC1_X1V_MASK 0xFFFF0000 72062306a36Sopenharmony_ci#define JSC1_Y1V_SHIFT 0 72162306a36Sopenharmony_ci#define JSC1_X1V_SHIFT 16 72262306a36Sopenharmony_ci 72362306a36Sopenharmony_ci/* 72462306a36Sopenharmony_ci * The following defines are for the flags in the joystick coordinate pair 2 72562306a36Sopenharmony_ci * readback register. 72662306a36Sopenharmony_ci */ 72762306a36Sopenharmony_ci#define JSC2_Y2V_MASK 0x0000FFFF 72862306a36Sopenharmony_ci#define JSC2_X2V_MASK 0xFFFF0000 72962306a36Sopenharmony_ci#define JSC2_Y2V_SHIFT 0 73062306a36Sopenharmony_ci#define JSC2_X2V_SHIFT 16 73162306a36Sopenharmony_ci 73262306a36Sopenharmony_ci/* 73362306a36Sopenharmony_ci * The following defines are for the flags in the MIDI control register. 73462306a36Sopenharmony_ci */ 73562306a36Sopenharmony_ci#define MIDCR_TXE 0x00000001 /* Enable transmitting. */ 73662306a36Sopenharmony_ci#define MIDCR_RXE 0x00000002 /* Enable receiving. */ 73762306a36Sopenharmony_ci#define MIDCR_RIE 0x00000004 /* Interrupt upon tx ready. */ 73862306a36Sopenharmony_ci#define MIDCR_TIE 0x00000008 /* Interrupt upon rx ready. */ 73962306a36Sopenharmony_ci#define MIDCR_MLB 0x00000010 /* Enable midi loopback. */ 74062306a36Sopenharmony_ci#define MIDCR_MRST 0x00000020 /* Reset interface. */ 74162306a36Sopenharmony_ci 74262306a36Sopenharmony_ci/* 74362306a36Sopenharmony_ci * The following defines are for the flags in the MIDI status register. 74462306a36Sopenharmony_ci */ 74562306a36Sopenharmony_ci#define MIDSR_TBF 0x00000001 /* Tx FIFO is full. */ 74662306a36Sopenharmony_ci#define MIDSR_RBE 0x00000002 /* Rx FIFO is empty. */ 74762306a36Sopenharmony_ci 74862306a36Sopenharmony_ci/* 74962306a36Sopenharmony_ci * The following defines are for the flags in the MIDI write port register. 75062306a36Sopenharmony_ci */ 75162306a36Sopenharmony_ci#define MIDWP_MWD_MASK 0x000000FF 75262306a36Sopenharmony_ci#define MIDWP_MWD_SHIFT 0 75362306a36Sopenharmony_ci 75462306a36Sopenharmony_ci/* 75562306a36Sopenharmony_ci * The following defines are for the flags in the MIDI read port register. 75662306a36Sopenharmony_ci */ 75762306a36Sopenharmony_ci#define MIDRP_MRD_MASK 0x000000FF 75862306a36Sopenharmony_ci#define MIDRP_MRD_SHIFT 0 75962306a36Sopenharmony_ci 76062306a36Sopenharmony_ci/* 76162306a36Sopenharmony_ci * The following defines are for the flags in the joystick GPIO register. 76262306a36Sopenharmony_ci */ 76362306a36Sopenharmony_ci#define JSIO_DAX 0x00000001 76462306a36Sopenharmony_ci#define JSIO_DAY 0x00000002 76562306a36Sopenharmony_ci#define JSIO_DBX 0x00000004 76662306a36Sopenharmony_ci#define JSIO_DBY 0x00000008 76762306a36Sopenharmony_ci#define JSIO_AXOE 0x00000010 76862306a36Sopenharmony_ci#define JSIO_AYOE 0x00000020 76962306a36Sopenharmony_ci#define JSIO_BXOE 0x00000040 77062306a36Sopenharmony_ci#define JSIO_BYOE 0x00000080 77162306a36Sopenharmony_ci 77262306a36Sopenharmony_ci/* 77362306a36Sopenharmony_ci * The following defines are for the flags in the master async/sync serial 77462306a36Sopenharmony_ci * port enable register. 77562306a36Sopenharmony_ci */ 77662306a36Sopenharmony_ci#ifndef NO_CS4612 77762306a36Sopenharmony_ci#define ASER_MASTER_ME 0x00000001 77862306a36Sopenharmony_ci#endif 77962306a36Sopenharmony_ci 78062306a36Sopenharmony_ci/* 78162306a36Sopenharmony_ci * The following defines are for the flags in the configuration interface 78262306a36Sopenharmony_ci * register. 78362306a36Sopenharmony_ci */ 78462306a36Sopenharmony_ci#define CFGI_CLK 0x00000001 78562306a36Sopenharmony_ci#define CFGI_DOUT 0x00000002 78662306a36Sopenharmony_ci#define CFGI_DIN_EEN 0x00000004 78762306a36Sopenharmony_ci#define CFGI_EELD 0x00000008 78862306a36Sopenharmony_ci 78962306a36Sopenharmony_ci/* 79062306a36Sopenharmony_ci * The following defines are for the flags in the subsystem ID and vendor ID 79162306a36Sopenharmony_ci * register. 79262306a36Sopenharmony_ci */ 79362306a36Sopenharmony_ci#define SSVID_VID_MASK 0x0000FFFF 79462306a36Sopenharmony_ci#define SSVID_SID_MASK 0xFFFF0000 79562306a36Sopenharmony_ci#define SSVID_VID_SHIFT 0 79662306a36Sopenharmony_ci#define SSVID_SID_SHIFT 16 79762306a36Sopenharmony_ci 79862306a36Sopenharmony_ci/* 79962306a36Sopenharmony_ci * The following defines are for the flags in the GPIO pin interface register. 80062306a36Sopenharmony_ci */ 80162306a36Sopenharmony_ci#define GPIOR_VOLDN 0x00000001 80262306a36Sopenharmony_ci#define GPIOR_VOLUP 0x00000002 80362306a36Sopenharmony_ci#define GPIOR_SI2D 0x00000004 80462306a36Sopenharmony_ci#define GPIOR_SI2OE 0x00000008 80562306a36Sopenharmony_ci 80662306a36Sopenharmony_ci/* 80762306a36Sopenharmony_ci * The following defines are for the flags in the extended GPIO pin direction 80862306a36Sopenharmony_ci * register. 80962306a36Sopenharmony_ci */ 81062306a36Sopenharmony_ci#ifndef NO_CS4612 81162306a36Sopenharmony_ci#define EGPIODR_GPOE0 0x00000001 81262306a36Sopenharmony_ci#define EGPIODR_GPOE1 0x00000002 81362306a36Sopenharmony_ci#define EGPIODR_GPOE2 0x00000004 81462306a36Sopenharmony_ci#define EGPIODR_GPOE3 0x00000008 81562306a36Sopenharmony_ci#define EGPIODR_GPOE4 0x00000010 81662306a36Sopenharmony_ci#define EGPIODR_GPOE5 0x00000020 81762306a36Sopenharmony_ci#define EGPIODR_GPOE6 0x00000040 81862306a36Sopenharmony_ci#define EGPIODR_GPOE7 0x00000080 81962306a36Sopenharmony_ci#define EGPIODR_GPOE8 0x00000100 82062306a36Sopenharmony_ci#endif 82162306a36Sopenharmony_ci 82262306a36Sopenharmony_ci/* 82362306a36Sopenharmony_ci * The following defines are for the flags in the extended GPIO pin polarity/ 82462306a36Sopenharmony_ci * type register. 82562306a36Sopenharmony_ci */ 82662306a36Sopenharmony_ci#ifndef NO_CS4612 82762306a36Sopenharmony_ci#define EGPIOPTR_GPPT0 0x00000001 82862306a36Sopenharmony_ci#define EGPIOPTR_GPPT1 0x00000002 82962306a36Sopenharmony_ci#define EGPIOPTR_GPPT2 0x00000004 83062306a36Sopenharmony_ci#define EGPIOPTR_GPPT3 0x00000008 83162306a36Sopenharmony_ci#define EGPIOPTR_GPPT4 0x00000010 83262306a36Sopenharmony_ci#define EGPIOPTR_GPPT5 0x00000020 83362306a36Sopenharmony_ci#define EGPIOPTR_GPPT6 0x00000040 83462306a36Sopenharmony_ci#define EGPIOPTR_GPPT7 0x00000080 83562306a36Sopenharmony_ci#define EGPIOPTR_GPPT8 0x00000100 83662306a36Sopenharmony_ci#endif 83762306a36Sopenharmony_ci 83862306a36Sopenharmony_ci/* 83962306a36Sopenharmony_ci * The following defines are for the flags in the extended GPIO pin sticky 84062306a36Sopenharmony_ci * register. 84162306a36Sopenharmony_ci */ 84262306a36Sopenharmony_ci#ifndef NO_CS4612 84362306a36Sopenharmony_ci#define EGPIOTR_GPS0 0x00000001 84462306a36Sopenharmony_ci#define EGPIOTR_GPS1 0x00000002 84562306a36Sopenharmony_ci#define EGPIOTR_GPS2 0x00000004 84662306a36Sopenharmony_ci#define EGPIOTR_GPS3 0x00000008 84762306a36Sopenharmony_ci#define EGPIOTR_GPS4 0x00000010 84862306a36Sopenharmony_ci#define EGPIOTR_GPS5 0x00000020 84962306a36Sopenharmony_ci#define EGPIOTR_GPS6 0x00000040 85062306a36Sopenharmony_ci#define EGPIOTR_GPS7 0x00000080 85162306a36Sopenharmony_ci#define EGPIOTR_GPS8 0x00000100 85262306a36Sopenharmony_ci#endif 85362306a36Sopenharmony_ci 85462306a36Sopenharmony_ci/* 85562306a36Sopenharmony_ci * The following defines are for the flags in the extended GPIO ping wakeup 85662306a36Sopenharmony_ci * register. 85762306a36Sopenharmony_ci */ 85862306a36Sopenharmony_ci#ifndef NO_CS4612 85962306a36Sopenharmony_ci#define EGPIOWR_GPW0 0x00000001 86062306a36Sopenharmony_ci#define EGPIOWR_GPW1 0x00000002 86162306a36Sopenharmony_ci#define EGPIOWR_GPW2 0x00000004 86262306a36Sopenharmony_ci#define EGPIOWR_GPW3 0x00000008 86362306a36Sopenharmony_ci#define EGPIOWR_GPW4 0x00000010 86462306a36Sopenharmony_ci#define EGPIOWR_GPW5 0x00000020 86562306a36Sopenharmony_ci#define EGPIOWR_GPW6 0x00000040 86662306a36Sopenharmony_ci#define EGPIOWR_GPW7 0x00000080 86762306a36Sopenharmony_ci#define EGPIOWR_GPW8 0x00000100 86862306a36Sopenharmony_ci#endif 86962306a36Sopenharmony_ci 87062306a36Sopenharmony_ci/* 87162306a36Sopenharmony_ci * The following defines are for the flags in the extended GPIO pin status 87262306a36Sopenharmony_ci * register. 87362306a36Sopenharmony_ci */ 87462306a36Sopenharmony_ci#ifndef NO_CS4612 87562306a36Sopenharmony_ci#define EGPIOSR_GPS0 0x00000001 87662306a36Sopenharmony_ci#define EGPIOSR_GPS1 0x00000002 87762306a36Sopenharmony_ci#define EGPIOSR_GPS2 0x00000004 87862306a36Sopenharmony_ci#define EGPIOSR_GPS3 0x00000008 87962306a36Sopenharmony_ci#define EGPIOSR_GPS4 0x00000010 88062306a36Sopenharmony_ci#define EGPIOSR_GPS5 0x00000020 88162306a36Sopenharmony_ci#define EGPIOSR_GPS6 0x00000040 88262306a36Sopenharmony_ci#define EGPIOSR_GPS7 0x00000080 88362306a36Sopenharmony_ci#define EGPIOSR_GPS8 0x00000100 88462306a36Sopenharmony_ci#endif 88562306a36Sopenharmony_ci 88662306a36Sopenharmony_ci/* 88762306a36Sopenharmony_ci * The following defines are for the flags in the serial port 6 configuration 88862306a36Sopenharmony_ci * register. 88962306a36Sopenharmony_ci */ 89062306a36Sopenharmony_ci#ifndef NO_CS4612 89162306a36Sopenharmony_ci#define SERC6_ASDO2EN 0x00000001 89262306a36Sopenharmony_ci#endif 89362306a36Sopenharmony_ci 89462306a36Sopenharmony_ci/* 89562306a36Sopenharmony_ci * The following defines are for the flags in the serial port 7 configuration 89662306a36Sopenharmony_ci * register. 89762306a36Sopenharmony_ci */ 89862306a36Sopenharmony_ci#ifndef NO_CS4612 89962306a36Sopenharmony_ci#define SERC7_ASDI2EN 0x00000001 90062306a36Sopenharmony_ci#define SERC7_POSILB 0x00000002 90162306a36Sopenharmony_ci#define SERC7_SIPOLB 0x00000004 90262306a36Sopenharmony_ci#define SERC7_SOSILB 0x00000008 90362306a36Sopenharmony_ci#define SERC7_SISOLB 0x00000010 90462306a36Sopenharmony_ci#endif 90562306a36Sopenharmony_ci 90662306a36Sopenharmony_ci/* 90762306a36Sopenharmony_ci * The following defines are for the flags in the serial port AC link 90862306a36Sopenharmony_ci * configuration register. 90962306a36Sopenharmony_ci */ 91062306a36Sopenharmony_ci#ifndef NO_CS4612 91162306a36Sopenharmony_ci#define SERACC_CHIP_TYPE_MASK 0x00000001 91262306a36Sopenharmony_ci#define SERACC_CHIP_TYPE_1_03 0x00000000 91362306a36Sopenharmony_ci#define SERACC_CHIP_TYPE_2_0 0x00000001 91462306a36Sopenharmony_ci#define SERACC_TWO_CODECS 0x00000002 91562306a36Sopenharmony_ci#define SERACC_MDM 0x00000004 91662306a36Sopenharmony_ci#define SERACC_HSP 0x00000008 91762306a36Sopenharmony_ci#define SERACC_ODT 0x00000010 /* only CS4630 */ 91862306a36Sopenharmony_ci#endif 91962306a36Sopenharmony_ci 92062306a36Sopenharmony_ci/* 92162306a36Sopenharmony_ci * The following defines are for the flags in the AC97 control register 2. 92262306a36Sopenharmony_ci */ 92362306a36Sopenharmony_ci#ifndef NO_CS4612 92462306a36Sopenharmony_ci#define ACCTL2_RSTN 0x00000001 92562306a36Sopenharmony_ci#define ACCTL2_ESYN 0x00000002 92662306a36Sopenharmony_ci#define ACCTL2_VFRM 0x00000004 92762306a36Sopenharmony_ci#define ACCTL2_DCV 0x00000008 92862306a36Sopenharmony_ci#define ACCTL2_CRW 0x00000010 92962306a36Sopenharmony_ci#define ACCTL2_ASYN 0x00000020 93062306a36Sopenharmony_ci#endif 93162306a36Sopenharmony_ci 93262306a36Sopenharmony_ci/* 93362306a36Sopenharmony_ci * The following defines are for the flags in the AC97 status register 2. 93462306a36Sopenharmony_ci */ 93562306a36Sopenharmony_ci#ifndef NO_CS4612 93662306a36Sopenharmony_ci#define ACSTS2_CRDY 0x00000001 93762306a36Sopenharmony_ci#define ACSTS2_VSTS 0x00000002 93862306a36Sopenharmony_ci#endif 93962306a36Sopenharmony_ci 94062306a36Sopenharmony_ci/* 94162306a36Sopenharmony_ci * The following defines are for the flags in the AC97 output slot valid 94262306a36Sopenharmony_ci * register 2. 94362306a36Sopenharmony_ci */ 94462306a36Sopenharmony_ci#ifndef NO_CS4612 94562306a36Sopenharmony_ci#define ACOSV2_SLV3 0x00000001 94662306a36Sopenharmony_ci#define ACOSV2_SLV4 0x00000002 94762306a36Sopenharmony_ci#define ACOSV2_SLV5 0x00000004 94862306a36Sopenharmony_ci#define ACOSV2_SLV6 0x00000008 94962306a36Sopenharmony_ci#define ACOSV2_SLV7 0x00000010 95062306a36Sopenharmony_ci#define ACOSV2_SLV8 0x00000020 95162306a36Sopenharmony_ci#define ACOSV2_SLV9 0x00000040 95262306a36Sopenharmony_ci#define ACOSV2_SLV10 0x00000080 95362306a36Sopenharmony_ci#define ACOSV2_SLV11 0x00000100 95462306a36Sopenharmony_ci#define ACOSV2_SLV12 0x00000200 95562306a36Sopenharmony_ci#endif 95662306a36Sopenharmony_ci 95762306a36Sopenharmony_ci/* 95862306a36Sopenharmony_ci * The following defines are for the flags in the AC97 command address 95962306a36Sopenharmony_ci * register 2. 96062306a36Sopenharmony_ci */ 96162306a36Sopenharmony_ci#ifndef NO_CS4612 96262306a36Sopenharmony_ci#define ACCAD2_CI_MASK 0x0000007F 96362306a36Sopenharmony_ci#define ACCAD2_CI_SHIFT 0 96462306a36Sopenharmony_ci#endif 96562306a36Sopenharmony_ci 96662306a36Sopenharmony_ci/* 96762306a36Sopenharmony_ci * The following defines are for the flags in the AC97 command data register 96862306a36Sopenharmony_ci * 2. 96962306a36Sopenharmony_ci */ 97062306a36Sopenharmony_ci#ifndef NO_CS4612 97162306a36Sopenharmony_ci#define ACCDA2_CD_MASK 0x0000FFFF 97262306a36Sopenharmony_ci#define ACCDA2_CD_SHIFT 0 97362306a36Sopenharmony_ci#endif 97462306a36Sopenharmony_ci 97562306a36Sopenharmony_ci/* 97662306a36Sopenharmony_ci * The following defines are for the flags in the AC97 input slot valid 97762306a36Sopenharmony_ci * register 2. 97862306a36Sopenharmony_ci */ 97962306a36Sopenharmony_ci#ifndef NO_CS4612 98062306a36Sopenharmony_ci#define ACISV2_ISV3 0x00000001 98162306a36Sopenharmony_ci#define ACISV2_ISV4 0x00000002 98262306a36Sopenharmony_ci#define ACISV2_ISV5 0x00000004 98362306a36Sopenharmony_ci#define ACISV2_ISV6 0x00000008 98462306a36Sopenharmony_ci#define ACISV2_ISV7 0x00000010 98562306a36Sopenharmony_ci#define ACISV2_ISV8 0x00000020 98662306a36Sopenharmony_ci#define ACISV2_ISV9 0x00000040 98762306a36Sopenharmony_ci#define ACISV2_ISV10 0x00000080 98862306a36Sopenharmony_ci#define ACISV2_ISV11 0x00000100 98962306a36Sopenharmony_ci#define ACISV2_ISV12 0x00000200 99062306a36Sopenharmony_ci#endif 99162306a36Sopenharmony_ci 99262306a36Sopenharmony_ci/* 99362306a36Sopenharmony_ci * The following defines are for the flags in the AC97 status address 99462306a36Sopenharmony_ci * register 2. 99562306a36Sopenharmony_ci */ 99662306a36Sopenharmony_ci#ifndef NO_CS4612 99762306a36Sopenharmony_ci#define ACSAD2_SI_MASK 0x0000007F 99862306a36Sopenharmony_ci#define ACSAD2_SI_SHIFT 0 99962306a36Sopenharmony_ci#endif 100062306a36Sopenharmony_ci 100162306a36Sopenharmony_ci/* 100262306a36Sopenharmony_ci * The following defines are for the flags in the AC97 status data register 2. 100362306a36Sopenharmony_ci */ 100462306a36Sopenharmony_ci#ifndef NO_CS4612 100562306a36Sopenharmony_ci#define ACSDA2_SD_MASK 0x0000FFFF 100662306a36Sopenharmony_ci#define ACSDA2_SD_SHIFT 0 100762306a36Sopenharmony_ci#endif 100862306a36Sopenharmony_ci 100962306a36Sopenharmony_ci/* 101062306a36Sopenharmony_ci * The following defines are for the flags in the I/O trap address and control 101162306a36Sopenharmony_ci * registers (all 12). 101262306a36Sopenharmony_ci */ 101362306a36Sopenharmony_ci#ifndef NO_CS4612 101462306a36Sopenharmony_ci#define IOTAC_SA_MASK 0x0000FFFF 101562306a36Sopenharmony_ci#define IOTAC_MSK_MASK 0x000F0000 101662306a36Sopenharmony_ci#define IOTAC_IODC_MASK 0x06000000 101762306a36Sopenharmony_ci#define IOTAC_IODC_16_BIT 0x00000000 101862306a36Sopenharmony_ci#define IOTAC_IODC_10_BIT 0x02000000 101962306a36Sopenharmony_ci#define IOTAC_IODC_12_BIT 0x04000000 102062306a36Sopenharmony_ci#define IOTAC_WSPI 0x08000000 102162306a36Sopenharmony_ci#define IOTAC_RSPI 0x10000000 102262306a36Sopenharmony_ci#define IOTAC_WSE 0x20000000 102362306a36Sopenharmony_ci#define IOTAC_WE 0x40000000 102462306a36Sopenharmony_ci#define IOTAC_RE 0x80000000 102562306a36Sopenharmony_ci#define IOTAC_SA_SHIFT 0 102662306a36Sopenharmony_ci#define IOTAC_MSK_SHIFT 16 102762306a36Sopenharmony_ci#endif 102862306a36Sopenharmony_ci 102962306a36Sopenharmony_ci/* 103062306a36Sopenharmony_ci * The following defines are for the flags in the I/O trap fast read registers 103162306a36Sopenharmony_ci * (all 8). 103262306a36Sopenharmony_ci */ 103362306a36Sopenharmony_ci#ifndef NO_CS4612 103462306a36Sopenharmony_ci#define IOTFR_D_MASK 0x0000FFFF 103562306a36Sopenharmony_ci#define IOTFR_A_MASK 0x000F0000 103662306a36Sopenharmony_ci#define IOTFR_R_MASK 0x0F000000 103762306a36Sopenharmony_ci#define IOTFR_ALL 0x40000000 103862306a36Sopenharmony_ci#define IOTFR_VL 0x80000000 103962306a36Sopenharmony_ci#define IOTFR_D_SHIFT 0 104062306a36Sopenharmony_ci#define IOTFR_A_SHIFT 16 104162306a36Sopenharmony_ci#define IOTFR_R_SHIFT 24 104262306a36Sopenharmony_ci#endif 104362306a36Sopenharmony_ci 104462306a36Sopenharmony_ci/* 104562306a36Sopenharmony_ci * The following defines are for the flags in the I/O trap FIFO register. 104662306a36Sopenharmony_ci */ 104762306a36Sopenharmony_ci#ifndef NO_CS4612 104862306a36Sopenharmony_ci#define IOTFIFO_BA_MASK 0x00003FFF 104962306a36Sopenharmony_ci#define IOTFIFO_S_MASK 0x00FF0000 105062306a36Sopenharmony_ci#define IOTFIFO_OF 0x40000000 105162306a36Sopenharmony_ci#define IOTFIFO_SPIOF 0x80000000 105262306a36Sopenharmony_ci#define IOTFIFO_BA_SHIFT 0 105362306a36Sopenharmony_ci#define IOTFIFO_S_SHIFT 16 105462306a36Sopenharmony_ci#endif 105562306a36Sopenharmony_ci 105662306a36Sopenharmony_ci/* 105762306a36Sopenharmony_ci * The following defines are for the flags in the I/O trap retry read data 105862306a36Sopenharmony_ci * register. 105962306a36Sopenharmony_ci */ 106062306a36Sopenharmony_ci#ifndef NO_CS4612 106162306a36Sopenharmony_ci#define IOTRRD_D_MASK 0x0000FFFF 106262306a36Sopenharmony_ci#define IOTRRD_RDV 0x80000000 106362306a36Sopenharmony_ci#define IOTRRD_D_SHIFT 0 106462306a36Sopenharmony_ci#endif 106562306a36Sopenharmony_ci 106662306a36Sopenharmony_ci/* 106762306a36Sopenharmony_ci * The following defines are for the flags in the I/O trap FIFO pointer 106862306a36Sopenharmony_ci * register. 106962306a36Sopenharmony_ci */ 107062306a36Sopenharmony_ci#ifndef NO_CS4612 107162306a36Sopenharmony_ci#define IOTFP_CA_MASK 0x00003FFF 107262306a36Sopenharmony_ci#define IOTFP_PA_MASK 0x3FFF0000 107362306a36Sopenharmony_ci#define IOTFP_CA_SHIFT 0 107462306a36Sopenharmony_ci#define IOTFP_PA_SHIFT 16 107562306a36Sopenharmony_ci#endif 107662306a36Sopenharmony_ci 107762306a36Sopenharmony_ci/* 107862306a36Sopenharmony_ci * The following defines are for the flags in the I/O trap control register. 107962306a36Sopenharmony_ci */ 108062306a36Sopenharmony_ci#ifndef NO_CS4612 108162306a36Sopenharmony_ci#define IOTCR_ITD 0x00000001 108262306a36Sopenharmony_ci#define IOTCR_HRV 0x00000002 108362306a36Sopenharmony_ci#define IOTCR_SRV 0x00000004 108462306a36Sopenharmony_ci#define IOTCR_DTI 0x00000008 108562306a36Sopenharmony_ci#define IOTCR_DFI 0x00000010 108662306a36Sopenharmony_ci#define IOTCR_DDP 0x00000020 108762306a36Sopenharmony_ci#define IOTCR_JTE 0x00000040 108862306a36Sopenharmony_ci#define IOTCR_PPE 0x00000080 108962306a36Sopenharmony_ci#endif 109062306a36Sopenharmony_ci 109162306a36Sopenharmony_ci/* 109262306a36Sopenharmony_ci * The following defines are for the flags in the direct PCI data register. 109362306a36Sopenharmony_ci */ 109462306a36Sopenharmony_ci#ifndef NO_CS4612 109562306a36Sopenharmony_ci#define DPCID_D_MASK 0xFFFFFFFF 109662306a36Sopenharmony_ci#define DPCID_D_SHIFT 0 109762306a36Sopenharmony_ci#endif 109862306a36Sopenharmony_ci 109962306a36Sopenharmony_ci/* 110062306a36Sopenharmony_ci * The following defines are for the flags in the direct PCI address register. 110162306a36Sopenharmony_ci */ 110262306a36Sopenharmony_ci#ifndef NO_CS4612 110362306a36Sopenharmony_ci#define DPCIA_A_MASK 0xFFFFFFFF 110462306a36Sopenharmony_ci#define DPCIA_A_SHIFT 0 110562306a36Sopenharmony_ci#endif 110662306a36Sopenharmony_ci 110762306a36Sopenharmony_ci/* 110862306a36Sopenharmony_ci * The following defines are for the flags in the direct PCI command register. 110962306a36Sopenharmony_ci */ 111062306a36Sopenharmony_ci#ifndef NO_CS4612 111162306a36Sopenharmony_ci#define DPCIC_C_MASK 0x0000000F 111262306a36Sopenharmony_ci#define DPCIC_C_IOREAD 0x00000002 111362306a36Sopenharmony_ci#define DPCIC_C_IOWRITE 0x00000003 111462306a36Sopenharmony_ci#define DPCIC_BE_MASK 0x000000F0 111562306a36Sopenharmony_ci#endif 111662306a36Sopenharmony_ci 111762306a36Sopenharmony_ci/* 111862306a36Sopenharmony_ci * The following defines are for the flags in the PC/PCI request register. 111962306a36Sopenharmony_ci */ 112062306a36Sopenharmony_ci#ifndef NO_CS4612 112162306a36Sopenharmony_ci#define PCPCIR_RDC_MASK 0x00000007 112262306a36Sopenharmony_ci#define PCPCIR_C_MASK 0x00007000 112362306a36Sopenharmony_ci#define PCPCIR_REQ 0x00008000 112462306a36Sopenharmony_ci#define PCPCIR_RDC_SHIFT 0 112562306a36Sopenharmony_ci#define PCPCIR_C_SHIFT 12 112662306a36Sopenharmony_ci#endif 112762306a36Sopenharmony_ci 112862306a36Sopenharmony_ci/* 112962306a36Sopenharmony_ci * The following defines are for the flags in the PC/PCI grant register. 113062306a36Sopenharmony_ci */ 113162306a36Sopenharmony_ci#ifndef NO_CS4612 113262306a36Sopenharmony_ci#define PCPCIG_GDC_MASK 0x00000007 113362306a36Sopenharmony_ci#define PCPCIG_VL 0x00008000 113462306a36Sopenharmony_ci#define PCPCIG_GDC_SHIFT 0 113562306a36Sopenharmony_ci#endif 113662306a36Sopenharmony_ci 113762306a36Sopenharmony_ci/* 113862306a36Sopenharmony_ci * The following defines are for the flags in the PC/PCI master enable 113962306a36Sopenharmony_ci * register. 114062306a36Sopenharmony_ci */ 114162306a36Sopenharmony_ci#ifndef NO_CS4612 114262306a36Sopenharmony_ci#define PCPCIEN_EN 0x00000001 114362306a36Sopenharmony_ci#endif 114462306a36Sopenharmony_ci 114562306a36Sopenharmony_ci/* 114662306a36Sopenharmony_ci * The following defines are for the flags in the extended PCI power 114762306a36Sopenharmony_ci * management control register. 114862306a36Sopenharmony_ci */ 114962306a36Sopenharmony_ci#ifndef NO_CS4612 115062306a36Sopenharmony_ci#define EPCIPMC_GWU 0x00000001 115162306a36Sopenharmony_ci#define EPCIPMC_FSPC 0x00000002 115262306a36Sopenharmony_ci#endif 115362306a36Sopenharmony_ci 115462306a36Sopenharmony_ci/* 115562306a36Sopenharmony_ci * The following defines are for the flags in the SP control register. 115662306a36Sopenharmony_ci */ 115762306a36Sopenharmony_ci#define SPCR_RUN 0x00000001 115862306a36Sopenharmony_ci#define SPCR_STPFR 0x00000002 115962306a36Sopenharmony_ci#define SPCR_RUNFR 0x00000004 116062306a36Sopenharmony_ci#define SPCR_TICK 0x00000008 116162306a36Sopenharmony_ci#define SPCR_DRQEN 0x00000020 116262306a36Sopenharmony_ci#define SPCR_RSTSP 0x00000040 116362306a36Sopenharmony_ci#define SPCR_OREN 0x00000080 116462306a36Sopenharmony_ci#ifndef NO_CS4612 116562306a36Sopenharmony_ci#define SPCR_PCIINT 0x00000100 116662306a36Sopenharmony_ci#define SPCR_OINTD 0x00000200 116762306a36Sopenharmony_ci#define SPCR_CRE 0x00008000 116862306a36Sopenharmony_ci#endif 116962306a36Sopenharmony_ci 117062306a36Sopenharmony_ci/* 117162306a36Sopenharmony_ci * The following defines are for the flags in the debug index register. 117262306a36Sopenharmony_ci */ 117362306a36Sopenharmony_ci#define DREG_REGID_MASK 0x0000007F 117462306a36Sopenharmony_ci#define DREG_DEBUG 0x00000080 117562306a36Sopenharmony_ci#define DREG_RGBK_MASK 0x00000700 117662306a36Sopenharmony_ci#define DREG_TRAP 0x00000800 117762306a36Sopenharmony_ci#if !defined(NO_CS4612) 117862306a36Sopenharmony_ci#if !defined(NO_CS4615) 117962306a36Sopenharmony_ci#define DREG_TRAPX 0x00001000 118062306a36Sopenharmony_ci#endif 118162306a36Sopenharmony_ci#endif 118262306a36Sopenharmony_ci#define DREG_REGID_SHIFT 0 118362306a36Sopenharmony_ci#define DREG_RGBK_SHIFT 8 118462306a36Sopenharmony_ci#define DREG_RGBK_REGID_MASK 0x0000077F 118562306a36Sopenharmony_ci#define DREG_REGID_R0 0x00000010 118662306a36Sopenharmony_ci#define DREG_REGID_R1 0x00000011 118762306a36Sopenharmony_ci#define DREG_REGID_R2 0x00000012 118862306a36Sopenharmony_ci#define DREG_REGID_R3 0x00000013 118962306a36Sopenharmony_ci#define DREG_REGID_R4 0x00000014 119062306a36Sopenharmony_ci#define DREG_REGID_R5 0x00000015 119162306a36Sopenharmony_ci#define DREG_REGID_R6 0x00000016 119262306a36Sopenharmony_ci#define DREG_REGID_R7 0x00000017 119362306a36Sopenharmony_ci#define DREG_REGID_R8 0x00000018 119462306a36Sopenharmony_ci#define DREG_REGID_R9 0x00000019 119562306a36Sopenharmony_ci#define DREG_REGID_RA 0x0000001A 119662306a36Sopenharmony_ci#define DREG_REGID_RB 0x0000001B 119762306a36Sopenharmony_ci#define DREG_REGID_RC 0x0000001C 119862306a36Sopenharmony_ci#define DREG_REGID_RD 0x0000001D 119962306a36Sopenharmony_ci#define DREG_REGID_RE 0x0000001E 120062306a36Sopenharmony_ci#define DREG_REGID_RF 0x0000001F 120162306a36Sopenharmony_ci#define DREG_REGID_RA_BUS_LOW 0x00000020 120262306a36Sopenharmony_ci#define DREG_REGID_RA_BUS_HIGH 0x00000038 120362306a36Sopenharmony_ci#define DREG_REGID_YBUS_LOW 0x00000050 120462306a36Sopenharmony_ci#define DREG_REGID_YBUS_HIGH 0x00000058 120562306a36Sopenharmony_ci#define DREG_REGID_TRAP_0 0x00000100 120662306a36Sopenharmony_ci#define DREG_REGID_TRAP_1 0x00000101 120762306a36Sopenharmony_ci#define DREG_REGID_TRAP_2 0x00000102 120862306a36Sopenharmony_ci#define DREG_REGID_TRAP_3 0x00000103 120962306a36Sopenharmony_ci#define DREG_REGID_TRAP_4 0x00000104 121062306a36Sopenharmony_ci#define DREG_REGID_TRAP_5 0x00000105 121162306a36Sopenharmony_ci#define DREG_REGID_TRAP_6 0x00000106 121262306a36Sopenharmony_ci#define DREG_REGID_TRAP_7 0x00000107 121362306a36Sopenharmony_ci#define DREG_REGID_INDIRECT_ADDRESS 0x0000010E 121462306a36Sopenharmony_ci#define DREG_REGID_TOP_OF_STACK 0x0000010F 121562306a36Sopenharmony_ci#if !defined(NO_CS4612) 121662306a36Sopenharmony_ci#if !defined(NO_CS4615) 121762306a36Sopenharmony_ci#define DREG_REGID_TRAP_8 0x00000110 121862306a36Sopenharmony_ci#define DREG_REGID_TRAP_9 0x00000111 121962306a36Sopenharmony_ci#define DREG_REGID_TRAP_10 0x00000112 122062306a36Sopenharmony_ci#define DREG_REGID_TRAP_11 0x00000113 122162306a36Sopenharmony_ci#define DREG_REGID_TRAP_12 0x00000114 122262306a36Sopenharmony_ci#define DREG_REGID_TRAP_13 0x00000115 122362306a36Sopenharmony_ci#define DREG_REGID_TRAP_14 0x00000116 122462306a36Sopenharmony_ci#define DREG_REGID_TRAP_15 0x00000117 122562306a36Sopenharmony_ci#define DREG_REGID_TRAP_16 0x00000118 122662306a36Sopenharmony_ci#define DREG_REGID_TRAP_17 0x00000119 122762306a36Sopenharmony_ci#define DREG_REGID_TRAP_18 0x0000011A 122862306a36Sopenharmony_ci#define DREG_REGID_TRAP_19 0x0000011B 122962306a36Sopenharmony_ci#define DREG_REGID_TRAP_20 0x0000011C 123062306a36Sopenharmony_ci#define DREG_REGID_TRAP_21 0x0000011D 123162306a36Sopenharmony_ci#define DREG_REGID_TRAP_22 0x0000011E 123262306a36Sopenharmony_ci#define DREG_REGID_TRAP_23 0x0000011F 123362306a36Sopenharmony_ci#endif 123462306a36Sopenharmony_ci#endif 123562306a36Sopenharmony_ci#define DREG_REGID_RSA0_LOW 0x00000200 123662306a36Sopenharmony_ci#define DREG_REGID_RSA0_HIGH 0x00000201 123762306a36Sopenharmony_ci#define DREG_REGID_RSA1_LOW 0x00000202 123862306a36Sopenharmony_ci#define DREG_REGID_RSA1_HIGH 0x00000203 123962306a36Sopenharmony_ci#define DREG_REGID_RSA2 0x00000204 124062306a36Sopenharmony_ci#define DREG_REGID_RSA3 0x00000205 124162306a36Sopenharmony_ci#define DREG_REGID_RSI0_LOW 0x00000206 124262306a36Sopenharmony_ci#define DREG_REGID_RSI0_HIGH 0x00000207 124362306a36Sopenharmony_ci#define DREG_REGID_RSI1 0x00000208 124462306a36Sopenharmony_ci#define DREG_REGID_RSI2 0x00000209 124562306a36Sopenharmony_ci#define DREG_REGID_SAGUSTATUS 0x0000020A 124662306a36Sopenharmony_ci#define DREG_REGID_RSCONFIG01_LOW 0x0000020B 124762306a36Sopenharmony_ci#define DREG_REGID_RSCONFIG01_HIGH 0x0000020C 124862306a36Sopenharmony_ci#define DREG_REGID_RSCONFIG23_LOW 0x0000020D 124962306a36Sopenharmony_ci#define DREG_REGID_RSCONFIG23_HIGH 0x0000020E 125062306a36Sopenharmony_ci#define DREG_REGID_RSDMA01E 0x0000020F 125162306a36Sopenharmony_ci#define DREG_REGID_RSDMA23E 0x00000210 125262306a36Sopenharmony_ci#define DREG_REGID_RSD0_LOW 0x00000211 125362306a36Sopenharmony_ci#define DREG_REGID_RSD0_HIGH 0x00000212 125462306a36Sopenharmony_ci#define DREG_REGID_RSD1_LOW 0x00000213 125562306a36Sopenharmony_ci#define DREG_REGID_RSD1_HIGH 0x00000214 125662306a36Sopenharmony_ci#define DREG_REGID_RSD2_LOW 0x00000215 125762306a36Sopenharmony_ci#define DREG_REGID_RSD2_HIGH 0x00000216 125862306a36Sopenharmony_ci#define DREG_REGID_RSD3_LOW 0x00000217 125962306a36Sopenharmony_ci#define DREG_REGID_RSD3_HIGH 0x00000218 126062306a36Sopenharmony_ci#define DREG_REGID_SRAR_HIGH 0x0000021A 126162306a36Sopenharmony_ci#define DREG_REGID_SRAR_LOW 0x0000021B 126262306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE 0x0000021C 126362306a36Sopenharmony_ci#define DREG_REGID_CURRENT_DMA_STREAM 0x0000021D 126462306a36Sopenharmony_ci#define DREG_REGID_NEXT_DMA_STREAM 0x0000021E 126562306a36Sopenharmony_ci#define DREG_REGID_CPU_STATUS 0x00000300 126662306a36Sopenharmony_ci#define DREG_REGID_MAC_MODE 0x00000301 126762306a36Sopenharmony_ci#define DREG_REGID_STACK_AND_REPEAT 0x00000302 126862306a36Sopenharmony_ci#define DREG_REGID_INDEX0 0x00000304 126962306a36Sopenharmony_ci#define DREG_REGID_INDEX1 0x00000305 127062306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_0_3 0x00000400 127162306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_4_7 0x00000404 127262306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_8_11 0x00000408 127362306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_12_15 0x0000040C 127462306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_16_19 0x00000410 127562306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_20_23 0x00000414 127662306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_24_27 0x00000418 127762306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_28_31 0x0000041C 127862306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_32_35 0x00000420 127962306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_36_39 0x00000424 128062306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_40_43 0x00000428 128162306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_44_47 0x0000042C 128262306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_48_51 0x00000430 128362306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_52_55 0x00000434 128462306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_56_59 0x00000438 128562306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_60_63 0x0000043C 128662306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_64_67 0x00000440 128762306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_68_71 0x00000444 128862306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_72_75 0x00000448 128962306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_76_79 0x0000044C 129062306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_80_83 0x00000450 129162306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_84_87 0x00000454 129262306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_88_91 0x00000458 129362306a36Sopenharmony_ci#define DREG_REGID_DMA_STATE_92_95 0x0000045C 129462306a36Sopenharmony_ci#define DREG_REGID_TRAP_SELECT 0x00000500 129562306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_0 0x00000500 129662306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_1 0x00000501 129762306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_2 0x00000502 129862306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_3 0x00000503 129962306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_4 0x00000504 130062306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_5 0x00000505 130162306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_6 0x00000506 130262306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_7 0x00000507 130362306a36Sopenharmony_ci#if !defined(NO_CS4612) 130462306a36Sopenharmony_ci#if !defined(NO_CS4615) 130562306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_8 0x00000510 130662306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_9 0x00000511 130762306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_10 0x00000512 130862306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_11 0x00000513 130962306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_12 0x00000514 131062306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_13 0x00000515 131162306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_14 0x00000516 131262306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_15 0x00000517 131362306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_16 0x00000518 131462306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_17 0x00000519 131562306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_18 0x0000051A 131662306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_19 0x0000051B 131762306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_20 0x0000051C 131862306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_21 0x0000051D 131962306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_22 0x0000051E 132062306a36Sopenharmony_ci#define DREG_REGID_TRAP_WRITE_23 0x0000051F 132162306a36Sopenharmony_ci#endif 132262306a36Sopenharmony_ci#endif 132362306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC0_LOW 0x00000600 132462306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC1_LOW 0x00000601 132562306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC2_LOW 0x00000602 132662306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC3_LOW 0x00000603 132762306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC0_LOW 0x00000604 132862306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC1_LOW 0x00000605 132962306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC2_LOW 0x00000606 133062306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC3_LOW 0x00000607 133162306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC0_MID 0x00000608 133262306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC1_MID 0x00000609 133362306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC2_MID 0x0000060A 133462306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC3_MID 0x0000060B 133562306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC0_MID 0x0000060C 133662306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC1_MID 0x0000060D 133762306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC2_MID 0x0000060E 133862306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC3_MID 0x0000060F 133962306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC0_HIGH 0x00000610 134062306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC1_HIGH 0x00000611 134162306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC2_HIGH 0x00000612 134262306a36Sopenharmony_ci#define DREG_REGID_MAC0_ACC3_HIGH 0x00000613 134362306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC0_HIGH 0x00000614 134462306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC1_HIGH 0x00000615 134562306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC2_HIGH 0x00000616 134662306a36Sopenharmony_ci#define DREG_REGID_MAC1_ACC3_HIGH 0x00000617 134762306a36Sopenharmony_ci#define DREG_REGID_RSHOUT_LOW 0x00000620 134862306a36Sopenharmony_ci#define DREG_REGID_RSHOUT_MID 0x00000628 134962306a36Sopenharmony_ci#define DREG_REGID_RSHOUT_HIGH 0x00000630 135062306a36Sopenharmony_ci 135162306a36Sopenharmony_ci/* 135262306a36Sopenharmony_ci * The following defines are for the flags in the DMA stream requestor write 135362306a36Sopenharmony_ci */ 135462306a36Sopenharmony_ci#define DSRWP_DSR_MASK 0x0000000F 135562306a36Sopenharmony_ci#define DSRWP_DSR_BG_RQ 0x00000001 135662306a36Sopenharmony_ci#define DSRWP_DSR_PRIORITY_MASK 0x00000006 135762306a36Sopenharmony_ci#define DSRWP_DSR_PRIORITY_0 0x00000000 135862306a36Sopenharmony_ci#define DSRWP_DSR_PRIORITY_1 0x00000002 135962306a36Sopenharmony_ci#define DSRWP_DSR_PRIORITY_2 0x00000004 136062306a36Sopenharmony_ci#define DSRWP_DSR_PRIORITY_3 0x00000006 136162306a36Sopenharmony_ci#define DSRWP_DSR_RQ_PENDING 0x00000008 136262306a36Sopenharmony_ci 136362306a36Sopenharmony_ci/* 136462306a36Sopenharmony_ci * The following defines are for the flags in the trap write port register. 136562306a36Sopenharmony_ci */ 136662306a36Sopenharmony_ci#define TWPR_TW_MASK 0x0000FFFF 136762306a36Sopenharmony_ci#define TWPR_TW_SHIFT 0 136862306a36Sopenharmony_ci 136962306a36Sopenharmony_ci/* 137062306a36Sopenharmony_ci * The following defines are for the flags in the stack pointer write 137162306a36Sopenharmony_ci * register. 137262306a36Sopenharmony_ci */ 137362306a36Sopenharmony_ci#define SPWR_STKP_MASK 0x0000000F 137462306a36Sopenharmony_ci#define SPWR_STKP_SHIFT 0 137562306a36Sopenharmony_ci 137662306a36Sopenharmony_ci/* 137762306a36Sopenharmony_ci * The following defines are for the flags in the SP interrupt register. 137862306a36Sopenharmony_ci */ 137962306a36Sopenharmony_ci#define SPIR_FRI 0x00000001 138062306a36Sopenharmony_ci#define SPIR_DOI 0x00000002 138162306a36Sopenharmony_ci#define SPIR_GPI2 0x00000004 138262306a36Sopenharmony_ci#define SPIR_GPI3 0x00000008 138362306a36Sopenharmony_ci#define SPIR_IP0 0x00000010 138462306a36Sopenharmony_ci#define SPIR_IP1 0x00000020 138562306a36Sopenharmony_ci#define SPIR_IP2 0x00000040 138662306a36Sopenharmony_ci#define SPIR_IP3 0x00000080 138762306a36Sopenharmony_ci 138862306a36Sopenharmony_ci/* 138962306a36Sopenharmony_ci * The following defines are for the flags in the functional group 1 register. 139062306a36Sopenharmony_ci */ 139162306a36Sopenharmony_ci#define FGR1_F1S_MASK 0x0000FFFF 139262306a36Sopenharmony_ci#define FGR1_F1S_SHIFT 0 139362306a36Sopenharmony_ci 139462306a36Sopenharmony_ci/* 139562306a36Sopenharmony_ci * The following defines are for the flags in the SP clock status register. 139662306a36Sopenharmony_ci */ 139762306a36Sopenharmony_ci#define SPCS_FRI 0x00000001 139862306a36Sopenharmony_ci#define SPCS_DOI 0x00000002 139962306a36Sopenharmony_ci#define SPCS_GPI2 0x00000004 140062306a36Sopenharmony_ci#define SPCS_GPI3 0x00000008 140162306a36Sopenharmony_ci#define SPCS_IP0 0x00000010 140262306a36Sopenharmony_ci#define SPCS_IP1 0x00000020 140362306a36Sopenharmony_ci#define SPCS_IP2 0x00000040 140462306a36Sopenharmony_ci#define SPCS_IP3 0x00000080 140562306a36Sopenharmony_ci#define SPCS_SPRUN 0x00000100 140662306a36Sopenharmony_ci#define SPCS_SLEEP 0x00000200 140762306a36Sopenharmony_ci#define SPCS_FG 0x00000400 140862306a36Sopenharmony_ci#define SPCS_ORUN 0x00000800 140962306a36Sopenharmony_ci#define SPCS_IRQ 0x00001000 141062306a36Sopenharmony_ci#define SPCS_FGN_MASK 0x0000E000 141162306a36Sopenharmony_ci#define SPCS_FGN_SHIFT 13 141262306a36Sopenharmony_ci 141362306a36Sopenharmony_ci/* 141462306a36Sopenharmony_ci * The following defines are for the flags in the SP DMA requestor status 141562306a36Sopenharmony_ci * register. 141662306a36Sopenharmony_ci */ 141762306a36Sopenharmony_ci#define SDSR_DCS_MASK 0x000000FF 141862306a36Sopenharmony_ci#define SDSR_DCS_SHIFT 0 141962306a36Sopenharmony_ci#define SDSR_DCS_NONE 0x00000007 142062306a36Sopenharmony_ci 142162306a36Sopenharmony_ci/* 142262306a36Sopenharmony_ci * The following defines are for the flags in the frame timer register. 142362306a36Sopenharmony_ci */ 142462306a36Sopenharmony_ci#define FRMT_FTV_MASK 0x0000FFFF 142562306a36Sopenharmony_ci#define FRMT_FTV_SHIFT 0 142662306a36Sopenharmony_ci 142762306a36Sopenharmony_ci/* 142862306a36Sopenharmony_ci * The following defines are for the flags in the frame timer current count 142962306a36Sopenharmony_ci * register. 143062306a36Sopenharmony_ci */ 143162306a36Sopenharmony_ci#define FRCC_FCC_MASK 0x0000FFFF 143262306a36Sopenharmony_ci#define FRCC_FCC_SHIFT 0 143362306a36Sopenharmony_ci 143462306a36Sopenharmony_ci/* 143562306a36Sopenharmony_ci * The following defines are for the flags in the frame timer save count 143662306a36Sopenharmony_ci * register. 143762306a36Sopenharmony_ci */ 143862306a36Sopenharmony_ci#define FRSC_FCS_MASK 0x0000FFFF 143962306a36Sopenharmony_ci#define FRSC_FCS_SHIFT 0 144062306a36Sopenharmony_ci 144162306a36Sopenharmony_ci/* 144262306a36Sopenharmony_ci * The following define the various flags stored in the scatter/gather 144362306a36Sopenharmony_ci * descriptors. 144462306a36Sopenharmony_ci */ 144562306a36Sopenharmony_ci#define DMA_SG_NEXT_ENTRY_MASK 0x00000FF8 144662306a36Sopenharmony_ci#define DMA_SG_SAMPLE_END_MASK 0x0FFF0000 144762306a36Sopenharmony_ci#define DMA_SG_SAMPLE_END_FLAG 0x10000000 144862306a36Sopenharmony_ci#define DMA_SG_LOOP_END_FLAG 0x20000000 144962306a36Sopenharmony_ci#define DMA_SG_SIGNAL_END_FLAG 0x40000000 145062306a36Sopenharmony_ci#define DMA_SG_SIGNAL_PAGE_FLAG 0x80000000 145162306a36Sopenharmony_ci#define DMA_SG_NEXT_ENTRY_SHIFT 3 145262306a36Sopenharmony_ci#define DMA_SG_SAMPLE_END_SHIFT 16 145362306a36Sopenharmony_ci 145462306a36Sopenharmony_ci/* 145562306a36Sopenharmony_ci * The following define the offsets of the fields within the on-chip generic 145662306a36Sopenharmony_ci * DMA requestor. 145762306a36Sopenharmony_ci */ 145862306a36Sopenharmony_ci#define DMA_RQ_CONTROL1 0x00000000 145962306a36Sopenharmony_ci#define DMA_RQ_CONTROL2 0x00000004 146062306a36Sopenharmony_ci#define DMA_RQ_SOURCE_ADDR 0x00000008 146162306a36Sopenharmony_ci#define DMA_RQ_DESTINATION_ADDR 0x0000000C 146262306a36Sopenharmony_ci#define DMA_RQ_NEXT_PAGE_ADDR 0x00000010 146362306a36Sopenharmony_ci#define DMA_RQ_NEXT_PAGE_SGDESC 0x00000014 146462306a36Sopenharmony_ci#define DMA_RQ_LOOP_START_ADDR 0x00000018 146562306a36Sopenharmony_ci#define DMA_RQ_POST_LOOP_ADDR 0x0000001C 146662306a36Sopenharmony_ci#define DMA_RQ_PAGE_MAP_ADDR 0x00000020 146762306a36Sopenharmony_ci 146862306a36Sopenharmony_ci/* 146962306a36Sopenharmony_ci * The following defines are for the flags in the first control word of the 147062306a36Sopenharmony_ci * on-chip generic DMA requestor. 147162306a36Sopenharmony_ci */ 147262306a36Sopenharmony_ci#define DMA_RQ_C1_COUNT_MASK 0x000003FF 147362306a36Sopenharmony_ci#define DMA_RQ_C1_DESTINATION_SCATTER 0x00001000 147462306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_GATHER 0x00002000 147562306a36Sopenharmony_ci#define DMA_RQ_C1_DONE_FLAG 0x00004000 147662306a36Sopenharmony_ci#define DMA_RQ_C1_OPTIMIZE_STATE 0x00008000 147762306a36Sopenharmony_ci#define DMA_RQ_C1_SAMPLE_END_STATE_MASK 0x00030000 147862306a36Sopenharmony_ci#define DMA_RQ_C1_FULL_PAGE 0x00000000 147962306a36Sopenharmony_ci#define DMA_RQ_C1_BEFORE_SAMPLE_END 0x00010000 148062306a36Sopenharmony_ci#define DMA_RQ_C1_PAGE_MAP_ERROR 0x00020000 148162306a36Sopenharmony_ci#define DMA_RQ_C1_AT_SAMPLE_END 0x00030000 148262306a36Sopenharmony_ci#define DMA_RQ_C1_LOOP_END_STATE_MASK 0x000C0000 148362306a36Sopenharmony_ci#define DMA_RQ_C1_NOT_LOOP_END 0x00000000 148462306a36Sopenharmony_ci#define DMA_RQ_C1_BEFORE_LOOP_END 0x00040000 148562306a36Sopenharmony_ci#define DMA_RQ_C1_2PAGE_LOOP_BEGIN 0x00080000 148662306a36Sopenharmony_ci#define DMA_RQ_C1_LOOP_BEGIN 0x000C0000 148762306a36Sopenharmony_ci#define DMA_RQ_C1_PAGE_MAP_MASK 0x00300000 148862306a36Sopenharmony_ci#define DMA_RQ_C1_PM_NONE_PENDING 0x00000000 148962306a36Sopenharmony_ci#define DMA_RQ_C1_PM_NEXT_PENDING 0x00100000 149062306a36Sopenharmony_ci#define DMA_RQ_C1_PM_RESERVED 0x00200000 149162306a36Sopenharmony_ci#define DMA_RQ_C1_PM_LOOP_NEXT_PENDING 0x00300000 149262306a36Sopenharmony_ci#define DMA_RQ_C1_WRITEBACK_DEST_FLAG 0x00400000 149362306a36Sopenharmony_ci#define DMA_RQ_C1_WRITEBACK_SRC_FLAG 0x00800000 149462306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_SIZE_MASK 0x07000000 149562306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_LINEAR 0x00000000 149662306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_MOD16 0x01000000 149762306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_MOD32 0x02000000 149862306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_MOD64 0x03000000 149962306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_MOD128 0x04000000 150062306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_MOD256 0x05000000 150162306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_MOD512 0x06000000 150262306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_MOD1024 0x07000000 150362306a36Sopenharmony_ci#define DMA_RQ_C1_DEST_ON_HOST 0x08000000 150462306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_SIZE_MASK 0x70000000 150562306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_LINEAR 0x00000000 150662306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_MOD16 0x10000000 150762306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_MOD32 0x20000000 150862306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_MOD64 0x30000000 150962306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_MOD128 0x40000000 151062306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_MOD256 0x50000000 151162306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_MOD512 0x60000000 151262306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_MOD1024 0x70000000 151362306a36Sopenharmony_ci#define DMA_RQ_C1_SOURCE_ON_HOST 0x80000000 151462306a36Sopenharmony_ci#define DMA_RQ_C1_COUNT_SHIFT 0 151562306a36Sopenharmony_ci 151662306a36Sopenharmony_ci/* 151762306a36Sopenharmony_ci * The following defines are for the flags in the second control word of the 151862306a36Sopenharmony_ci * on-chip generic DMA requestor. 151962306a36Sopenharmony_ci */ 152062306a36Sopenharmony_ci#define DMA_RQ_C2_VIRTUAL_CHANNEL_MASK 0x0000003F 152162306a36Sopenharmony_ci#define DMA_RQ_C2_VIRTUAL_SIGNAL_MASK 0x00000300 152262306a36Sopenharmony_ci#define DMA_RQ_C2_NO_VIRTUAL_SIGNAL 0x00000000 152362306a36Sopenharmony_ci#define DMA_RQ_C2_SIGNAL_EVERY_DMA 0x00000100 152462306a36Sopenharmony_ci#define DMA_RQ_C2_SIGNAL_SOURCE_PINGPONG 0x00000200 152562306a36Sopenharmony_ci#define DMA_RQ_C2_SIGNAL_DEST_PINGPONG 0x00000300 152662306a36Sopenharmony_ci#define DMA_RQ_C2_AUDIO_CONVERT_MASK 0x0000F000 152762306a36Sopenharmony_ci#define DMA_RQ_C2_AC_NONE 0x00000000 152862306a36Sopenharmony_ci#define DMA_RQ_C2_AC_8_TO_16_BIT 0x00001000 152962306a36Sopenharmony_ci#define DMA_RQ_C2_AC_MONO_TO_STEREO 0x00002000 153062306a36Sopenharmony_ci#define DMA_RQ_C2_AC_ENDIAN_CONVERT 0x00004000 153162306a36Sopenharmony_ci#define DMA_RQ_C2_AC_SIGNED_CONVERT 0x00008000 153262306a36Sopenharmony_ci#define DMA_RQ_C2_LOOP_END_MASK 0x0FFF0000 153362306a36Sopenharmony_ci#define DMA_RQ_C2_LOOP_MASK 0x30000000 153462306a36Sopenharmony_ci#define DMA_RQ_C2_NO_LOOP 0x00000000 153562306a36Sopenharmony_ci#define DMA_RQ_C2_ONE_PAGE_LOOP 0x10000000 153662306a36Sopenharmony_ci#define DMA_RQ_C2_TWO_PAGE_LOOP 0x20000000 153762306a36Sopenharmony_ci#define DMA_RQ_C2_MULTI_PAGE_LOOP 0x30000000 153862306a36Sopenharmony_ci#define DMA_RQ_C2_SIGNAL_LOOP_BACK 0x40000000 153962306a36Sopenharmony_ci#define DMA_RQ_C2_SIGNAL_POST_BEGIN_PAGE 0x80000000 154062306a36Sopenharmony_ci#define DMA_RQ_C2_VIRTUAL_CHANNEL_SHIFT 0 154162306a36Sopenharmony_ci#define DMA_RQ_C2_LOOP_END_SHIFT 16 154262306a36Sopenharmony_ci 154362306a36Sopenharmony_ci/* 154462306a36Sopenharmony_ci * The following defines are for the flags in the source and destination words 154562306a36Sopenharmony_ci * of the on-chip generic DMA requestor. 154662306a36Sopenharmony_ci */ 154762306a36Sopenharmony_ci#define DMA_RQ_SD_ADDRESS_MASK 0x0000FFFF 154862306a36Sopenharmony_ci#define DMA_RQ_SD_MEMORY_ID_MASK 0x000F0000 154962306a36Sopenharmony_ci#define DMA_RQ_SD_SP_PARAM_ADDR 0x00000000 155062306a36Sopenharmony_ci#define DMA_RQ_SD_SP_SAMPLE_ADDR 0x00010000 155162306a36Sopenharmony_ci#define DMA_RQ_SD_SP_PROGRAM_ADDR 0x00020000 155262306a36Sopenharmony_ci#define DMA_RQ_SD_SP_DEBUG_ADDR 0x00030000 155362306a36Sopenharmony_ci#define DMA_RQ_SD_OMNIMEM_ADDR 0x000E0000 155462306a36Sopenharmony_ci#define DMA_RQ_SD_END_FLAG 0x40000000 155562306a36Sopenharmony_ci#define DMA_RQ_SD_ERROR_FLAG 0x80000000 155662306a36Sopenharmony_ci#define DMA_RQ_SD_ADDRESS_SHIFT 0 155762306a36Sopenharmony_ci 155862306a36Sopenharmony_ci/* 155962306a36Sopenharmony_ci * The following defines are for the flags in the page map address word of the 156062306a36Sopenharmony_ci * on-chip generic DMA requestor. 156162306a36Sopenharmony_ci */ 156262306a36Sopenharmony_ci#define DMA_RQ_PMA_LOOP_THIRD_PAGE_ENTRY_MASK 0x00000FF8 156362306a36Sopenharmony_ci#define DMA_RQ_PMA_PAGE_TABLE_MASK 0xFFFFF000 156462306a36Sopenharmony_ci#define DMA_RQ_PMA_LOOP_THIRD_PAGE_ENTRY_SHIFT 3 156562306a36Sopenharmony_ci#define DMA_RQ_PMA_PAGE_TABLE_SHIFT 12 156662306a36Sopenharmony_ci 156762306a36Sopenharmony_ci#define BA1_VARIDEC_BUF_1 0x000 156862306a36Sopenharmony_ci 156962306a36Sopenharmony_ci#define BA1_PDTC 0x0c0 /* BA1_PLAY_DMA_TRANSACTION_COUNT_REG */ 157062306a36Sopenharmony_ci#define BA1_PFIE 0x0c4 /* BA1_PLAY_FORMAT_&_INTERRUPT_ENABLE_REG */ 157162306a36Sopenharmony_ci#define BA1_PBA 0x0c8 /* BA1_PLAY_BUFFER_ADDRESS */ 157262306a36Sopenharmony_ci#define BA1_PVOL 0x0f8 /* BA1_PLAY_VOLUME_REG */ 157362306a36Sopenharmony_ci#define BA1_PSRC 0x288 /* BA1_PLAY_SAMPLE_RATE_CORRECTION_REG */ 157462306a36Sopenharmony_ci#define BA1_PCTL 0x2a4 /* BA1_PLAY_CONTROL_REG */ 157562306a36Sopenharmony_ci#define BA1_PPI 0x2b4 /* BA1_PLAY_PHASE_INCREMENT_REG */ 157662306a36Sopenharmony_ci 157762306a36Sopenharmony_ci#define BA1_CCTL 0x064 /* BA1_CAPTURE_CONTROL_REG */ 157862306a36Sopenharmony_ci#define BA1_CIE 0x104 /* BA1_CAPTURE_INTERRUPT_ENABLE_REG */ 157962306a36Sopenharmony_ci#define BA1_CBA 0x10c /* BA1_CAPTURE_BUFFER_ADDRESS */ 158062306a36Sopenharmony_ci#define BA1_CSRC 0x2c8 /* BA1_CAPTURE_SAMPLE_RATE_CORRECTION_REG */ 158162306a36Sopenharmony_ci#define BA1_CCI 0x2d8 /* BA1_CAPTURE_COEFFICIENT_INCREMENT_REG */ 158262306a36Sopenharmony_ci#define BA1_CD 0x2e0 /* BA1_CAPTURE_DELAY_REG */ 158362306a36Sopenharmony_ci#define BA1_CPI 0x2f4 /* BA1_CAPTURE_PHASE_INCREMENT_REG */ 158462306a36Sopenharmony_ci#define BA1_CVOL 0x2f8 /* BA1_CAPTURE_VOLUME_REG */ 158562306a36Sopenharmony_ci 158662306a36Sopenharmony_ci#define BA1_CFG1 0x134 /* BA1_CAPTURE_FRAME_GROUP_1_REG */ 158762306a36Sopenharmony_ci#define BA1_CFG2 0x138 /* BA1_CAPTURE_FRAME_GROUP_2_REG */ 158862306a36Sopenharmony_ci#define BA1_CCST 0x13c /* BA1_CAPTURE_CONSTANT_REG */ 158962306a36Sopenharmony_ci#define BA1_CSPB 0x340 /* BA1_CAPTURE_SPB_ADDRESS */ 159062306a36Sopenharmony_ci 159162306a36Sopenharmony_ci/* 159262306a36Sopenharmony_ci * 159362306a36Sopenharmony_ci */ 159462306a36Sopenharmony_ci 159562306a36Sopenharmony_ci#define CS46XX_MODE_OUTPUT (1<<0) /* MIDI UART - output */ 159662306a36Sopenharmony_ci#define CS46XX_MODE_INPUT (1<<1) /* MIDI UART - input */ 159762306a36Sopenharmony_ci 159862306a36Sopenharmony_ci/* 159962306a36Sopenharmony_ci * 160062306a36Sopenharmony_ci */ 160162306a36Sopenharmony_ci 160262306a36Sopenharmony_ci#define SAVE_REG_MAX 0x10 160362306a36Sopenharmony_ci#define POWER_DOWN_ALL 0x7f0f 160462306a36Sopenharmony_ci 160562306a36Sopenharmony_ci/* maxinum number of AC97 codecs connected, AC97 2.0 defined 4 */ 160662306a36Sopenharmony_ci#define MAX_NR_AC97 4 160762306a36Sopenharmony_ci#define CS46XX_PRIMARY_CODEC_INDEX 0 160862306a36Sopenharmony_ci#define CS46XX_SECONDARY_CODEC_INDEX 1 160962306a36Sopenharmony_ci#define CS46XX_SECONDARY_CODEC_OFFSET 0x80 161062306a36Sopenharmony_ci#define CS46XX_DSP_CAPTURE_CHANNEL 1 161162306a36Sopenharmony_ci 161262306a36Sopenharmony_ci/* capture */ 161362306a36Sopenharmony_ci#define CS46XX_DSP_CAPTURE_CHANNEL 1 161462306a36Sopenharmony_ci 161562306a36Sopenharmony_ci/* mixer */ 161662306a36Sopenharmony_ci#define CS46XX_MIXER_SPDIF_INPUT_ELEMENT 1 161762306a36Sopenharmony_ci#define CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT 2 161862306a36Sopenharmony_ci 161962306a36Sopenharmony_ci 162062306a36Sopenharmony_cistruct snd_cs46xx_pcm { 162162306a36Sopenharmony_ci struct snd_dma_buffer hw_buf; 162262306a36Sopenharmony_ci 162362306a36Sopenharmony_ci unsigned int ctl; 162462306a36Sopenharmony_ci unsigned int shift; /* Shift count to trasform frames in bytes */ 162562306a36Sopenharmony_ci struct snd_pcm_indirect pcm_rec; 162662306a36Sopenharmony_ci struct snd_pcm_substream *substream; 162762306a36Sopenharmony_ci 162862306a36Sopenharmony_ci struct dsp_pcm_channel_descriptor * pcm_channel; 162962306a36Sopenharmony_ci 163062306a36Sopenharmony_ci int pcm_channel_id; /* Fron Rear, Center Lfe ... */ 163162306a36Sopenharmony_ci}; 163262306a36Sopenharmony_ci 163362306a36Sopenharmony_cistruct snd_cs46xx_region { 163462306a36Sopenharmony_ci char name[24]; 163562306a36Sopenharmony_ci unsigned long base; 163662306a36Sopenharmony_ci void __iomem *remap_addr; 163762306a36Sopenharmony_ci unsigned long size; 163862306a36Sopenharmony_ci}; 163962306a36Sopenharmony_ci 164062306a36Sopenharmony_cistruct snd_cs46xx { 164162306a36Sopenharmony_ci int irq; 164262306a36Sopenharmony_ci unsigned long ba0_addr; 164362306a36Sopenharmony_ci unsigned long ba1_addr; 164462306a36Sopenharmony_ci union { 164562306a36Sopenharmony_ci struct { 164662306a36Sopenharmony_ci struct snd_cs46xx_region ba0; 164762306a36Sopenharmony_ci struct snd_cs46xx_region data0; 164862306a36Sopenharmony_ci struct snd_cs46xx_region data1; 164962306a36Sopenharmony_ci struct snd_cs46xx_region pmem; 165062306a36Sopenharmony_ci struct snd_cs46xx_region reg; 165162306a36Sopenharmony_ci } name; 165262306a36Sopenharmony_ci struct snd_cs46xx_region idx[5]; 165362306a36Sopenharmony_ci } region; 165462306a36Sopenharmony_ci 165562306a36Sopenharmony_ci unsigned int mode; 165662306a36Sopenharmony_ci 165762306a36Sopenharmony_ci struct { 165862306a36Sopenharmony_ci struct snd_dma_buffer hw_buf; 165962306a36Sopenharmony_ci 166062306a36Sopenharmony_ci unsigned int ctl; 166162306a36Sopenharmony_ci unsigned int shift; /* Shift count to trasform frames in bytes */ 166262306a36Sopenharmony_ci struct snd_pcm_indirect pcm_rec; 166362306a36Sopenharmony_ci struct snd_pcm_substream *substream; 166462306a36Sopenharmony_ci } capt; 166562306a36Sopenharmony_ci 166662306a36Sopenharmony_ci 166762306a36Sopenharmony_ci int nr_ac97_codecs; 166862306a36Sopenharmony_ci struct snd_ac97_bus *ac97_bus; 166962306a36Sopenharmony_ci struct snd_ac97 *ac97[MAX_NR_AC97]; 167062306a36Sopenharmony_ci 167162306a36Sopenharmony_ci struct pci_dev *pci; 167262306a36Sopenharmony_ci struct snd_card *card; 167362306a36Sopenharmony_ci struct snd_pcm *pcm; 167462306a36Sopenharmony_ci 167562306a36Sopenharmony_ci struct snd_rawmidi *rmidi; 167662306a36Sopenharmony_ci struct snd_rawmidi_substream *midi_input; 167762306a36Sopenharmony_ci struct snd_rawmidi_substream *midi_output; 167862306a36Sopenharmony_ci 167962306a36Sopenharmony_ci spinlock_t reg_lock; 168062306a36Sopenharmony_ci unsigned int midcr; 168162306a36Sopenharmony_ci unsigned int uartm; 168262306a36Sopenharmony_ci 168362306a36Sopenharmony_ci int amplifier; 168462306a36Sopenharmony_ci void (*amplifier_ctrl)(struct snd_cs46xx *, int); 168562306a36Sopenharmony_ci void (*active_ctrl)(struct snd_cs46xx *, int); 168662306a36Sopenharmony_ci void (*mixer_init)(struct snd_cs46xx *); 168762306a36Sopenharmony_ci 168862306a36Sopenharmony_ci int acpi_port; 168962306a36Sopenharmony_ci struct snd_kcontrol *eapd_switch; /* for amplifier hack */ 169062306a36Sopenharmony_ci int accept_valid; /* accept mmap valid (for OSS) */ 169162306a36Sopenharmony_ci int in_suspend; 169262306a36Sopenharmony_ci 169362306a36Sopenharmony_ci struct gameport *gameport; 169462306a36Sopenharmony_ci 169562306a36Sopenharmony_ci#ifdef CONFIG_SND_CS46XX_NEW_DSP 169662306a36Sopenharmony_ci struct mutex spos_mutex; 169762306a36Sopenharmony_ci 169862306a36Sopenharmony_ci struct dsp_spos_instance * dsp_spos_instance; 169962306a36Sopenharmony_ci 170062306a36Sopenharmony_ci struct snd_pcm *pcm_rear; 170162306a36Sopenharmony_ci struct snd_pcm *pcm_center_lfe; 170262306a36Sopenharmony_ci struct snd_pcm *pcm_iec958; 170362306a36Sopenharmony_ci 170462306a36Sopenharmony_ci#define CS46XX_DSP_MODULES 5 170562306a36Sopenharmony_ci struct dsp_module_desc *modules[CS46XX_DSP_MODULES]; 170662306a36Sopenharmony_ci#else /* for compatibility */ 170762306a36Sopenharmony_ci struct snd_cs46xx_pcm *playback_pcm; 170862306a36Sopenharmony_ci unsigned int play_ctl; 170962306a36Sopenharmony_ci 171062306a36Sopenharmony_ci struct ba1_struct *ba1; 171162306a36Sopenharmony_ci#endif 171262306a36Sopenharmony_ci 171362306a36Sopenharmony_ci#ifdef CONFIG_PM_SLEEP 171462306a36Sopenharmony_ci u32 *saved_regs; 171562306a36Sopenharmony_ci#endif 171662306a36Sopenharmony_ci}; 171762306a36Sopenharmony_ci 171862306a36Sopenharmony_ciint snd_cs46xx_create(struct snd_card *card, 171962306a36Sopenharmony_ci struct pci_dev *pci, 172062306a36Sopenharmony_ci int external_amp, int thinkpad); 172162306a36Sopenharmony_ciextern const struct dev_pm_ops snd_cs46xx_pm; 172262306a36Sopenharmony_ci 172362306a36Sopenharmony_ciint snd_cs46xx_pcm(struct snd_cs46xx *chip, int device); 172462306a36Sopenharmony_ciint snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device); 172562306a36Sopenharmony_ciint snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device); 172662306a36Sopenharmony_ciint snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device); 172762306a36Sopenharmony_ciint snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device); 172862306a36Sopenharmony_ciint snd_cs46xx_midi(struct snd_cs46xx *chip, int device); 172962306a36Sopenharmony_ciint snd_cs46xx_start_dsp(struct snd_cs46xx *chip); 173062306a36Sopenharmony_ciint snd_cs46xx_gameport(struct snd_cs46xx *chip); 173162306a36Sopenharmony_ci 173262306a36Sopenharmony_ci#endif /* __SOUND_CS46XX_H */ 1733