18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 38c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 48c2ecf20Sopenharmony_ci * for more details. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 2000 Toshiba Corporation 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#ifndef __ASM_TXX9_TX3927_H 98c2ecf20Sopenharmony_ci#define __ASM_TXX9_TX3927_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define TX3927_REG_BASE 0xfffe0000UL 128c2ecf20Sopenharmony_ci#define TX3927_REG_SIZE 0x00010000 138c2ecf20Sopenharmony_ci#define TX3927_SDRAMC_REG (TX3927_REG_BASE + 0x8000) 148c2ecf20Sopenharmony_ci#define TX3927_ROMC_REG (TX3927_REG_BASE + 0x9000) 158c2ecf20Sopenharmony_ci#define TX3927_DMA_REG (TX3927_REG_BASE + 0xb000) 168c2ecf20Sopenharmony_ci#define TX3927_IRC_REG (TX3927_REG_BASE + 0xc000) 178c2ecf20Sopenharmony_ci#define TX3927_PCIC_REG (TX3927_REG_BASE + 0xd000) 188c2ecf20Sopenharmony_ci#define TX3927_CCFG_REG (TX3927_REG_BASE + 0xe000) 198c2ecf20Sopenharmony_ci#define TX3927_NR_TMR 3 208c2ecf20Sopenharmony_ci#define TX3927_TMR_REG(ch) (TX3927_REG_BASE + 0xf000 + (ch) * 0x100) 218c2ecf20Sopenharmony_ci#define TX3927_NR_SIO 2 228c2ecf20Sopenharmony_ci#define TX3927_SIO_REG(ch) (TX3927_REG_BASE + 0xf300 + (ch) * 0x100) 238c2ecf20Sopenharmony_ci#define TX3927_PIO_REG (TX3927_REG_BASE + 0xf500) 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cistruct tx3927_sdramc_reg { 268c2ecf20Sopenharmony_ci volatile unsigned long cr[8]; 278c2ecf20Sopenharmony_ci volatile unsigned long tr[3]; 288c2ecf20Sopenharmony_ci volatile unsigned long cmd; 298c2ecf20Sopenharmony_ci volatile unsigned long smrs[2]; 308c2ecf20Sopenharmony_ci}; 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_cistruct tx3927_romc_reg { 338c2ecf20Sopenharmony_ci volatile unsigned long cr[8]; 348c2ecf20Sopenharmony_ci}; 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_cistruct tx3927_dma_reg { 378c2ecf20Sopenharmony_ci struct tx3927_dma_ch_reg { 388c2ecf20Sopenharmony_ci volatile unsigned long cha; 398c2ecf20Sopenharmony_ci volatile unsigned long sar; 408c2ecf20Sopenharmony_ci volatile unsigned long dar; 418c2ecf20Sopenharmony_ci volatile unsigned long cntr; 428c2ecf20Sopenharmony_ci volatile unsigned long sair; 438c2ecf20Sopenharmony_ci volatile unsigned long dair; 448c2ecf20Sopenharmony_ci volatile unsigned long ccr; 458c2ecf20Sopenharmony_ci volatile unsigned long csr; 468c2ecf20Sopenharmony_ci } ch[4]; 478c2ecf20Sopenharmony_ci volatile unsigned long dbr[8]; 488c2ecf20Sopenharmony_ci volatile unsigned long tdhr; 498c2ecf20Sopenharmony_ci volatile unsigned long mcr; 508c2ecf20Sopenharmony_ci volatile unsigned long unused0; 518c2ecf20Sopenharmony_ci}; 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#include <asm/byteorder.h> 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN 568c2ecf20Sopenharmony_ci#define endian_def_s2(e1, e2) \ 578c2ecf20Sopenharmony_ci volatile unsigned short e1, e2 588c2ecf20Sopenharmony_ci#define endian_def_sb2(e1, e2, e3) \ 598c2ecf20Sopenharmony_ci volatile unsigned short e1;volatile unsigned char e2, e3 608c2ecf20Sopenharmony_ci#define endian_def_b2s(e1, e2, e3) \ 618c2ecf20Sopenharmony_ci volatile unsigned char e1, e2;volatile unsigned short e3 628c2ecf20Sopenharmony_ci#define endian_def_b4(e1, e2, e3, e4) \ 638c2ecf20Sopenharmony_ci volatile unsigned char e1, e2, e3, e4 648c2ecf20Sopenharmony_ci#else 658c2ecf20Sopenharmony_ci#define endian_def_s2(e1, e2) \ 668c2ecf20Sopenharmony_ci volatile unsigned short e2, e1 678c2ecf20Sopenharmony_ci#define endian_def_sb2(e1, e2, e3) \ 688c2ecf20Sopenharmony_ci volatile unsigned char e3, e2;volatile unsigned short e1 698c2ecf20Sopenharmony_ci#define endian_def_b2s(e1, e2, e3) \ 708c2ecf20Sopenharmony_ci volatile unsigned short e3;volatile unsigned char e2, e1 718c2ecf20Sopenharmony_ci#define endian_def_b4(e1, e2, e3, e4) \ 728c2ecf20Sopenharmony_ci volatile unsigned char e4, e3, e2, e1 738c2ecf20Sopenharmony_ci#endif 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_cistruct tx3927_pcic_reg { 768c2ecf20Sopenharmony_ci endian_def_s2(did, vid); 778c2ecf20Sopenharmony_ci endian_def_s2(pcistat, pcicmd); 788c2ecf20Sopenharmony_ci endian_def_b4(cc, scc, rpli, rid); 798c2ecf20Sopenharmony_ci endian_def_b4(unused0, ht, mlt, cls); 808c2ecf20Sopenharmony_ci volatile unsigned long ioba; /* +10 */ 818c2ecf20Sopenharmony_ci volatile unsigned long mba; 828c2ecf20Sopenharmony_ci volatile unsigned long unused1[5]; 838c2ecf20Sopenharmony_ci endian_def_s2(svid, ssvid); 848c2ecf20Sopenharmony_ci volatile unsigned long unused2; /* +30 */ 858c2ecf20Sopenharmony_ci endian_def_sb2(unused3, unused4, capptr); 868c2ecf20Sopenharmony_ci volatile unsigned long unused5; 878c2ecf20Sopenharmony_ci endian_def_b4(ml, mg, ip, il); 888c2ecf20Sopenharmony_ci volatile unsigned long unused6; /* +40 */ 898c2ecf20Sopenharmony_ci volatile unsigned long istat; 908c2ecf20Sopenharmony_ci volatile unsigned long iim; 918c2ecf20Sopenharmony_ci volatile unsigned long rrt; 928c2ecf20Sopenharmony_ci volatile unsigned long unused7[3]; /* +50 */ 938c2ecf20Sopenharmony_ci volatile unsigned long ipbmma; 948c2ecf20Sopenharmony_ci volatile unsigned long ipbioma; /* +60 */ 958c2ecf20Sopenharmony_ci volatile unsigned long ilbmma; 968c2ecf20Sopenharmony_ci volatile unsigned long ilbioma; 978c2ecf20Sopenharmony_ci volatile unsigned long unused8[9]; 988c2ecf20Sopenharmony_ci volatile unsigned long tc; /* +90 */ 998c2ecf20Sopenharmony_ci volatile unsigned long tstat; 1008c2ecf20Sopenharmony_ci volatile unsigned long tim; 1018c2ecf20Sopenharmony_ci volatile unsigned long tccmd; 1028c2ecf20Sopenharmony_ci volatile unsigned long pcirrt; /* +a0 */ 1038c2ecf20Sopenharmony_ci volatile unsigned long pcirrt_cmd; 1048c2ecf20Sopenharmony_ci volatile unsigned long pcirrdt; 1058c2ecf20Sopenharmony_ci volatile unsigned long unused9[3]; 1068c2ecf20Sopenharmony_ci volatile unsigned long tlboap; 1078c2ecf20Sopenharmony_ci volatile unsigned long tlbiap; 1088c2ecf20Sopenharmony_ci volatile unsigned long tlbmma; /* +c0 */ 1098c2ecf20Sopenharmony_ci volatile unsigned long tlbioma; 1108c2ecf20Sopenharmony_ci volatile unsigned long sc_msg; 1118c2ecf20Sopenharmony_ci volatile unsigned long sc_be; 1128c2ecf20Sopenharmony_ci volatile unsigned long tbl; /* +d0 */ 1138c2ecf20Sopenharmony_ci volatile unsigned long unused10[3]; 1148c2ecf20Sopenharmony_ci volatile unsigned long pwmng; /* +e0 */ 1158c2ecf20Sopenharmony_ci volatile unsigned long pwmngs; 1168c2ecf20Sopenharmony_ci volatile unsigned long unused11[6]; 1178c2ecf20Sopenharmony_ci volatile unsigned long req_trace; /* +100 */ 1188c2ecf20Sopenharmony_ci volatile unsigned long pbapmc; 1198c2ecf20Sopenharmony_ci volatile unsigned long pbapms; 1208c2ecf20Sopenharmony_ci volatile unsigned long pbapmim; 1218c2ecf20Sopenharmony_ci volatile unsigned long bm; /* +110 */ 1228c2ecf20Sopenharmony_ci volatile unsigned long cpcibrs; 1238c2ecf20Sopenharmony_ci volatile unsigned long cpcibgs; 1248c2ecf20Sopenharmony_ci volatile unsigned long pbacs; 1258c2ecf20Sopenharmony_ci volatile unsigned long iobas; /* +120 */ 1268c2ecf20Sopenharmony_ci volatile unsigned long mbas; 1278c2ecf20Sopenharmony_ci volatile unsigned long lbc; 1288c2ecf20Sopenharmony_ci volatile unsigned long lbstat; 1298c2ecf20Sopenharmony_ci volatile unsigned long lbim; /* +130 */ 1308c2ecf20Sopenharmony_ci volatile unsigned long pcistatim; 1318c2ecf20Sopenharmony_ci volatile unsigned long ica; 1328c2ecf20Sopenharmony_ci volatile unsigned long icd; 1338c2ecf20Sopenharmony_ci volatile unsigned long iiadp; /* +140 */ 1348c2ecf20Sopenharmony_ci volatile unsigned long iscdp; 1358c2ecf20Sopenharmony_ci volatile unsigned long mmas; 1368c2ecf20Sopenharmony_ci volatile unsigned long iomas; 1378c2ecf20Sopenharmony_ci volatile unsigned long ipciaddr; /* +150 */ 1388c2ecf20Sopenharmony_ci volatile unsigned long ipcidata; 1398c2ecf20Sopenharmony_ci volatile unsigned long ipcibe; 1408c2ecf20Sopenharmony_ci}; 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_cistruct tx3927_ccfg_reg { 1438c2ecf20Sopenharmony_ci volatile unsigned long ccfg; 1448c2ecf20Sopenharmony_ci volatile unsigned long crir; 1458c2ecf20Sopenharmony_ci volatile unsigned long pcfg; 1468c2ecf20Sopenharmony_ci volatile unsigned long tear; 1478c2ecf20Sopenharmony_ci volatile unsigned long pdcr; 1488c2ecf20Sopenharmony_ci}; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci/* 1518c2ecf20Sopenharmony_ci * SDRAMC 1528c2ecf20Sopenharmony_ci */ 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_ci/* 1558c2ecf20Sopenharmony_ci * ROMC 1568c2ecf20Sopenharmony_ci */ 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci/* 1598c2ecf20Sopenharmony_ci * DMA 1608c2ecf20Sopenharmony_ci */ 1618c2ecf20Sopenharmony_ci/* bits for MCR */ 1628c2ecf20Sopenharmony_ci#define TX3927_DMA_MCR_EIS(ch) (0x10000000<<(ch)) 1638c2ecf20Sopenharmony_ci#define TX3927_DMA_MCR_DIS(ch) (0x01000000<<(ch)) 1648c2ecf20Sopenharmony_ci#define TX3927_DMA_MCR_RSFIF 0x00000080 1658c2ecf20Sopenharmony_ci#define TX3927_DMA_MCR_FIFUM(ch) (0x00000008<<(ch)) 1668c2ecf20Sopenharmony_ci#define TX3927_DMA_MCR_LE 0x00000004 1678c2ecf20Sopenharmony_ci#define TX3927_DMA_MCR_RPRT 0x00000002 1688c2ecf20Sopenharmony_ci#define TX3927_DMA_MCR_MSTEN 0x00000001 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci/* bits for CCRn */ 1718c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_DBINH 0x04000000 1728c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_SBINH 0x02000000 1738c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_CHRST 0x01000000 1748c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_RVBYTE 0x00800000 1758c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_ACKPOL 0x00400000 1768c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_REQPL 0x00200000 1778c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_EGREQ 0x00100000 1788c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_CHDN 0x00080000 1798c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_DNCTL 0x00060000 1808c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_EXTRQ 0x00010000 1818c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_INTRQD 0x0000e000 1828c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_INTENE 0x00001000 1838c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_INTENC 0x00000800 1848c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_INTENT 0x00000400 1858c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_CHNEN 0x00000200 1868c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_XFACT 0x00000100 1878c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_SNOP 0x00000080 1888c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_DSTINC 0x00000040 1898c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_SRCINC 0x00000020 1908c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_XFSZ(order) (((order) << 2) & 0x0000001c) 1918c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_XFSZ_1W TX3927_DMA_CCR_XFSZ(2) 1928c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_XFSZ_4W TX3927_DMA_CCR_XFSZ(4) 1938c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_XFSZ_8W TX3927_DMA_CCR_XFSZ(5) 1948c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_XFSZ_16W TX3927_DMA_CCR_XFSZ(6) 1958c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_XFSZ_32W TX3927_DMA_CCR_XFSZ(7) 1968c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_MEMIO 0x00000002 1978c2ecf20Sopenharmony_ci#define TX3927_DMA_CCR_ONEAD 0x00000001 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_ci/* bits for CSRn */ 2008c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_CHNACT 0x00000100 2018c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_ABCHC 0x00000080 2028c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_NCHNC 0x00000040 2038c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_NTRNFC 0x00000020 2048c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_EXTDN 0x00000010 2058c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_CFERR 0x00000008 2068c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_CHERR 0x00000004 2078c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_DESERR 0x00000002 2088c2ecf20Sopenharmony_ci#define TX3927_DMA_CSR_SORERR 0x00000001 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci/* 2118c2ecf20Sopenharmony_ci * IRC 2128c2ecf20Sopenharmony_ci */ 2138c2ecf20Sopenharmony_ci#define TX3927_IR_INT0 0 2148c2ecf20Sopenharmony_ci#define TX3927_IR_INT1 1 2158c2ecf20Sopenharmony_ci#define TX3927_IR_INT2 2 2168c2ecf20Sopenharmony_ci#define TX3927_IR_INT3 3 2178c2ecf20Sopenharmony_ci#define TX3927_IR_INT4 4 2188c2ecf20Sopenharmony_ci#define TX3927_IR_INT5 5 2198c2ecf20Sopenharmony_ci#define TX3927_IR_SIO0 6 2208c2ecf20Sopenharmony_ci#define TX3927_IR_SIO1 7 2218c2ecf20Sopenharmony_ci#define TX3927_IR_SIO(ch) (6 + (ch)) 2228c2ecf20Sopenharmony_ci#define TX3927_IR_DMA 8 2238c2ecf20Sopenharmony_ci#define TX3927_IR_PIO 9 2248c2ecf20Sopenharmony_ci#define TX3927_IR_PCI 10 2258c2ecf20Sopenharmony_ci#define TX3927_IR_TMR(ch) (13 + (ch)) 2268c2ecf20Sopenharmony_ci#define TX3927_NUM_IR 16 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ci/* 2298c2ecf20Sopenharmony_ci * PCIC 2308c2ecf20Sopenharmony_ci */ 2318c2ecf20Sopenharmony_ci/* bits for PCICMD */ 2328c2ecf20Sopenharmony_ci/* see PCI_COMMAND_XXX in linux/pci.h */ 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci/* bits for PCISTAT */ 2358c2ecf20Sopenharmony_ci/* see PCI_STATUS_XXX in linux/pci.h */ 2368c2ecf20Sopenharmony_ci#define PCI_STATUS_NEW_CAP 0x0010 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci/* bits for ISTAT/IIM */ 2398c2ecf20Sopenharmony_ci#define TX3927_PCIC_IIM_ALL 0x00001600 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci/* bits for TC */ 2428c2ecf20Sopenharmony_ci#define TX3927_PCIC_TC_OF16E 0x00000020 2438c2ecf20Sopenharmony_ci#define TX3927_PCIC_TC_IF8E 0x00000010 2448c2ecf20Sopenharmony_ci#define TX3927_PCIC_TC_OF8E 0x00000008 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ci/* bits for TSTAT/TIM */ 2478c2ecf20Sopenharmony_ci#define TX3927_PCIC_TIM_ALL 0x0003ffff 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci/* bits for IOBA/MBA */ 2508c2ecf20Sopenharmony_ci/* see PCI_BASE_ADDRESS_XXX in linux/pci.h */ 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_ci/* bits for PBAPMC */ 2538c2ecf20Sopenharmony_ci#define TX3927_PCIC_PBAPMC_RPBA 0x00000004 2548c2ecf20Sopenharmony_ci#define TX3927_PCIC_PBAPMC_PBAEN 0x00000002 2558c2ecf20Sopenharmony_ci#define TX3927_PCIC_PBAPMC_BMCEN 0x00000001 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci/* bits for LBSTAT/LBIM */ 2588c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBIM_ALL 0x0000003e 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci/* bits for PCISTATIM (see also PCI_STATUS_XXX in linux/pci.h */ 2618c2ecf20Sopenharmony_ci#define TX3927_PCIC_PCISTATIM_ALL 0x0000f900 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci/* bits for LBC */ 2648c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_IBSE 0x00004000 2658c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_TIBSE 0x00002000 2668c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_TMFBSE 0x00001000 2678c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_HRST 0x00000800 2688c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_SRST 0x00000400 2698c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_EPCAD 0x00000200 2708c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_MSDSE 0x00000100 2718c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_CRR 0x00000080 2728c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_ILMDE 0x00000040 2738c2ecf20Sopenharmony_ci#define TX3927_PCIC_LBC_ILIDE 0x00000020 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ci#define TX3927_PCIC_IDSEL_AD_TO_SLOT(ad) ((ad) - 11) 2768c2ecf20Sopenharmony_ci#define TX3927_PCIC_MAX_DEVNU TX3927_PCIC_IDSEL_AD_TO_SLOT(32) 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci/* 2798c2ecf20Sopenharmony_ci * CCFG 2808c2ecf20Sopenharmony_ci */ 2818c2ecf20Sopenharmony_ci/* CCFG : Chip Configuration */ 2828c2ecf20Sopenharmony_ci#define TX3927_CCFG_TLBOFF 0x00020000 2838c2ecf20Sopenharmony_ci#define TX3927_CCFG_BEOW 0x00010000 2848c2ecf20Sopenharmony_ci#define TX3927_CCFG_WR 0x00008000 2858c2ecf20Sopenharmony_ci#define TX3927_CCFG_TOE 0x00004000 2868c2ecf20Sopenharmony_ci#define TX3927_CCFG_PCIXARB 0x00002000 2878c2ecf20Sopenharmony_ci#define TX3927_CCFG_PCI3 0x00001000 2888c2ecf20Sopenharmony_ci#define TX3927_CCFG_PSNP 0x00000800 2898c2ecf20Sopenharmony_ci#define TX3927_CCFG_PPRI 0x00000400 2908c2ecf20Sopenharmony_ci#define TX3927_CCFG_PLLM 0x00000030 2918c2ecf20Sopenharmony_ci#define TX3927_CCFG_ENDIAN 0x00000004 2928c2ecf20Sopenharmony_ci#define TX3927_CCFG_HALT 0x00000002 2938c2ecf20Sopenharmony_ci#define TX3927_CCFG_ACEHOLD 0x00000001 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci/* PCFG : Pin Configuration */ 2968c2ecf20Sopenharmony_ci#define TX3927_PCFG_SYSCLKEN 0x08000000 2978c2ecf20Sopenharmony_ci#define TX3927_PCFG_SDRCLKEN_ALL 0x07c00000 2988c2ecf20Sopenharmony_ci#define TX3927_PCFG_SDRCLKEN(ch) (0x00400000<<(ch)) 2998c2ecf20Sopenharmony_ci#define TX3927_PCFG_PCICLKEN_ALL 0x003c0000 3008c2ecf20Sopenharmony_ci#define TX3927_PCFG_PCICLKEN(ch) (0x00040000<<(ch)) 3018c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELALL 0x0003ffff 3028c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELCS 0x00020000 3038c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELDSF 0x00010000 3048c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELSIOC_ALL 0x0000c000 3058c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELSIOC(ch) (0x00004000<<(ch)) 3068c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELSIO_ALL 0x00003000 3078c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELSIO(ch) (0x00001000<<(ch)) 3088c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELTMR_ALL 0x00000e00 3098c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELTMR(ch) (0x00000200<<(ch)) 3108c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELDONE 0x00000100 3118c2ecf20Sopenharmony_ci#define TX3927_PCFG_INTDMA_ALL 0x000000f0 3128c2ecf20Sopenharmony_ci#define TX3927_PCFG_INTDMA(ch) (0x00000010<<(ch)) 3138c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELDMA_ALL 0x0000000f 3148c2ecf20Sopenharmony_ci#define TX3927_PCFG_SELDMA(ch) (0x00000001<<(ch)) 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ci#define tx3927_sdramcptr ((struct tx3927_sdramc_reg *)TX3927_SDRAMC_REG) 3178c2ecf20Sopenharmony_ci#define tx3927_romcptr ((struct tx3927_romc_reg *)TX3927_ROMC_REG) 3188c2ecf20Sopenharmony_ci#define tx3927_dmaptr ((struct tx3927_dma_reg *)TX3927_DMA_REG) 3198c2ecf20Sopenharmony_ci#define tx3927_pcicptr ((struct tx3927_pcic_reg *)TX3927_PCIC_REG) 3208c2ecf20Sopenharmony_ci#define tx3927_ccfgptr ((struct tx3927_ccfg_reg *)TX3927_CCFG_REG) 3218c2ecf20Sopenharmony_ci#define tx3927_sioptr(ch) ((struct txx927_sio_reg *)TX3927_SIO_REG(ch)) 3228c2ecf20Sopenharmony_ci#define tx3927_pioptr ((struct txx9_pio_reg __iomem *)TX3927_PIO_REG) 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_ci#define TX3927_REV_PCODE() (tx3927_ccfgptr->crir >> 16) 3258c2ecf20Sopenharmony_ci#define TX3927_ROMC_BA(ch) (tx3927_romcptr->cr[(ch)] & 0xfff00000) 3268c2ecf20Sopenharmony_ci#define TX3927_ROMC_SIZE(ch) \ 3278c2ecf20Sopenharmony_ci (0x00100000 << ((tx3927_romcptr->cr[(ch)] >> 8) & 0xf)) 3288c2ecf20Sopenharmony_ci#define TX3927_ROMC_WIDTH(ch) (32 >> ((tx3927_romcptr->cr[(ch)] >> 7) & 0x1)) 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_civoid tx3927_wdt_init(void); 3318c2ecf20Sopenharmony_civoid tx3927_setup(void); 3328c2ecf20Sopenharmony_civoid tx3927_time_init(unsigned int evt_tmrnr, unsigned int src_tmrnr); 3338c2ecf20Sopenharmony_civoid tx3927_sio_init(unsigned int sclk, unsigned int cts_mask); 3348c2ecf20Sopenharmony_cistruct pci_controller; 3358c2ecf20Sopenharmony_civoid tx3927_pcic_setup(struct pci_controller *channel, 3368c2ecf20Sopenharmony_ci unsigned long sdram_size, int extarb); 3378c2ecf20Sopenharmony_civoid tx3927_setup_pcierr_irq(void); 3388c2ecf20Sopenharmony_civoid tx3927_irq_init(void); 3398c2ecf20Sopenharmony_civoid tx3927_mtd_init(int ch); 3408c2ecf20Sopenharmony_ci 3418c2ecf20Sopenharmony_ci#endif /* __ASM_TXX9_TX3927_H */ 342