18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * include/asm-ppc/mpc52xx_psc.h 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Definitions of consts/structs to drive the Freescale MPC52xx OnChip 58c2ecf20Sopenharmony_ci * PSCs. Theses are shared between multiple drivers since a PSC can be 68c2ecf20Sopenharmony_ci * UART, AC97, IR, I2S, ... So this header is in asm-ppc. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Maintainer : Sylvain Munaut <tnt@246tNt.com> 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Based/Extracted from some header of the 2.4 originally written by 128c2ecf20Sopenharmony_ci * Dale Farnsworth <dfarnsworth@mvista.com> 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * Copyright (C) 2004 Sylvain Munaut <tnt@246tNt.com> 158c2ecf20Sopenharmony_ci * Copyright (C) 2003 MontaVista, Software, Inc. 168c2ecf20Sopenharmony_ci * 178c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public License 188c2ecf20Sopenharmony_ci * version 2. This program is licensed "as is" without any warranty of any 198c2ecf20Sopenharmony_ci * kind, whether express or implied. 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#ifndef __ASM_MPC52xx_PSC_H__ 238c2ecf20Sopenharmony_ci#define __ASM_MPC52xx_PSC_H__ 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#include <asm/types.h> 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* Max number of PSCs */ 288c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC_MPC512x 298c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MAXNUM 12 308c2ecf20Sopenharmony_ci#else 318c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MAXNUM 6 328c2ecf20Sopenharmony_ci#endif 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci/* Programmable Serial Controller (PSC) status register bits */ 358c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_UNEX_RX 0x0001 368c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_DATA_VAL 0x0002 378c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_DATA_OVR 0x0004 388c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_CMDSEND 0x0008 398c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_CDE 0x0080 408c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_RXRDY 0x0100 418c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_RXFULL 0x0200 428c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_TXRDY 0x0400 438c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_TXEMP 0x0800 448c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_OE 0x1000 458c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_PE 0x2000 468c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_FE 0x4000 478c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SR_RB 0x8000 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci/* PSC Command values */ 508c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RX_ENABLE 0x0001 518c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RX_DISABLE 0x0002 528c2ecf20Sopenharmony_ci#define MPC52xx_PSC_TX_ENABLE 0x0004 538c2ecf20Sopenharmony_ci#define MPC52xx_PSC_TX_DISABLE 0x0008 548c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SEL_MODE_REG_1 0x0010 558c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RST_RX 0x0020 568c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RST_TX 0x0030 578c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RST_ERR_STAT 0x0040 588c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RST_BRK_CHG_INT 0x0050 598c2ecf20Sopenharmony_ci#define MPC52xx_PSC_START_BRK 0x0060 608c2ecf20Sopenharmony_ci#define MPC52xx_PSC_STOP_BRK 0x0070 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci/* PSC TxRx FIFO status bits */ 638c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RXTX_FIFO_ERR 0x0040 648c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RXTX_FIFO_UF 0x0020 658c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RXTX_FIFO_OF 0x0010 668c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RXTX_FIFO_FR 0x0008 678c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RXTX_FIFO_FULL 0x0004 688c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RXTX_FIFO_ALARM 0x0002 698c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RXTX_FIFO_EMPTY 0x0001 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci/* PSC interrupt status/mask bits */ 728c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_UNEX_RX_SLOT 0x0001 738c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_DATA_VALID 0x0002 748c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_DATA_OVR 0x0004 758c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_CMD_SEND 0x0008 768c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_ERROR 0x0040 778c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_DEOF 0x0080 788c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_TXRDY 0x0100 798c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_RXRDY 0x0200 808c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_DB 0x0400 818c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_TXEMP 0x0800 828c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_ORERR 0x1000 838c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IMR_IPC 0x8000 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci/* PSC input port change bits */ 868c2ecf20Sopenharmony_ci#define MPC52xx_PSC_CTS 0x01 878c2ecf20Sopenharmony_ci#define MPC52xx_PSC_DCD 0x02 888c2ecf20Sopenharmony_ci#define MPC52xx_PSC_D_CTS 0x10 898c2ecf20Sopenharmony_ci#define MPC52xx_PSC_D_DCD 0x20 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci/* PSC acr bits */ 928c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IEC_CTS 0x01 938c2ecf20Sopenharmony_ci#define MPC52xx_PSC_IEC_DCD 0x02 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci/* PSC output port bits */ 968c2ecf20Sopenharmony_ci#define MPC52xx_PSC_OP_RTS 0x01 978c2ecf20Sopenharmony_ci#define MPC52xx_PSC_OP_RES 0x02 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci/* PSC mode fields */ 1008c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_5_BITS 0x00 1018c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_6_BITS 0x01 1028c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_7_BITS 0x02 1038c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_8_BITS 0x03 1048c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_BITS_MASK 0x03 1058c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_PAREVEN 0x00 1068c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_PARODD 0x04 1078c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_PARFORCE 0x08 1088c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_PARNONE 0x10 1098c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_ERR 0x20 1108c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_FFULL 0x40 1118c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_RXRTS 0x80 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_ONE_STOP_5_BITS 0x00 1148c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_ONE_STOP 0x07 1158c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_TWO_STOP 0x0f 1168c2ecf20Sopenharmony_ci#define MPC52xx_PSC_MODE_TXCTS 0x10 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci#define MPC52xx_PSC_RFNUM_MASK 0x01ff 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_DTS1 (1 << 29) 1218c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SHDR (1 << 28) 1228c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_MASK (0xf << 24) 1238c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_UART (0x0 << 24) 1248c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_UART_DCD (0x8 << 24) 1258c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_CODEC_8 (0x1 << 24) 1268c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_CODEC_16 (0x2 << 24) 1278c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_AC97 (0x3 << 24) 1288c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_SIR (0x8 << 24) 1298c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_SIR_DCD (0xc << 24) 1308c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_MIR (0x5 << 24) 1318c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_FIR (0x6 << 24) 1328c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_CODEC_24 (0x7 << 24) 1338c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SIM_CODEC_32 (0xf << 24) 1348c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_ACRB (0x8 << 24) 1358c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_AWR (1 << 30) 1368c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_GENCLK (1 << 23) 1378c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_I2S (1 << 22) 1388c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_CLKPOL (1 << 21) 1398c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SYNCPOL (1 << 20) 1408c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_CELLSLAVE (1 << 19) 1418c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_CELL2XCLK (1 << 18) 1428c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_ESAI (1 << 17) 1438c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_ENAC97 (1 << 16) 1448c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_SPI (1 << 15) 1458c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_MSTR (1 << 14) 1468c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_CPOL (1 << 13) 1478c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_CPHA (1 << 12) 1488c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_USEEOF (1 << 11) 1498c2ecf20Sopenharmony_ci#define MPC52xx_PSC_SICR_DISABLEEOF (1 << 10) 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci/* Structure of the hardware registers */ 1528c2ecf20Sopenharmony_cistruct mpc52xx_psc { 1538c2ecf20Sopenharmony_ci union { 1548c2ecf20Sopenharmony_ci u8 mode; /* PSC + 0x00 */ 1558c2ecf20Sopenharmony_ci u8 mr2; 1568c2ecf20Sopenharmony_ci }; 1578c2ecf20Sopenharmony_ci u8 reserved0[3]; 1588c2ecf20Sopenharmony_ci union { /* PSC + 0x04 */ 1598c2ecf20Sopenharmony_ci u16 status; 1608c2ecf20Sopenharmony_ci u16 clock_select; 1618c2ecf20Sopenharmony_ci } sr_csr; 1628c2ecf20Sopenharmony_ci#define mpc52xx_psc_status sr_csr.status 1638c2ecf20Sopenharmony_ci#define mpc52xx_psc_clock_select sr_csr.clock_select 1648c2ecf20Sopenharmony_ci u16 reserved1; 1658c2ecf20Sopenharmony_ci u8 command; /* PSC + 0x08 */ 1668c2ecf20Sopenharmony_ci u8 reserved2[3]; 1678c2ecf20Sopenharmony_ci union { /* PSC + 0x0c */ 1688c2ecf20Sopenharmony_ci u8 buffer_8; 1698c2ecf20Sopenharmony_ci u16 buffer_16; 1708c2ecf20Sopenharmony_ci u32 buffer_32; 1718c2ecf20Sopenharmony_ci } buffer; 1728c2ecf20Sopenharmony_ci#define mpc52xx_psc_buffer_8 buffer.buffer_8 1738c2ecf20Sopenharmony_ci#define mpc52xx_psc_buffer_16 buffer.buffer_16 1748c2ecf20Sopenharmony_ci#define mpc52xx_psc_buffer_32 buffer.buffer_32 1758c2ecf20Sopenharmony_ci union { /* PSC + 0x10 */ 1768c2ecf20Sopenharmony_ci u8 ipcr; 1778c2ecf20Sopenharmony_ci u8 acr; 1788c2ecf20Sopenharmony_ci } ipcr_acr; 1798c2ecf20Sopenharmony_ci#define mpc52xx_psc_ipcr ipcr_acr.ipcr 1808c2ecf20Sopenharmony_ci#define mpc52xx_psc_acr ipcr_acr.acr 1818c2ecf20Sopenharmony_ci u8 reserved3[3]; 1828c2ecf20Sopenharmony_ci union { /* PSC + 0x14 */ 1838c2ecf20Sopenharmony_ci u16 isr; 1848c2ecf20Sopenharmony_ci u16 imr; 1858c2ecf20Sopenharmony_ci } isr_imr; 1868c2ecf20Sopenharmony_ci#define mpc52xx_psc_isr isr_imr.isr 1878c2ecf20Sopenharmony_ci#define mpc52xx_psc_imr isr_imr.imr 1888c2ecf20Sopenharmony_ci u16 reserved4; 1898c2ecf20Sopenharmony_ci u8 ctur; /* PSC + 0x18 */ 1908c2ecf20Sopenharmony_ci u8 reserved5[3]; 1918c2ecf20Sopenharmony_ci u8 ctlr; /* PSC + 0x1c */ 1928c2ecf20Sopenharmony_ci u8 reserved6[3]; 1938c2ecf20Sopenharmony_ci /* BitClkDiv field of CCR is byte swapped in 1948c2ecf20Sopenharmony_ci * the hardware for mpc5200/b compatibility */ 1958c2ecf20Sopenharmony_ci u32 ccr; /* PSC + 0x20 */ 1968c2ecf20Sopenharmony_ci u32 ac97_slots; /* PSC + 0x24 */ 1978c2ecf20Sopenharmony_ci u32 ac97_cmd; /* PSC + 0x28 */ 1988c2ecf20Sopenharmony_ci u32 ac97_data; /* PSC + 0x2c */ 1998c2ecf20Sopenharmony_ci u8 ivr; /* PSC + 0x30 */ 2008c2ecf20Sopenharmony_ci u8 reserved8[3]; 2018c2ecf20Sopenharmony_ci u8 ip; /* PSC + 0x34 */ 2028c2ecf20Sopenharmony_ci u8 reserved9[3]; 2038c2ecf20Sopenharmony_ci u8 op1; /* PSC + 0x38 */ 2048c2ecf20Sopenharmony_ci u8 reserved10[3]; 2058c2ecf20Sopenharmony_ci u8 op0; /* PSC + 0x3c */ 2068c2ecf20Sopenharmony_ci u8 reserved11[3]; 2078c2ecf20Sopenharmony_ci u32 sicr; /* PSC + 0x40 */ 2088c2ecf20Sopenharmony_ci u8 ircr1; /* PSC + 0x44 */ 2098c2ecf20Sopenharmony_ci u8 reserved13[3]; 2108c2ecf20Sopenharmony_ci u8 ircr2; /* PSC + 0x44 */ 2118c2ecf20Sopenharmony_ci u8 reserved14[3]; 2128c2ecf20Sopenharmony_ci u8 irsdr; /* PSC + 0x4c */ 2138c2ecf20Sopenharmony_ci u8 reserved15[3]; 2148c2ecf20Sopenharmony_ci u8 irmdr; /* PSC + 0x50 */ 2158c2ecf20Sopenharmony_ci u8 reserved16[3]; 2168c2ecf20Sopenharmony_ci u8 irfdr; /* PSC + 0x54 */ 2178c2ecf20Sopenharmony_ci u8 reserved17[3]; 2188c2ecf20Sopenharmony_ci}; 2198c2ecf20Sopenharmony_ci 2208c2ecf20Sopenharmony_cistruct mpc52xx_psc_fifo { 2218c2ecf20Sopenharmony_ci u16 rfnum; /* PSC + 0x58 */ 2228c2ecf20Sopenharmony_ci u16 reserved18; 2238c2ecf20Sopenharmony_ci u16 tfnum; /* PSC + 0x5c */ 2248c2ecf20Sopenharmony_ci u16 reserved19; 2258c2ecf20Sopenharmony_ci u32 rfdata; /* PSC + 0x60 */ 2268c2ecf20Sopenharmony_ci u16 rfstat; /* PSC + 0x64 */ 2278c2ecf20Sopenharmony_ci u16 reserved20; 2288c2ecf20Sopenharmony_ci u8 rfcntl; /* PSC + 0x68 */ 2298c2ecf20Sopenharmony_ci u8 reserved21[5]; 2308c2ecf20Sopenharmony_ci u16 rfalarm; /* PSC + 0x6e */ 2318c2ecf20Sopenharmony_ci u16 reserved22; 2328c2ecf20Sopenharmony_ci u16 rfrptr; /* PSC + 0x72 */ 2338c2ecf20Sopenharmony_ci u16 reserved23; 2348c2ecf20Sopenharmony_ci u16 rfwptr; /* PSC + 0x76 */ 2358c2ecf20Sopenharmony_ci u16 reserved24; 2368c2ecf20Sopenharmony_ci u16 rflrfptr; /* PSC + 0x7a */ 2378c2ecf20Sopenharmony_ci u16 reserved25; 2388c2ecf20Sopenharmony_ci u16 rflwfptr; /* PSC + 0x7e */ 2398c2ecf20Sopenharmony_ci u32 tfdata; /* PSC + 0x80 */ 2408c2ecf20Sopenharmony_ci u16 tfstat; /* PSC + 0x84 */ 2418c2ecf20Sopenharmony_ci u16 reserved26; 2428c2ecf20Sopenharmony_ci u8 tfcntl; /* PSC + 0x88 */ 2438c2ecf20Sopenharmony_ci u8 reserved27[5]; 2448c2ecf20Sopenharmony_ci u16 tfalarm; /* PSC + 0x8e */ 2458c2ecf20Sopenharmony_ci u16 reserved28; 2468c2ecf20Sopenharmony_ci u16 tfrptr; /* PSC + 0x92 */ 2478c2ecf20Sopenharmony_ci u16 reserved29; 2488c2ecf20Sopenharmony_ci u16 tfwptr; /* PSC + 0x96 */ 2498c2ecf20Sopenharmony_ci u16 reserved30; 2508c2ecf20Sopenharmony_ci u16 tflrfptr; /* PSC + 0x9a */ 2518c2ecf20Sopenharmony_ci u16 reserved31; 2528c2ecf20Sopenharmony_ci u16 tflwfptr; /* PSC + 0x9e */ 2538c2ecf20Sopenharmony_ci}; 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ci#define MPC512x_PSC_FIFO_EOF 0x100 2568c2ecf20Sopenharmony_ci#define MPC512x_PSC_FIFO_RESET_SLICE 0x80 2578c2ecf20Sopenharmony_ci#define MPC512x_PSC_FIFO_ENABLE_SLICE 0x01 2588c2ecf20Sopenharmony_ci#define MPC512x_PSC_FIFO_ENABLE_DMA 0x04 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci#define MPC512x_PSC_FIFO_EMPTY 0x1 2618c2ecf20Sopenharmony_ci#define MPC512x_PSC_FIFO_FULL 0x2 2628c2ecf20Sopenharmony_ci#define MPC512x_PSC_FIFO_ALARM 0x4 2638c2ecf20Sopenharmony_ci#define MPC512x_PSC_FIFO_URERR 0x8 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_cistruct mpc512x_psc_fifo { 2668c2ecf20Sopenharmony_ci u32 reserved1[10]; 2678c2ecf20Sopenharmony_ci u32 txcmd; /* PSC + 0x80 */ 2688c2ecf20Sopenharmony_ci u32 txalarm; /* PSC + 0x84 */ 2698c2ecf20Sopenharmony_ci u32 txsr; /* PSC + 0x88 */ 2708c2ecf20Sopenharmony_ci u32 txisr; /* PSC + 0x8c */ 2718c2ecf20Sopenharmony_ci u32 tximr; /* PSC + 0x90 */ 2728c2ecf20Sopenharmony_ci u32 txcnt; /* PSC + 0x94 */ 2738c2ecf20Sopenharmony_ci u32 txptr; /* PSC + 0x98 */ 2748c2ecf20Sopenharmony_ci u32 txsz; /* PSC + 0x9c */ 2758c2ecf20Sopenharmony_ci u32 reserved2[7]; 2768c2ecf20Sopenharmony_ci union { 2778c2ecf20Sopenharmony_ci u8 txdata_8; 2788c2ecf20Sopenharmony_ci u16 txdata_16; 2798c2ecf20Sopenharmony_ci u32 txdata_32; 2808c2ecf20Sopenharmony_ci } txdata; /* PSC + 0xbc */ 2818c2ecf20Sopenharmony_ci#define txdata_8 txdata.txdata_8 2828c2ecf20Sopenharmony_ci#define txdata_16 txdata.txdata_16 2838c2ecf20Sopenharmony_ci#define txdata_32 txdata.txdata_32 2848c2ecf20Sopenharmony_ci u32 rxcmd; /* PSC + 0xc0 */ 2858c2ecf20Sopenharmony_ci u32 rxalarm; /* PSC + 0xc4 */ 2868c2ecf20Sopenharmony_ci u32 rxsr; /* PSC + 0xc8 */ 2878c2ecf20Sopenharmony_ci u32 rxisr; /* PSC + 0xcc */ 2888c2ecf20Sopenharmony_ci u32 rximr; /* PSC + 0xd0 */ 2898c2ecf20Sopenharmony_ci u32 rxcnt; /* PSC + 0xd4 */ 2908c2ecf20Sopenharmony_ci u32 rxptr; /* PSC + 0xd8 */ 2918c2ecf20Sopenharmony_ci u32 rxsz; /* PSC + 0xdc */ 2928c2ecf20Sopenharmony_ci u32 reserved3[7]; 2938c2ecf20Sopenharmony_ci union { 2948c2ecf20Sopenharmony_ci u8 rxdata_8; 2958c2ecf20Sopenharmony_ci u16 rxdata_16; 2968c2ecf20Sopenharmony_ci u32 rxdata_32; 2978c2ecf20Sopenharmony_ci } rxdata; /* PSC + 0xfc */ 2988c2ecf20Sopenharmony_ci#define rxdata_8 rxdata.rxdata_8 2998c2ecf20Sopenharmony_ci#define rxdata_16 rxdata.rxdata_16 3008c2ecf20Sopenharmony_ci#define rxdata_32 rxdata.rxdata_32 3018c2ecf20Sopenharmony_ci}; 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_cistruct mpc5125_psc { 3048c2ecf20Sopenharmony_ci u8 mr1; /* PSC + 0x00 */ 3058c2ecf20Sopenharmony_ci u8 reserved0[3]; 3068c2ecf20Sopenharmony_ci u8 mr2; /* PSC + 0x04 */ 3078c2ecf20Sopenharmony_ci u8 reserved1[3]; 3088c2ecf20Sopenharmony_ci struct { 3098c2ecf20Sopenharmony_ci u16 status; /* PSC + 0x08 */ 3108c2ecf20Sopenharmony_ci u8 reserved2[2]; 3118c2ecf20Sopenharmony_ci u8 clock_select; /* PSC + 0x0c */ 3128c2ecf20Sopenharmony_ci u8 reserved3[3]; 3138c2ecf20Sopenharmony_ci } sr_csr; 3148c2ecf20Sopenharmony_ci u8 command; /* PSC + 0x10 */ 3158c2ecf20Sopenharmony_ci u8 reserved4[3]; 3168c2ecf20Sopenharmony_ci union { /* PSC + 0x14 */ 3178c2ecf20Sopenharmony_ci u8 buffer_8; 3188c2ecf20Sopenharmony_ci u16 buffer_16; 3198c2ecf20Sopenharmony_ci u32 buffer_32; 3208c2ecf20Sopenharmony_ci } buffer; 3218c2ecf20Sopenharmony_ci struct { 3228c2ecf20Sopenharmony_ci u8 ipcr; /* PSC + 0x18 */ 3238c2ecf20Sopenharmony_ci u8 reserved5[3]; 3248c2ecf20Sopenharmony_ci u8 acr; /* PSC + 0x1c */ 3258c2ecf20Sopenharmony_ci u8 reserved6[3]; 3268c2ecf20Sopenharmony_ci } ipcr_acr; 3278c2ecf20Sopenharmony_ci struct { 3288c2ecf20Sopenharmony_ci u16 isr; /* PSC + 0x20 */ 3298c2ecf20Sopenharmony_ci u8 reserved7[2]; 3308c2ecf20Sopenharmony_ci u16 imr; /* PSC + 0x24 */ 3318c2ecf20Sopenharmony_ci u8 reserved8[2]; 3328c2ecf20Sopenharmony_ci } isr_imr; 3338c2ecf20Sopenharmony_ci u8 ctur; /* PSC + 0x28 */ 3348c2ecf20Sopenharmony_ci u8 reserved9[3]; 3358c2ecf20Sopenharmony_ci u8 ctlr; /* PSC + 0x2c */ 3368c2ecf20Sopenharmony_ci u8 reserved10[3]; 3378c2ecf20Sopenharmony_ci u32 ccr; /* PSC + 0x30 */ 3388c2ecf20Sopenharmony_ci u32 ac97slots; /* PSC + 0x34 */ 3398c2ecf20Sopenharmony_ci u32 ac97cmd; /* PSC + 0x38 */ 3408c2ecf20Sopenharmony_ci u32 ac97data; /* PSC + 0x3c */ 3418c2ecf20Sopenharmony_ci u8 reserved11[4]; 3428c2ecf20Sopenharmony_ci u8 ip; /* PSC + 0x44 */ 3438c2ecf20Sopenharmony_ci u8 reserved12[3]; 3448c2ecf20Sopenharmony_ci u8 op1; /* PSC + 0x48 */ 3458c2ecf20Sopenharmony_ci u8 reserved13[3]; 3468c2ecf20Sopenharmony_ci u8 op0; /* PSC + 0x4c */ 3478c2ecf20Sopenharmony_ci u8 reserved14[3]; 3488c2ecf20Sopenharmony_ci u32 sicr; /* PSC + 0x50 */ 3498c2ecf20Sopenharmony_ci u8 reserved15[4]; /* make eq. sizeof(mpc52xx_psc) */ 3508c2ecf20Sopenharmony_ci}; 3518c2ecf20Sopenharmony_ci 3528c2ecf20Sopenharmony_ci#endif /* __ASM_MPC52xx_PSC_H__ */ 353