Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Register definitions for Atmel AC97C
0004  *
0005  * Copyright (C) 2005-2009 Atmel Corporation
0006  */
0007 #ifndef __SOUND_ATMEL_AC97C_H
0008 #define __SOUND_ATMEL_AC97C_H
0009 
0010 #define AC97C_MR        0x08
0011 #define AC97C_ICA       0x10
0012 #define AC97C_OCA       0x14
0013 #define AC97C_CARHR     0x20
0014 #define AC97C_CATHR     0x24
0015 #define AC97C_CASR      0x28
0016 #define AC97C_CAMR      0x2c
0017 #define AC97C_CORHR     0x40
0018 #define AC97C_COTHR     0x44
0019 #define AC97C_COSR      0x48
0020 #define AC97C_COMR      0x4c
0021 #define AC97C_SR        0x50
0022 #define AC97C_IER       0x54
0023 #define AC97C_IDR       0x58
0024 #define AC97C_IMR       0x5c
0025 #define AC97C_VERSION       0xfc
0026 
0027 #define AC97C_CATPR     PDC_TPR
0028 #define AC97C_CATCR     PDC_TCR
0029 #define AC97C_CATNPR        PDC_TNPR
0030 #define AC97C_CATNCR        PDC_TNCR
0031 #define AC97C_CARPR     PDC_RPR
0032 #define AC97C_CARCR     PDC_RCR
0033 #define AC97C_CARNPR        PDC_RNPR
0034 #define AC97C_CARNCR        PDC_RNCR
0035 #define AC97C_PTCR      PDC_PTCR
0036 
0037 #define AC97C_MR_ENA        (1 << 0)
0038 #define AC97C_MR_WRST       (1 << 1)
0039 #define AC97C_MR_VRA        (1 << 2)
0040 
0041 #define AC97C_CSR_TXRDY     (1 << 0)
0042 #define AC97C_CSR_TXEMPTY   (1 << 1)
0043 #define AC97C_CSR_UNRUN     (1 << 2)
0044 #define AC97C_CSR_RXRDY     (1 << 4)
0045 #define AC97C_CSR_OVRUN     (1 << 5)
0046 #define AC97C_CSR_ENDTX     (1 << 10)
0047 #define AC97C_CSR_ENDRX     (1 << 14)
0048 
0049 #define AC97C_CMR_SIZE_20   (0 << 16)
0050 #define AC97C_CMR_SIZE_18   (1 << 16)
0051 #define AC97C_CMR_SIZE_16   (2 << 16)
0052 #define AC97C_CMR_SIZE_10   (3 << 16)
0053 #define AC97C_CMR_CEM_LITTLE    (1 << 18)
0054 #define AC97C_CMR_CEM_BIG   (0 << 18)
0055 #define AC97C_CMR_CENA      (1 << 21)
0056 #define AC97C_CMR_DMAEN     (1 << 22)
0057 
0058 #define AC97C_SR_CAEVT      (1 << 3)
0059 #define AC97C_SR_COEVT      (1 << 2)
0060 #define AC97C_SR_WKUP       (1 << 1)
0061 #define AC97C_SR_SOF        (1 << 0)
0062 
0063 #define AC97C_CH_MASK(slot)                     \
0064     (0x7 << (3 * (AC97_SLOT_##slot - 3)))
0065 #define AC97C_CH_ASSIGN(slot, channel)                  \
0066     (AC97C_CHANNEL_##channel << (3 * (AC97_SLOT_##slot - 3)))
0067 #define AC97C_CHANNEL_NONE  0x0
0068 #define AC97C_CHANNEL_A     0x1
0069 
0070 #endif /* __SOUND_ATMEL_AC97C_H */