1*d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 24ede028fSHans-Christian Egtvedt /* 38321fc01SHans-Christian Egtvedt * Register definitions for Atmel AC97C 44ede028fSHans-Christian Egtvedt * 54ede028fSHans-Christian Egtvedt * Copyright (C) 2005-2009 Atmel Corporation 64ede028fSHans-Christian Egtvedt */ 74ede028fSHans-Christian Egtvedt #ifndef __SOUND_ATMEL_AC97C_H 84ede028fSHans-Christian Egtvedt #define __SOUND_ATMEL_AC97C_H 94ede028fSHans-Christian Egtvedt 104ede028fSHans-Christian Egtvedt #define AC97C_MR 0x08 114ede028fSHans-Christian Egtvedt #define AC97C_ICA 0x10 124ede028fSHans-Christian Egtvedt #define AC97C_OCA 0x14 134ede028fSHans-Christian Egtvedt #define AC97C_CARHR 0x20 144ede028fSHans-Christian Egtvedt #define AC97C_CATHR 0x24 154ede028fSHans-Christian Egtvedt #define AC97C_CASR 0x28 164ede028fSHans-Christian Egtvedt #define AC97C_CAMR 0x2c 174ede028fSHans-Christian Egtvedt #define AC97C_CORHR 0x40 184ede028fSHans-Christian Egtvedt #define AC97C_COTHR 0x44 194ede028fSHans-Christian Egtvedt #define AC97C_COSR 0x48 204ede028fSHans-Christian Egtvedt #define AC97C_COMR 0x4c 214ede028fSHans-Christian Egtvedt #define AC97C_SR 0x50 224ede028fSHans-Christian Egtvedt #define AC97C_IER 0x54 234ede028fSHans-Christian Egtvedt #define AC97C_IDR 0x58 244ede028fSHans-Christian Egtvedt #define AC97C_IMR 0x5c 254ede028fSHans-Christian Egtvedt #define AC97C_VERSION 0xfc 264ede028fSHans-Christian Egtvedt 274ede028fSHans-Christian Egtvedt #define AC97C_CATPR PDC_TPR 284ede028fSHans-Christian Egtvedt #define AC97C_CATCR PDC_TCR 294ede028fSHans-Christian Egtvedt #define AC97C_CATNPR PDC_TNPR 304ede028fSHans-Christian Egtvedt #define AC97C_CATNCR PDC_TNCR 314ede028fSHans-Christian Egtvedt #define AC97C_CARPR PDC_RPR 324ede028fSHans-Christian Egtvedt #define AC97C_CARCR PDC_RCR 334ede028fSHans-Christian Egtvedt #define AC97C_CARNPR PDC_RNPR 344ede028fSHans-Christian Egtvedt #define AC97C_CARNCR PDC_RNCR 354ede028fSHans-Christian Egtvedt #define AC97C_PTCR PDC_PTCR 364ede028fSHans-Christian Egtvedt 374ede028fSHans-Christian Egtvedt #define AC97C_MR_ENA (1 << 0) 384ede028fSHans-Christian Egtvedt #define AC97C_MR_WRST (1 << 1) 394ede028fSHans-Christian Egtvedt #define AC97C_MR_VRA (1 << 2) 404ede028fSHans-Christian Egtvedt 414ede028fSHans-Christian Egtvedt #define AC97C_CSR_TXRDY (1 << 0) 428321fc01SHans-Christian Egtvedt #define AC97C_CSR_TXEMPTY (1 << 1) 434ede028fSHans-Christian Egtvedt #define AC97C_CSR_UNRUN (1 << 2) 444ede028fSHans-Christian Egtvedt #define AC97C_CSR_RXRDY (1 << 4) 458321fc01SHans-Christian Egtvedt #define AC97C_CSR_OVRUN (1 << 5) 464ede028fSHans-Christian Egtvedt #define AC97C_CSR_ENDTX (1 << 10) 474ede028fSHans-Christian Egtvedt #define AC97C_CSR_ENDRX (1 << 14) 484ede028fSHans-Christian Egtvedt 494ede028fSHans-Christian Egtvedt #define AC97C_CMR_SIZE_20 (0 << 16) 504ede028fSHans-Christian Egtvedt #define AC97C_CMR_SIZE_18 (1 << 16) 514ede028fSHans-Christian Egtvedt #define AC97C_CMR_SIZE_16 (2 << 16) 524ede028fSHans-Christian Egtvedt #define AC97C_CMR_SIZE_10 (3 << 16) 534ede028fSHans-Christian Egtvedt #define AC97C_CMR_CEM_LITTLE (1 << 18) 544ede028fSHans-Christian Egtvedt #define AC97C_CMR_CEM_BIG (0 << 18) 554ede028fSHans-Christian Egtvedt #define AC97C_CMR_CENA (1 << 21) 564ede028fSHans-Christian Egtvedt #define AC97C_CMR_DMAEN (1 << 22) 574ede028fSHans-Christian Egtvedt 584ede028fSHans-Christian Egtvedt #define AC97C_SR_CAEVT (1 << 3) 598321fc01SHans-Christian Egtvedt #define AC97C_SR_COEVT (1 << 2) 608321fc01SHans-Christian Egtvedt #define AC97C_SR_WKUP (1 << 1) 618321fc01SHans-Christian Egtvedt #define AC97C_SR_SOF (1 << 0) 624ede028fSHans-Christian Egtvedt 638321fc01SHans-Christian Egtvedt #define AC97C_CH_MASK(slot) \ 648321fc01SHans-Christian Egtvedt (0x7 << (3 * (AC97_SLOT_##slot - 3))) 654ede028fSHans-Christian Egtvedt #define AC97C_CH_ASSIGN(slot, channel) \ 664ede028fSHans-Christian Egtvedt (AC97C_CHANNEL_##channel << (3 * (AC97_SLOT_##slot - 3))) 674ede028fSHans-Christian Egtvedt #define AC97C_CHANNEL_NONE 0x0 684ede028fSHans-Christian Egtvedt #define AC97C_CHANNEL_A 0x1 694ede028fSHans-Christian Egtvedt 704ede028fSHans-Christian Egtvedt #endif /* __SOUND_ATMEL_AC97C_H */ 71