18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * tsi148.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Support for the Tundra TSI148 VME Bridge chip 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Author: Tom Armistead 88c2ecf20Sopenharmony_ci * Updated and maintained by Ajit Prem 98c2ecf20Sopenharmony_ci * Copyright 2004 Motorola Inc. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef TSI148_H 138c2ecf20Sopenharmony_ci#define TSI148_H 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifndef PCI_VENDOR_ID_TUNDRA 168c2ecf20Sopenharmony_ci#define PCI_VENDOR_ID_TUNDRA 0x10e3 178c2ecf20Sopenharmony_ci#endif 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#ifndef PCI_DEVICE_ID_TUNDRA_TSI148 208c2ecf20Sopenharmony_ci#define PCI_DEVICE_ID_TUNDRA_TSI148 0x148 218c2ecf20Sopenharmony_ci#endif 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci/* 248c2ecf20Sopenharmony_ci * Define the number of each that the Tsi148 supports. 258c2ecf20Sopenharmony_ci */ 268c2ecf20Sopenharmony_ci#define TSI148_MAX_MASTER 8 /* Max Master Windows */ 278c2ecf20Sopenharmony_ci#define TSI148_MAX_SLAVE 8 /* Max Slave Windows */ 288c2ecf20Sopenharmony_ci#define TSI148_MAX_DMA 2 /* Max DMA Controllers */ 298c2ecf20Sopenharmony_ci#define TSI148_MAX_MAILBOX 4 /* Max Mail Box registers */ 308c2ecf20Sopenharmony_ci#define TSI148_MAX_SEMAPHORE 8 /* Max Semaphores */ 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci/* Structure used to hold driver specific information */ 338c2ecf20Sopenharmony_cistruct tsi148_driver { 348c2ecf20Sopenharmony_ci void __iomem *base; /* Base Address of device registers */ 358c2ecf20Sopenharmony_ci wait_queue_head_t dma_queue[2]; 368c2ecf20Sopenharmony_ci wait_queue_head_t iack_queue; 378c2ecf20Sopenharmony_ci void (*lm_callback[4])(void *); /* Called in interrupt handler */ 388c2ecf20Sopenharmony_ci void *lm_data[4]; 398c2ecf20Sopenharmony_ci void *crcsr_kernel; 408c2ecf20Sopenharmony_ci dma_addr_t crcsr_bus; 418c2ecf20Sopenharmony_ci struct vme_master_resource *flush_image; 428c2ecf20Sopenharmony_ci struct mutex vme_rmw; /* Only one RMW cycle at a time */ 438c2ecf20Sopenharmony_ci struct mutex vme_int; /* 448c2ecf20Sopenharmony_ci * Only one VME interrupt can be 458c2ecf20Sopenharmony_ci * generated at a time, provide locking 468c2ecf20Sopenharmony_ci */ 478c2ecf20Sopenharmony_ci}; 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci/* 508c2ecf20Sopenharmony_ci * Layout of a DMAC Linked-List Descriptor 518c2ecf20Sopenharmony_ci * 528c2ecf20Sopenharmony_ci * Note: This structure is accessed via the chip and therefore must be 538c2ecf20Sopenharmony_ci * correctly laid out - It must also be aligned on 64-bit boundaries. 548c2ecf20Sopenharmony_ci */ 558c2ecf20Sopenharmony_cistruct tsi148_dma_descriptor { 568c2ecf20Sopenharmony_ci __be32 dsau; /* Source Address */ 578c2ecf20Sopenharmony_ci __be32 dsal; 588c2ecf20Sopenharmony_ci __be32 ddau; /* Destination Address */ 598c2ecf20Sopenharmony_ci __be32 ddal; 608c2ecf20Sopenharmony_ci __be32 dsat; /* Source attributes */ 618c2ecf20Sopenharmony_ci __be32 ddat; /* Destination attributes */ 628c2ecf20Sopenharmony_ci __be32 dnlau; /* Next link address */ 638c2ecf20Sopenharmony_ci __be32 dnlal; 648c2ecf20Sopenharmony_ci __be32 dcnt; /* Byte count */ 658c2ecf20Sopenharmony_ci __be32 ddbs; /* 2eSST Broadcast select */ 668c2ecf20Sopenharmony_ci}; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_cistruct tsi148_dma_entry { 698c2ecf20Sopenharmony_ci /* 708c2ecf20Sopenharmony_ci * The descriptor needs to be aligned on a 64-bit boundary, we increase 718c2ecf20Sopenharmony_ci * the chance of this by putting it first in the structure. 728c2ecf20Sopenharmony_ci */ 738c2ecf20Sopenharmony_ci struct tsi148_dma_descriptor descriptor; 748c2ecf20Sopenharmony_ci struct list_head list; 758c2ecf20Sopenharmony_ci dma_addr_t dma_handle; 768c2ecf20Sopenharmony_ci}; 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci/* 798c2ecf20Sopenharmony_ci * TSI148 ASIC register structure overlays and bit field definitions. 808c2ecf20Sopenharmony_ci * 818c2ecf20Sopenharmony_ci * Note: Tsi148 Register Group (CRG) consists of the following 828c2ecf20Sopenharmony_ci * combination of registers: 838c2ecf20Sopenharmony_ci * PCFS - PCI Configuration Space Registers 848c2ecf20Sopenharmony_ci * LCSR - Local Control and Status Registers 858c2ecf20Sopenharmony_ci * GCSR - Global Control and Status Registers 868c2ecf20Sopenharmony_ci * CR/CSR - Subset of Configuration ROM / 878c2ecf20Sopenharmony_ci * Control and Status Registers 888c2ecf20Sopenharmony_ci */ 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci/* 928c2ecf20Sopenharmony_ci * Command/Status Registers (CRG + $004) 938c2ecf20Sopenharmony_ci */ 948c2ecf20Sopenharmony_ci#define TSI148_PCFS_ID 0x0 958c2ecf20Sopenharmony_ci#define TSI148_PCFS_CSR 0x4 968c2ecf20Sopenharmony_ci#define TSI148_PCFS_CLASS 0x8 978c2ecf20Sopenharmony_ci#define TSI148_PCFS_MISC0 0xC 988c2ecf20Sopenharmony_ci#define TSI148_PCFS_MBARL 0x10 998c2ecf20Sopenharmony_ci#define TSI148_PCFS_MBARU 0x14 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci#define TSI148_PCFS_SUBID 0x28 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci#define TSI148_PCFS_CAPP 0x34 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci#define TSI148_PCFS_MISC1 0x3C 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci#define TSI148_PCFS_XCAPP 0x40 1088c2ecf20Sopenharmony_ci#define TSI148_PCFS_XSTAT 0x44 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci/* 1118c2ecf20Sopenharmony_ci * LCSR definitions 1128c2ecf20Sopenharmony_ci */ 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci/* 1158c2ecf20Sopenharmony_ci * Outbound Translations 1168c2ecf20Sopenharmony_ci */ 1178c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0_OTSAU 0x100 1188c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0_OTSAL 0x104 1198c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0_OTEAU 0x108 1208c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0_OTEAL 0x10C 1218c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0_OTOFU 0x110 1228c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0_OTOFL 0x114 1238c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0_OTBS 0x118 1248c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0_OTAT 0x11C 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1_OTSAU 0x120 1278c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1_OTSAL 0x124 1288c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1_OTEAU 0x128 1298c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1_OTEAL 0x12C 1308c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1_OTOFU 0x130 1318c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1_OTOFL 0x134 1328c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1_OTBS 0x138 1338c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1_OTAT 0x13C 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2_OTSAU 0x140 1368c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2_OTSAL 0x144 1378c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2_OTEAU 0x148 1388c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2_OTEAL 0x14C 1398c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2_OTOFU 0x150 1408c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2_OTOFL 0x154 1418c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2_OTBS 0x158 1428c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2_OTAT 0x15C 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3_OTSAU 0x160 1458c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3_OTSAL 0x164 1468c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3_OTEAU 0x168 1478c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3_OTEAL 0x16C 1488c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3_OTOFU 0x170 1498c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3_OTOFL 0x174 1508c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3_OTBS 0x178 1518c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3_OTAT 0x17C 1528c2ecf20Sopenharmony_ci 1538c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4_OTSAU 0x180 1548c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4_OTSAL 0x184 1558c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4_OTEAU 0x188 1568c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4_OTEAL 0x18C 1578c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4_OTOFU 0x190 1588c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4_OTOFL 0x194 1598c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4_OTBS 0x198 1608c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4_OTAT 0x19C 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5_OTSAU 0x1A0 1638c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5_OTSAL 0x1A4 1648c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5_OTEAU 0x1A8 1658c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5_OTEAL 0x1AC 1668c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5_OTOFU 0x1B0 1678c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5_OTOFL 0x1B4 1688c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5_OTBS 0x1B8 1698c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5_OTAT 0x1BC 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6_OTSAU 0x1C0 1728c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6_OTSAL 0x1C4 1738c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6_OTEAU 0x1C8 1748c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6_OTEAL 0x1CC 1758c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6_OTOFU 0x1D0 1768c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6_OTOFL 0x1D4 1778c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6_OTBS 0x1D8 1788c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6_OTAT 0x1DC 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7_OTSAU 0x1E0 1818c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7_OTSAL 0x1E4 1828c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7_OTEAU 0x1E8 1838c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7_OTEAL 0x1EC 1848c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7_OTOFU 0x1F0 1858c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7_OTOFL 0x1F4 1868c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7_OTBS 0x1F8 1878c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7_OTAT 0x1FC 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT0 0x100 1908c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT1 0x120 1918c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT2 0x140 1928c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT3 0x160 1938c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT4 0x180 1948c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT5 0x1A0 1958c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT6 0x1C0 1968c2ecf20Sopenharmony_ci#define TSI148_LCSR_OT7 0x1E0 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_OT[8] = { TSI148_LCSR_OT0, TSI148_LCSR_OT1, 1998c2ecf20Sopenharmony_ci TSI148_LCSR_OT2, TSI148_LCSR_OT3, 2008c2ecf20Sopenharmony_ci TSI148_LCSR_OT4, TSI148_LCSR_OT5, 2018c2ecf20Sopenharmony_ci TSI148_LCSR_OT6, TSI148_LCSR_OT7 }; 2028c2ecf20Sopenharmony_ci 2038c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_OTSAU 0x0 2048c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_OTSAL 0x4 2058c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_OTEAU 0x8 2068c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_OTEAL 0xC 2078c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_OTOFU 0x10 2088c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_OTOFL 0x14 2098c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_OTBS 0x18 2108c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_OTAT 0x1C 2118c2ecf20Sopenharmony_ci 2128c2ecf20Sopenharmony_ci/* 2138c2ecf20Sopenharmony_ci * VMEbus interrupt ack 2148c2ecf20Sopenharmony_ci * offset 200 2158c2ecf20Sopenharmony_ci */ 2168c2ecf20Sopenharmony_ci#define TSI148_LCSR_VIACK1 0x204 2178c2ecf20Sopenharmony_ci#define TSI148_LCSR_VIACK2 0x208 2188c2ecf20Sopenharmony_ci#define TSI148_LCSR_VIACK3 0x20C 2198c2ecf20Sopenharmony_ci#define TSI148_LCSR_VIACK4 0x210 2208c2ecf20Sopenharmony_ci#define TSI148_LCSR_VIACK5 0x214 2218c2ecf20Sopenharmony_ci#define TSI148_LCSR_VIACK6 0x218 2228c2ecf20Sopenharmony_ci#define TSI148_LCSR_VIACK7 0x21C 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_VIACK[8] = { 0, TSI148_LCSR_VIACK1, 2258c2ecf20Sopenharmony_ci TSI148_LCSR_VIACK2, TSI148_LCSR_VIACK3, 2268c2ecf20Sopenharmony_ci TSI148_LCSR_VIACK4, TSI148_LCSR_VIACK5, 2278c2ecf20Sopenharmony_ci TSI148_LCSR_VIACK6, TSI148_LCSR_VIACK7 }; 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ci/* 2308c2ecf20Sopenharmony_ci * RMW 2318c2ecf20Sopenharmony_ci * offset 220 2328c2ecf20Sopenharmony_ci */ 2338c2ecf20Sopenharmony_ci#define TSI148_LCSR_RMWAU 0x220 2348c2ecf20Sopenharmony_ci#define TSI148_LCSR_RMWAL 0x224 2358c2ecf20Sopenharmony_ci#define TSI148_LCSR_RMWEN 0x228 2368c2ecf20Sopenharmony_ci#define TSI148_LCSR_RMWC 0x22C 2378c2ecf20Sopenharmony_ci#define TSI148_LCSR_RMWS 0x230 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_ci/* 2408c2ecf20Sopenharmony_ci * VMEbus control 2418c2ecf20Sopenharmony_ci * offset 234 2428c2ecf20Sopenharmony_ci */ 2438c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL 0x234 2448c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL 0x238 2458c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT 0x23C 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci/* 2488c2ecf20Sopenharmony_ci * PCI status 2498c2ecf20Sopenharmony_ci * offset 240 2508c2ecf20Sopenharmony_ci */ 2518c2ecf20Sopenharmony_ci#define TSI148_LCSR_PSTAT 0x240 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_ci/* 2548c2ecf20Sopenharmony_ci * VME filter. 2558c2ecf20Sopenharmony_ci * offset 250 2568c2ecf20Sopenharmony_ci */ 2578c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMEFL 0x250 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ci /* 2608c2ecf20Sopenharmony_ci * VME exception. 2618c2ecf20Sopenharmony_ci * offset 260 2628c2ecf20Sopenharmony_ci */ 2638c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAU 0x260 2648c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAL 0x264 2658c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT 0x268 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci /* 2688c2ecf20Sopenharmony_ci * PCI error 2698c2ecf20Sopenharmony_ci * offset 270 2708c2ecf20Sopenharmony_ci */ 2718c2ecf20Sopenharmony_ci#define TSI148_LCSR_EDPAU 0x270 2728c2ecf20Sopenharmony_ci#define TSI148_LCSR_EDPAL 0x274 2738c2ecf20Sopenharmony_ci#define TSI148_LCSR_EDPXA 0x278 2748c2ecf20Sopenharmony_ci#define TSI148_LCSR_EDPXS 0x27C 2758c2ecf20Sopenharmony_ci#define TSI148_LCSR_EDPAT 0x280 2768c2ecf20Sopenharmony_ci 2778c2ecf20Sopenharmony_ci /* 2788c2ecf20Sopenharmony_ci * Inbound Translations 2798c2ecf20Sopenharmony_ci * offset 300 2808c2ecf20Sopenharmony_ci */ 2818c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT0_ITSAU 0x300 2828c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT0_ITSAL 0x304 2838c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT0_ITEAU 0x308 2848c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT0_ITEAL 0x30C 2858c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT0_ITOFU 0x310 2868c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT0_ITOFL 0x314 2878c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT0_ITAT 0x318 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT1_ITSAU 0x320 2908c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT1_ITSAL 0x324 2918c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT1_ITEAU 0x328 2928c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT1_ITEAL 0x32C 2938c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT1_ITOFU 0x330 2948c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT1_ITOFL 0x334 2958c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT1_ITAT 0x338 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT2_ITSAU 0x340 2988c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT2_ITSAL 0x344 2998c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT2_ITEAU 0x348 3008c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT2_ITEAL 0x34C 3018c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT2_ITOFU 0x350 3028c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT2_ITOFL 0x354 3038c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT2_ITAT 0x358 3048c2ecf20Sopenharmony_ci 3058c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT3_ITSAU 0x360 3068c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT3_ITSAL 0x364 3078c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT3_ITEAU 0x368 3088c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT3_ITEAL 0x36C 3098c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT3_ITOFU 0x370 3108c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT3_ITOFL 0x374 3118c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT3_ITAT 0x378 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT4_ITSAU 0x380 3148c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT4_ITSAL 0x384 3158c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT4_ITEAU 0x388 3168c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT4_ITEAL 0x38C 3178c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT4_ITOFU 0x390 3188c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT4_ITOFL 0x394 3198c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT4_ITAT 0x398 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT5_ITSAU 0x3A0 3228c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT5_ITSAL 0x3A4 3238c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT5_ITEAU 0x3A8 3248c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT5_ITEAL 0x3AC 3258c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT5_ITOFU 0x3B0 3268c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT5_ITOFL 0x3B4 3278c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT5_ITAT 0x3B8 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT6_ITSAU 0x3C0 3308c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT6_ITSAL 0x3C4 3318c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT6_ITEAU 0x3C8 3328c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT6_ITEAL 0x3CC 3338c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT6_ITOFU 0x3D0 3348c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT6_ITOFL 0x3D4 3358c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT6_ITAT 0x3D8 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT7_ITSAU 0x3E0 3388c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT7_ITSAL 0x3E4 3398c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT7_ITEAU 0x3E8 3408c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT7_ITEAL 0x3EC 3418c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT7_ITOFU 0x3F0 3428c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT7_ITOFL 0x3F4 3438c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT7_ITAT 0x3F8 3448c2ecf20Sopenharmony_ci 3458c2ecf20Sopenharmony_ci 3468c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT0 0x300 3478c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT1 0x320 3488c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT2 0x340 3498c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT3 0x360 3508c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT4 0x380 3518c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT5 0x3A0 3528c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT6 0x3C0 3538c2ecf20Sopenharmony_ci#define TSI148_LCSR_IT7 0x3E0 3548c2ecf20Sopenharmony_ci 3558c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_IT[8] = { TSI148_LCSR_IT0, TSI148_LCSR_IT1, 3568c2ecf20Sopenharmony_ci TSI148_LCSR_IT2, TSI148_LCSR_IT3, 3578c2ecf20Sopenharmony_ci TSI148_LCSR_IT4, TSI148_LCSR_IT5, 3588c2ecf20Sopenharmony_ci TSI148_LCSR_IT6, TSI148_LCSR_IT7 }; 3598c2ecf20Sopenharmony_ci 3608c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_ITSAU 0x0 3618c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_ITSAL 0x4 3628c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_ITEAU 0x8 3638c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_ITEAL 0xC 3648c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_ITOFU 0x10 3658c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_ITOFL 0x14 3668c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_ITAT 0x18 3678c2ecf20Sopenharmony_ci 3688c2ecf20Sopenharmony_ci /* 3698c2ecf20Sopenharmony_ci * Inbound Translation GCSR 3708c2ecf20Sopenharmony_ci * offset 400 3718c2ecf20Sopenharmony_ci */ 3728c2ecf20Sopenharmony_ci#define TSI148_LCSR_GBAU 0x400 3738c2ecf20Sopenharmony_ci#define TSI148_LCSR_GBAL 0x404 3748c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT 0x408 3758c2ecf20Sopenharmony_ci 3768c2ecf20Sopenharmony_ci /* 3778c2ecf20Sopenharmony_ci * Inbound Translation CRG 3788c2ecf20Sopenharmony_ci * offset 40C 3798c2ecf20Sopenharmony_ci */ 3808c2ecf20Sopenharmony_ci#define TSI148_LCSR_CBAU 0x40C 3818c2ecf20Sopenharmony_ci#define TSI148_LCSR_CBAL 0x410 3828c2ecf20Sopenharmony_ci#define TSI148_LCSR_CSRAT 0x414 3838c2ecf20Sopenharmony_ci 3848c2ecf20Sopenharmony_ci /* 3858c2ecf20Sopenharmony_ci * Inbound Translation CR/CSR 3868c2ecf20Sopenharmony_ci * CRG 3878c2ecf20Sopenharmony_ci * offset 418 3888c2ecf20Sopenharmony_ci */ 3898c2ecf20Sopenharmony_ci#define TSI148_LCSR_CROU 0x418 3908c2ecf20Sopenharmony_ci#define TSI148_LCSR_CROL 0x41C 3918c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRAT 0x420 3928c2ecf20Sopenharmony_ci 3938c2ecf20Sopenharmony_ci /* 3948c2ecf20Sopenharmony_ci * Inbound Translation Location Monitor 3958c2ecf20Sopenharmony_ci * offset 424 3968c2ecf20Sopenharmony_ci */ 3978c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMBAU 0x424 3988c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMBAL 0x428 3998c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT 0x42C 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_ci /* 4028c2ecf20Sopenharmony_ci * VMEbus Interrupt Control. 4038c2ecf20Sopenharmony_ci * offset 430 4048c2ecf20Sopenharmony_ci */ 4058c2ecf20Sopenharmony_ci#define TSI148_LCSR_BCU 0x430 4068c2ecf20Sopenharmony_ci#define TSI148_LCSR_BCL 0x434 4078c2ecf20Sopenharmony_ci#define TSI148_LCSR_BPGTR 0x438 4088c2ecf20Sopenharmony_ci#define TSI148_LCSR_BPCTR 0x43C 4098c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR 0x440 4108c2ecf20Sopenharmony_ci 4118c2ecf20Sopenharmony_ci /* 4128c2ecf20Sopenharmony_ci * Local Bus Interrupt Control. 4138c2ecf20Sopenharmony_ci * offset 448 4148c2ecf20Sopenharmony_ci */ 4158c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN 0x448 4168c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO 0x44C 4178c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS 0x450 4188c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC 0x454 4198c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1 0x458 4208c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2 0x45C 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_ci /* 4238c2ecf20Sopenharmony_ci * DMA Controllers 4248c2ecf20Sopenharmony_ci * offset 500 4258c2ecf20Sopenharmony_ci */ 4268c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL0 0x500 4278c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA0 0x504 4288c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCSAU0 0x508 4298c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCSAL0 0x50C 4308c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCDAU0 0x510 4318c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCDAL0 0x514 4328c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCLAU0 0x518 4338c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCLAL0 0x51C 4348c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAU0 0x520 4358c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAL0 0x524 4368c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAU0 0x528 4378c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAL0 0x52C 4388c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT0 0x530 4398c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT0 0x534 4408c2ecf20Sopenharmony_ci#define TSI148_LCSR_DNLAU0 0x538 4418c2ecf20Sopenharmony_ci#define TSI148_LCSR_DNLAL0 0x53C 4428c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCNT0 0x540 4438c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDBS0 0x544 4448c2ecf20Sopenharmony_ci 4458c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL1 0x580 4468c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA1 0x584 4478c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCSAU1 0x588 4488c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCSAL1 0x58C 4498c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCDAU1 0x590 4508c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCDAL1 0x594 4518c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCLAU1 0x598 4528c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCLAL1 0x59C 4538c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAU1 0x5A0 4548c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAL1 0x5A4 4558c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAU1 0x5A8 4568c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAL1 0x5AC 4578c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT1 0x5B0 4588c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT1 0x5B4 4598c2ecf20Sopenharmony_ci#define TSI148_LCSR_DNLAU1 0x5B8 4608c2ecf20Sopenharmony_ci#define TSI148_LCSR_DNLAL1 0x5BC 4618c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCNT1 0x5C0 4628c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDBS1 0x5C4 4638c2ecf20Sopenharmony_ci 4648c2ecf20Sopenharmony_ci#define TSI148_LCSR_DMA0 0x500 4658c2ecf20Sopenharmony_ci#define TSI148_LCSR_DMA1 0x580 4668c2ecf20Sopenharmony_ci 4678c2ecf20Sopenharmony_ci 4688c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_DMA[TSI148_MAX_DMA] = { TSI148_LCSR_DMA0, 4698c2ecf20Sopenharmony_ci TSI148_LCSR_DMA1 }; 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DCTL 0x0 4728c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DSTA 0x4 4738c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DCSAU 0x8 4748c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DCSAL 0xC 4758c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DCDAU 0x10 4768c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DCDAL 0x14 4778c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DCLAU 0x18 4788c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DCLAL 0x1C 4798c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DSAU 0x20 4808c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DSAL 0x24 4818c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DDAU 0x28 4828c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DDAL 0x2C 4838c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DSAT 0x30 4848c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DDAT 0x34 4858c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DNLAU 0x38 4868c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DNLAL 0x3C 4878c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DCNT 0x40 4888c2ecf20Sopenharmony_ci#define TSI148_LCSR_OFFSET_DDBS 0x44 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_ci /* 4918c2ecf20Sopenharmony_ci * GCSR Register Group 4928c2ecf20Sopenharmony_ci */ 4938c2ecf20Sopenharmony_ci 4948c2ecf20Sopenharmony_ci /* 4958c2ecf20Sopenharmony_ci * GCSR CRG 4968c2ecf20Sopenharmony_ci * offset 00 600 - DEVI/VENI 4978c2ecf20Sopenharmony_ci * offset 04 604 - CTRL/GA/REVID 4988c2ecf20Sopenharmony_ci * offset 08 608 - Semaphore3/2/1/0 4998c2ecf20Sopenharmony_ci * offset 0C 60C - Seamphore7/6/5/4 5008c2ecf20Sopenharmony_ci */ 5018c2ecf20Sopenharmony_ci#define TSI148_GCSR_ID 0x600 5028c2ecf20Sopenharmony_ci#define TSI148_GCSR_CSR 0x604 5038c2ecf20Sopenharmony_ci#define TSI148_GCSR_SEMA0 0x608 5048c2ecf20Sopenharmony_ci#define TSI148_GCSR_SEMA1 0x60C 5058c2ecf20Sopenharmony_ci 5068c2ecf20Sopenharmony_ci /* 5078c2ecf20Sopenharmony_ci * Mail Box 5088c2ecf20Sopenharmony_ci * GCSR CRG 5098c2ecf20Sopenharmony_ci * offset 10 610 - Mailbox0 5108c2ecf20Sopenharmony_ci */ 5118c2ecf20Sopenharmony_ci#define TSI148_GCSR_MBOX0 0x610 5128c2ecf20Sopenharmony_ci#define TSI148_GCSR_MBOX1 0x614 5138c2ecf20Sopenharmony_ci#define TSI148_GCSR_MBOX2 0x618 5148c2ecf20Sopenharmony_ci#define TSI148_GCSR_MBOX3 0x61C 5158c2ecf20Sopenharmony_ci 5168c2ecf20Sopenharmony_cistatic const int TSI148_GCSR_MBOX[4] = { TSI148_GCSR_MBOX0, 5178c2ecf20Sopenharmony_ci TSI148_GCSR_MBOX1, 5188c2ecf20Sopenharmony_ci TSI148_GCSR_MBOX2, 5198c2ecf20Sopenharmony_ci TSI148_GCSR_MBOX3 }; 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci /* 5228c2ecf20Sopenharmony_ci * CR/CSR 5238c2ecf20Sopenharmony_ci */ 5248c2ecf20Sopenharmony_ci 5258c2ecf20Sopenharmony_ci /* 5268c2ecf20Sopenharmony_ci * CR/CSR CRG 5278c2ecf20Sopenharmony_ci * offset 7FFF4 FF4 - CSRBCR 5288c2ecf20Sopenharmony_ci * offset 7FFF8 FF8 - CSRBSR 5298c2ecf20Sopenharmony_ci * offset 7FFFC FFC - CBAR 5308c2ecf20Sopenharmony_ci */ 5318c2ecf20Sopenharmony_ci#define TSI148_CSRBCR 0xFF4 5328c2ecf20Sopenharmony_ci#define TSI148_CSRBSR 0xFF8 5338c2ecf20Sopenharmony_ci#define TSI148_CBAR 0xFFC 5348c2ecf20Sopenharmony_ci 5358c2ecf20Sopenharmony_ci 5368c2ecf20Sopenharmony_ci 5378c2ecf20Sopenharmony_ci 5388c2ecf20Sopenharmony_ci /* 5398c2ecf20Sopenharmony_ci * TSI148 Register Bit Definitions 5408c2ecf20Sopenharmony_ci */ 5418c2ecf20Sopenharmony_ci 5428c2ecf20Sopenharmony_ci /* 5438c2ecf20Sopenharmony_ci * PFCS Register Set 5448c2ecf20Sopenharmony_ci */ 5458c2ecf20Sopenharmony_ci#define TSI148_PCFS_CMMD_SERR (1<<8) /* SERR_L out pin ssys err */ 5468c2ecf20Sopenharmony_ci#define TSI148_PCFS_CMMD_PERR (1<<6) /* PERR_L out pin parity */ 5478c2ecf20Sopenharmony_ci#define TSI148_PCFS_CMMD_MSTR (1<<2) /* PCI bus master */ 5488c2ecf20Sopenharmony_ci#define TSI148_PCFS_CMMD_MEMSP (1<<1) /* PCI mem space access */ 5498c2ecf20Sopenharmony_ci#define TSI148_PCFS_CMMD_IOSP (1<<0) /* PCI I/O space enable */ 5508c2ecf20Sopenharmony_ci 5518c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_RCPVE (1<<15) /* Detected Parity Error */ 5528c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_SIGSE (1<<14) /* Signalled System Error */ 5538c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_RCVMA (1<<13) /* Received Master Abort */ 5548c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_RCVTA (1<<12) /* Received Target Abort */ 5558c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_SIGTA (1<<11) /* Signalled Target Abort */ 5568c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_SELTIM (3<<9) /* DELSEL Timing */ 5578c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_DPAR (1<<8) /* Data Parity Err Reported */ 5588c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_FAST (1<<7) /* Fast back-to-back Cap */ 5598c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_P66M (1<<5) /* 66 MHz Capable */ 5608c2ecf20Sopenharmony_ci#define TSI148_PCFS_STAT_CAPL (1<<4) /* Capab List - address $34 */ 5618c2ecf20Sopenharmony_ci 5628c2ecf20Sopenharmony_ci/* 5638c2ecf20Sopenharmony_ci * Revision ID/Class Code Registers (CRG +$008) 5648c2ecf20Sopenharmony_ci */ 5658c2ecf20Sopenharmony_ci#define TSI148_PCFS_CLAS_M (0xFF<<24) /* Class ID */ 5668c2ecf20Sopenharmony_ci#define TSI148_PCFS_SUBCLAS_M (0xFF<<16) /* Sub-Class ID */ 5678c2ecf20Sopenharmony_ci#define TSI148_PCFS_PROGIF_M (0xFF<<8) /* Sub-Class ID */ 5688c2ecf20Sopenharmony_ci#define TSI148_PCFS_REVID_M (0xFF<<0) /* Rev ID */ 5698c2ecf20Sopenharmony_ci 5708c2ecf20Sopenharmony_ci/* 5718c2ecf20Sopenharmony_ci * Cache Line Size/ Master Latency Timer/ Header Type Registers (CRG + $00C) 5728c2ecf20Sopenharmony_ci */ 5738c2ecf20Sopenharmony_ci#define TSI148_PCFS_HEAD_M (0xFF<<16) /* Master Lat Timer */ 5748c2ecf20Sopenharmony_ci#define TSI148_PCFS_MLAT_M (0xFF<<8) /* Master Lat Timer */ 5758c2ecf20Sopenharmony_ci#define TSI148_PCFS_CLSZ_M (0xFF<<0) /* Cache Line Size */ 5768c2ecf20Sopenharmony_ci 5778c2ecf20Sopenharmony_ci/* 5788c2ecf20Sopenharmony_ci * Memory Base Address Lower Reg (CRG + $010) 5798c2ecf20Sopenharmony_ci */ 5808c2ecf20Sopenharmony_ci#define TSI148_PCFS_MBARL_BASEL_M (0xFFFFF<<12) /* Base Addr Lower Mask */ 5818c2ecf20Sopenharmony_ci#define TSI148_PCFS_MBARL_PRE (1<<3) /* Prefetch */ 5828c2ecf20Sopenharmony_ci#define TSI148_PCFS_MBARL_MTYPE_M (3<<1) /* Memory Type Mask */ 5838c2ecf20Sopenharmony_ci#define TSI148_PCFS_MBARL_IOMEM (1<<0) /* I/O Space Indicator */ 5848c2ecf20Sopenharmony_ci 5858c2ecf20Sopenharmony_ci/* 5868c2ecf20Sopenharmony_ci * Message Signaled Interrupt Capabilities Register (CRG + $040) 5878c2ecf20Sopenharmony_ci */ 5888c2ecf20Sopenharmony_ci#define TSI148_PCFS_MSICAP_64BAC (1<<7) /* 64-bit Address Capable */ 5898c2ecf20Sopenharmony_ci#define TSI148_PCFS_MSICAP_MME_M (7<<4) /* Multiple Msg Enable Mask */ 5908c2ecf20Sopenharmony_ci#define TSI148_PCFS_MSICAP_MMC_M (7<<1) /* Multiple Msg Capable Mask */ 5918c2ecf20Sopenharmony_ci#define TSI148_PCFS_MSICAP_MSIEN (1<<0) /* Msg signaled INT Enable */ 5928c2ecf20Sopenharmony_ci 5938c2ecf20Sopenharmony_ci/* 5948c2ecf20Sopenharmony_ci * Message Address Lower Register (CRG +$044) 5958c2ecf20Sopenharmony_ci */ 5968c2ecf20Sopenharmony_ci#define TSI148_PCFS_MSIAL_M (0x3FFFFFFF<<2) /* Mask */ 5978c2ecf20Sopenharmony_ci 5988c2ecf20Sopenharmony_ci/* 5998c2ecf20Sopenharmony_ci * Message Data Register (CRG + 4C) 6008c2ecf20Sopenharmony_ci */ 6018c2ecf20Sopenharmony_ci#define TSI148_PCFS_MSIMD_M (0xFFFF<<0) /* Mask */ 6028c2ecf20Sopenharmony_ci 6038c2ecf20Sopenharmony_ci/* 6048c2ecf20Sopenharmony_ci * PCI-X Capabilities Register (CRG + $050) 6058c2ecf20Sopenharmony_ci */ 6068c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXCAP_MOST_M (7<<4) /* Max outstanding Split Tran */ 6078c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXCAP_MMRBC_M (3<<2) /* Max Mem Read byte cnt */ 6088c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXCAP_ERO (1<<1) /* Enable Relaxed Ordering */ 6098c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXCAP_DPERE (1<<0) /* Data Parity Recover Enable */ 6108c2ecf20Sopenharmony_ci 6118c2ecf20Sopenharmony_ci/* 6128c2ecf20Sopenharmony_ci * PCI-X Status Register (CRG +$054) 6138c2ecf20Sopenharmony_ci */ 6148c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_RSCEM (1<<29) /* Received Split Comp Error */ 6158c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_DMCRS_M (7<<26) /* max Cumulative Read Size */ 6168c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_DMOST_M (7<<23) /* max outstanding Split Trans 6178c2ecf20Sopenharmony_ci */ 6188c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_DMMRC_M (3<<21) /* max mem read byte count */ 6198c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_DC (1<<20) /* Device Complexity */ 6208c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_USC (1<<19) /* Unexpected Split comp */ 6218c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_SCD (1<<18) /* Split completion discard */ 6228c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_133C (1<<17) /* 133MHz capable */ 6238c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_64D (1<<16) /* 64 bit device */ 6248c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_BN_M (0xFF<<8) /* Bus number */ 6258c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_DN_M (0x1F<<3) /* Device number */ 6268c2ecf20Sopenharmony_ci#define TSI148_PCFS_PCIXSTAT_FN_M (7<<0) /* Function Number */ 6278c2ecf20Sopenharmony_ci 6288c2ecf20Sopenharmony_ci/* 6298c2ecf20Sopenharmony_ci * LCSR Registers 6308c2ecf20Sopenharmony_ci */ 6318c2ecf20Sopenharmony_ci 6328c2ecf20Sopenharmony_ci/* 6338c2ecf20Sopenharmony_ci * Outbound Translation Starting Address Lower 6348c2ecf20Sopenharmony_ci */ 6358c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTSAL_M (0xFFFF<<16) /* Mask */ 6368c2ecf20Sopenharmony_ci 6378c2ecf20Sopenharmony_ci/* 6388c2ecf20Sopenharmony_ci * Outbound Translation Ending Address Lower 6398c2ecf20Sopenharmony_ci */ 6408c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTEAL_M (0xFFFF<<16) /* Mask */ 6418c2ecf20Sopenharmony_ci 6428c2ecf20Sopenharmony_ci/* 6438c2ecf20Sopenharmony_ci * Outbound Translation Offset Lower 6448c2ecf20Sopenharmony_ci */ 6458c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTOFFL_M (0xFFFF<<16) /* Mask */ 6468c2ecf20Sopenharmony_ci 6478c2ecf20Sopenharmony_ci/* 6488c2ecf20Sopenharmony_ci * Outbound Translation 2eSST Broadcast Select 6498c2ecf20Sopenharmony_ci */ 6508c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTBS_M (0xFFFFF<<0) /* Mask */ 6518c2ecf20Sopenharmony_ci 6528c2ecf20Sopenharmony_ci/* 6538c2ecf20Sopenharmony_ci * Outbound Translation Attribute 6548c2ecf20Sopenharmony_ci */ 6558c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_EN (1<<31) /* Window Enable */ 6568c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_MRPFD (1<<18) /* Prefetch Disable */ 6578c2ecf20Sopenharmony_ci 6588c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_PFS_M (3<<16) /* Prefetch Size Mask */ 6598c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_PFS_2 (0<<16) /* 2 Cache Lines P Size */ 6608c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_PFS_4 (1<<16) /* 4 Cache Lines P Size */ 6618c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_PFS_8 (2<<16) /* 8 Cache Lines P Size */ 6628c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_PFS_16 (3<<16) /* 16 Cache Lines P Size */ 6638c2ecf20Sopenharmony_ci 6648c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_2eSSTM_M (7<<11) /* 2eSST Xfer Rate Mask */ 6658c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_2eSSTM_160 (0<<11) /* 160MB/s 2eSST Xfer Rate */ 6668c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_2eSSTM_267 (1<<11) /* 267MB/s 2eSST Xfer Rate */ 6678c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_2eSSTM_320 (2<<11) /* 320MB/s 2eSST Xfer Rate */ 6688c2ecf20Sopenharmony_ci 6698c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_TM_M (7<<8) /* Xfer Protocol Mask */ 6708c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_TM_SCT (0<<8) /* SCT Xfer Protocol */ 6718c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_TM_BLT (1<<8) /* BLT Xfer Protocol */ 6728c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_TM_MBLT (2<<8) /* MBLT Xfer Protocol */ 6738c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_TM_2eVME (3<<8) /* 2eVME Xfer Protocol */ 6748c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_TM_2eSST (4<<8) /* 2eSST Xfer Protocol */ 6758c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_TM_2eSSTB (5<<8) /* 2eSST Bcast Xfer Protocol */ 6768c2ecf20Sopenharmony_ci 6778c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_DBW_M (3<<6) /* Max Data Width */ 6788c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_DBW_16 (0<<6) /* 16-bit Data Width */ 6798c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_DBW_32 (1<<6) /* 32-bit Data Width */ 6808c2ecf20Sopenharmony_ci 6818c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_SUP (1<<5) /* Supervisory Access */ 6828c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_PGM (1<<4) /* Program Access */ 6838c2ecf20Sopenharmony_ci 6848c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_M (0xf<<0) /* Address Mode Mask */ 6858c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_A16 (0<<0) /* A16 Address Space */ 6868c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_A24 (1<<0) /* A24 Address Space */ 6878c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_A32 (2<<0) /* A32 Address Space */ 6888c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_A64 (4<<0) /* A32 Address Space */ 6898c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_CRCSR (5<<0) /* CR/CSR Address Space */ 6908c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_USER1 (8<<0) /* User1 Address Space */ 6918c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_USER2 (9<<0) /* User2 Address Space */ 6928c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_USER3 (10<<0) /* User3 Address Space */ 6938c2ecf20Sopenharmony_ci#define TSI148_LCSR_OTAT_AMODE_USER4 (11<<0) /* User4 Address Space */ 6948c2ecf20Sopenharmony_ci 6958c2ecf20Sopenharmony_ci/* 6968c2ecf20Sopenharmony_ci * VME Master Control Register CRG+$234 6978c2ecf20Sopenharmony_ci */ 6988c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VSA (1<<27) /* VMEbus Stop Ack */ 6998c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VS (1<<26) /* VMEbus Stop */ 7008c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_DHB (1<<25) /* Device Has Bus */ 7018c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_DWB (1<<24) /* Device Wants Bus */ 7028c2ecf20Sopenharmony_ci 7038c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_RMWEN (1<<20) /* RMW Enable */ 7048c2ecf20Sopenharmony_ci 7058c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_M (7<<16) /* Master Access Time-out Mask 7068c2ecf20Sopenharmony_ci */ 7078c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_32 (0<<16) /* 32 us */ 7088c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_128 (1<<16) /* 128 us */ 7098c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_512 (2<<16) /* 512 us */ 7108c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_2M (3<<16) /* 2 ms */ 7118c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_8M (4<<16) /* 8 ms */ 7128c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_32M (5<<16) /* 32 ms */ 7138c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_128M (6<<16) /* 128 ms */ 7148c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_ATO_DIS (7<<16) /* Disabled */ 7158c2ecf20Sopenharmony_ci 7168c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_M (7<<12) /* VMEbus Master Time off */ 7178c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_0 (0<<12) /* 0us */ 7188c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_1 (1<<12) /* 1us */ 7198c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_2 (2<<12) /* 2us */ 7208c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_4 (3<<12) /* 4us */ 7218c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_8 (4<<12) /* 8us */ 7228c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_16 (5<<12) /* 16us */ 7238c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_32 (6<<12) /* 32us */ 7248c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTOFF_64 (7<<12) /* 64us */ 7258c2ecf20Sopenharmony_ci 7268c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_M (7<<8) /* VMEbus Master Time On */ 7278c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_4 (0<<8) /* 8us */ 7288c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_8 (1<<8) /* 8us */ 7298c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_16 (2<<8) /* 16us */ 7308c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_32 (3<<8) /* 32us */ 7318c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_64 (4<<8) /* 64us */ 7328c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_128 (5<<8) /* 128us */ 7338c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_256 (6<<8) /* 256us */ 7348c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VTON_512 (7<<8) /* 512us */ 7358c2ecf20Sopenharmony_ci 7368c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VREL_M (3<<3) /* VMEbus Master Rel Mode Mask 7378c2ecf20Sopenharmony_ci */ 7388c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VREL_T_D (0<<3) /* Time on or Done */ 7398c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VREL_T_R_D (1<<3) /* Time on and REQ or Done */ 7408c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VREL_T_B_D (2<<3) /* Time on and BCLR or Done */ 7418c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VREL_T_D_R (3<<3) /* Time on or Done and REQ */ 7428c2ecf20Sopenharmony_ci 7438c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VFAIR (1<<2) /* VMEbus Master Fair Mode */ 7448c2ecf20Sopenharmony_ci#define TSI148_LCSR_VMCTRL_VREQL_M (3<<0) /* VMEbus Master Req Level Mask 7458c2ecf20Sopenharmony_ci */ 7468c2ecf20Sopenharmony_ci 7478c2ecf20Sopenharmony_ci/* 7488c2ecf20Sopenharmony_ci * VMEbus Control Register CRG+$238 7498c2ecf20Sopenharmony_ci */ 7508c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_LRE (1<<31) /* Late Retry Enable */ 7518c2ecf20Sopenharmony_ci 7528c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_M (0xF<<24) /* Deadlock Timer */ 7538c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_OFF (0<<24) /* Deadlock Timer Off */ 7548c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_16 (1<<24) /* 16 VCLKS */ 7558c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_32 (2<<24) /* 32 VCLKS */ 7568c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_64 (3<<24) /* 64 VCLKS */ 7578c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_128 (4<<24) /* 128 VCLKS */ 7588c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_256 (5<<24) /* 256 VCLKS */ 7598c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_512 (6<<24) /* 512 VCLKS */ 7608c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_1024 (7<<24) /* 1024 VCLKS */ 7618c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_2048 (8<<24) /* 2048 VCLKS */ 7628c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_4096 (9<<24) /* 4096 VCLKS */ 7638c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_8192 (0xA<<24) /* 8192 VCLKS */ 7648c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_16384 (0xB<<24) /* 16384 VCLKS */ 7658c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_DLT_32768 (0xC<<24) /* 32768 VCLKS */ 7668c2ecf20Sopenharmony_ci 7678c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_NERBB (1<<20) /* No Early Release of Bus Busy 7688c2ecf20Sopenharmony_ci */ 7698c2ecf20Sopenharmony_ci 7708c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_SRESET (1<<17) /* System Reset */ 7718c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_LRESET (1<<16) /* Local Reset */ 7728c2ecf20Sopenharmony_ci 7738c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_SFAILAI (1<<15) /* SYSFAIL Auto Slot ID */ 7748c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_BID_M (0x1F<<8) /* Broadcast ID Mask */ 7758c2ecf20Sopenharmony_ci 7768c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_ATOEN (1<<7) /* Arbiter Time-out Enable */ 7778c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_ROBIN (1<<6) /* VMEbus Round Robin */ 7788c2ecf20Sopenharmony_ci 7798c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_M (7<<0) /* VMEbus Global Time-out Mask 7808c2ecf20Sopenharmony_ci */ 7818c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_8 (0<<0) /* 8 us */ 7828c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_16 (1<<0) /* 16 us */ 7838c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_32 (2<<0) /* 32 us */ 7848c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_64 (3<<0) /* 64 us */ 7858c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_128 (4<<0) /* 128 us */ 7868c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_256 (5<<0) /* 256 us */ 7878c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_512 (6<<0) /* 512 us */ 7888c2ecf20Sopenharmony_ci#define TSI148_LCSR_VCTRL_GTO_DIS (7<<0) /* Disabled */ 7898c2ecf20Sopenharmony_ci 7908c2ecf20Sopenharmony_ci/* 7918c2ecf20Sopenharmony_ci * VMEbus Status Register CRG + $23C 7928c2ecf20Sopenharmony_ci */ 7938c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_CPURST (1<<15) /* Clear power up reset */ 7948c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_BRDFL (1<<14) /* Board fail */ 7958c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_PURSTS (1<<12) /* Power up reset status */ 7968c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_BDFAILS (1<<11) /* Board Fail Status */ 7978c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_SYSFAILS (1<<10) /* System Fail Status */ 7988c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_ACFAILS (1<<9) /* AC fail status */ 7998c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_SCONS (1<<8) /* System Cont Status */ 8008c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_GAP (1<<5) /* Geographic Addr Parity */ 8018c2ecf20Sopenharmony_ci#define TSI148_LCSR_VSTAT_GA_M (0x1F<<0) /* Geographic Addr Mask */ 8028c2ecf20Sopenharmony_ci 8038c2ecf20Sopenharmony_ci/* 8048c2ecf20Sopenharmony_ci * PCI Configuration Status Register CRG+$240 8058c2ecf20Sopenharmony_ci */ 8068c2ecf20Sopenharmony_ci#define TSI148_LCSR_PSTAT_REQ64S (1<<6) /* Request 64 status set */ 8078c2ecf20Sopenharmony_ci#define TSI148_LCSR_PSTAT_M66ENS (1<<5) /* M66ENS 66Mhz enable */ 8088c2ecf20Sopenharmony_ci#define TSI148_LCSR_PSTAT_FRAMES (1<<4) /* Frame Status */ 8098c2ecf20Sopenharmony_ci#define TSI148_LCSR_PSTAT_IRDYS (1<<3) /* IRDY status */ 8108c2ecf20Sopenharmony_ci#define TSI148_LCSR_PSTAT_DEVSELS (1<<2) /* DEVL status */ 8118c2ecf20Sopenharmony_ci#define TSI148_LCSR_PSTAT_STOPS (1<<1) /* STOP status */ 8128c2ecf20Sopenharmony_ci#define TSI148_LCSR_PSTAT_TRDYS (1<<0) /* TRDY status */ 8138c2ecf20Sopenharmony_ci 8148c2ecf20Sopenharmony_ci/* 8158c2ecf20Sopenharmony_ci * VMEbus Exception Attributes Register CRG + $268 8168c2ecf20Sopenharmony_ci */ 8178c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_VES (1<<31) /* Status */ 8188c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_VEOF (1<<30) /* Overflow */ 8198c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_VESCL (1<<29) /* Status Clear */ 8208c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_2EOT (1<<21) /* 2e Odd Termination */ 8218c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_2EST (1<<20) /* 2e Slave terminated */ 8228c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_BERR (1<<19) /* Bus Error */ 8238c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_LWORD (1<<18) /* LWORD_ signal state */ 8248c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_WRITE (1<<17) /* WRITE_ signal state */ 8258c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_IACK (1<<16) /* IACK_ signal state */ 8268c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_DS1 (1<<15) /* DS1_ signal state */ 8278c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_DS0 (1<<14) /* DS0_ signal state */ 8288c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_AM_M (0x3F<<8) /* Address Mode Mask */ 8298c2ecf20Sopenharmony_ci#define TSI148_LCSR_VEAT_XAM_M (0xFF<<0) /* Master AMode Mask */ 8308c2ecf20Sopenharmony_ci 8318c2ecf20Sopenharmony_ci 8328c2ecf20Sopenharmony_ci/* 8338c2ecf20Sopenharmony_ci * VMEbus PCI Error Diagnostics PCI/X Attributes Register CRG + $280 8348c2ecf20Sopenharmony_ci */ 8358c2ecf20Sopenharmony_ci#define TSI148_LCSR_EDPAT_EDPCL (1<<29) 8368c2ecf20Sopenharmony_ci 8378c2ecf20Sopenharmony_ci/* 8388c2ecf20Sopenharmony_ci * Inbound Translation Starting Address Lower 8398c2ecf20Sopenharmony_ci */ 8408c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITSAL6432_M (0xFFFF<<16) /* Mask */ 8418c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITSAL24_M (0x00FFF<<12) /* Mask */ 8428c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITSAL16_M (0x0000FFF<<4) /* Mask */ 8438c2ecf20Sopenharmony_ci 8448c2ecf20Sopenharmony_ci/* 8458c2ecf20Sopenharmony_ci * Inbound Translation Ending Address Lower 8468c2ecf20Sopenharmony_ci */ 8478c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITEAL6432_M (0xFFFF<<16) /* Mask */ 8488c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITEAL24_M (0x00FFF<<12) /* Mask */ 8498c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITEAL16_M (0x0000FFF<<4) /* Mask */ 8508c2ecf20Sopenharmony_ci 8518c2ecf20Sopenharmony_ci/* 8528c2ecf20Sopenharmony_ci * Inbound Translation Offset Lower 8538c2ecf20Sopenharmony_ci */ 8548c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITOFFL6432_M (0xFFFF<<16) /* Mask */ 8558c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITOFFL24_M (0xFFFFF<<12) /* Mask */ 8568c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITOFFL16_M (0xFFFFFFF<<4) /* Mask */ 8578c2ecf20Sopenharmony_ci 8588c2ecf20Sopenharmony_ci/* 8598c2ecf20Sopenharmony_ci * Inbound Translation Attribute 8608c2ecf20Sopenharmony_ci */ 8618c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_EN (1<<31) /* Window Enable */ 8628c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_TH (1<<18) /* Prefetch Threshold */ 8638c2ecf20Sopenharmony_ci 8648c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_VFS_M (3<<16) /* Virtual FIFO Size Mask */ 8658c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_VFS_64 (0<<16) /* 64 bytes Virtual FIFO Size */ 8668c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_VFS_128 (1<<16) /* 128 bytes Virtual FIFO Sz */ 8678c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_VFS_256 (2<<16) /* 256 bytes Virtual FIFO Sz */ 8688c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_VFS_512 (3<<16) /* 512 bytes Virtual FIFO Sz */ 8698c2ecf20Sopenharmony_ci 8708c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_2eSSTM_M (7<<12) /* 2eSST Xfer Rate Mask */ 8718c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_2eSSTM_160 (0<<12) /* 160MB/s 2eSST Xfer Rate */ 8728c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_2eSSTM_267 (1<<12) /* 267MB/s 2eSST Xfer Rate */ 8738c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_2eSSTM_320 (2<<12) /* 320MB/s 2eSST Xfer Rate */ 8748c2ecf20Sopenharmony_ci 8758c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_2eSSTB (1<<11) /* 2eSST Bcast Xfer Protocol */ 8768c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_2eSST (1<<10) /* 2eSST Xfer Protocol */ 8778c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_2eVME (1<<9) /* 2eVME Xfer Protocol */ 8788c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_MBLT (1<<8) /* MBLT Xfer Protocol */ 8798c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_BLT (1<<7) /* BLT Xfer Protocol */ 8808c2ecf20Sopenharmony_ci 8818c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_AS_M (7<<4) /* Address Space Mask */ 8828c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_AS_A16 (0<<4) /* A16 Address Space */ 8838c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_AS_A24 (1<<4) /* A24 Address Space */ 8848c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_AS_A32 (2<<4) /* A32 Address Space */ 8858c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_AS_A64 (4<<4) /* A64 Address Space */ 8868c2ecf20Sopenharmony_ci 8878c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_SUPR (1<<3) /* Supervisor Access */ 8888c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_NPRIV (1<<2) /* Non-Priv (User) Access */ 8898c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_PGM (1<<1) /* Program Access */ 8908c2ecf20Sopenharmony_ci#define TSI148_LCSR_ITAT_DATA (1<<0) /* Data Access */ 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_ci/* 8938c2ecf20Sopenharmony_ci * GCSR Base Address Lower Address CRG +$404 8948c2ecf20Sopenharmony_ci */ 8958c2ecf20Sopenharmony_ci#define TSI148_LCSR_GBAL_M (0x7FFFFFF<<5) /* Mask */ 8968c2ecf20Sopenharmony_ci 8978c2ecf20Sopenharmony_ci/* 8988c2ecf20Sopenharmony_ci * GCSR Attribute Register CRG + $408 8998c2ecf20Sopenharmony_ci */ 9008c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_EN (1<<7) /* Enable access to GCSR */ 9018c2ecf20Sopenharmony_ci 9028c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_AS_M (7<<4) /* Address Space Mask */ 9038c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_AS_A16 (0<<4) /* Address Space 16 */ 9048c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_AS_A24 (1<<4) /* Address Space 24 */ 9058c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_AS_A32 (2<<4) /* Address Space 32 */ 9068c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_AS_A64 (4<<4) /* Address Space 64 */ 9078c2ecf20Sopenharmony_ci 9088c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_SUPR (1<<3) /* Sup set -GCSR decoder */ 9098c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_NPRIV (1<<2) /* Non-Privliged set - CGSR */ 9108c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_PGM (1<<1) /* Program set - GCSR decoder */ 9118c2ecf20Sopenharmony_ci#define TSI148_LCSR_GCSRAT_DATA (1<<0) /* DATA set GCSR decoder */ 9128c2ecf20Sopenharmony_ci 9138c2ecf20Sopenharmony_ci/* 9148c2ecf20Sopenharmony_ci * CRG Base Address Lower Address CRG + $410 9158c2ecf20Sopenharmony_ci */ 9168c2ecf20Sopenharmony_ci#define TSI148_LCSR_CBAL_M (0xFFFFF<<12) 9178c2ecf20Sopenharmony_ci 9188c2ecf20Sopenharmony_ci/* 9198c2ecf20Sopenharmony_ci * CRG Attribute Register CRG + $414 9208c2ecf20Sopenharmony_ci */ 9218c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_EN (1<<7) /* Enable PRG Access */ 9228c2ecf20Sopenharmony_ci 9238c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_AS_M (7<<4) /* Address Space */ 9248c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_AS_A16 (0<<4) /* Address Space 16 */ 9258c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_AS_A24 (1<<4) /* Address Space 24 */ 9268c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_AS_A32 (2<<4) /* Address Space 32 */ 9278c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_AS_A64 (4<<4) /* Address Space 64 */ 9288c2ecf20Sopenharmony_ci 9298c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_SUPR (1<<3) /* Supervisor Access */ 9308c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_NPRIV (1<<2) /* Non-Privliged(User) Access */ 9318c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_PGM (1<<1) /* Program Access */ 9328c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRGAT_DATA (1<<0) /* Data Access */ 9338c2ecf20Sopenharmony_ci 9348c2ecf20Sopenharmony_ci/* 9358c2ecf20Sopenharmony_ci * CR/CSR Offset Lower Register CRG + $41C 9368c2ecf20Sopenharmony_ci */ 9378c2ecf20Sopenharmony_ci#define TSI148_LCSR_CROL_M (0x1FFF<<19) /* Mask */ 9388c2ecf20Sopenharmony_ci 9398c2ecf20Sopenharmony_ci/* 9408c2ecf20Sopenharmony_ci * CR/CSR Attribute register CRG + $420 9418c2ecf20Sopenharmony_ci */ 9428c2ecf20Sopenharmony_ci#define TSI148_LCSR_CRAT_EN (1<<7) /* Enable access to CR/CSR */ 9438c2ecf20Sopenharmony_ci 9448c2ecf20Sopenharmony_ci/* 9458c2ecf20Sopenharmony_ci * Location Monitor base address lower register CRG + $428 9468c2ecf20Sopenharmony_ci */ 9478c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMBAL_M (0x7FFFFFF<<5) /* Mask */ 9488c2ecf20Sopenharmony_ci 9498c2ecf20Sopenharmony_ci/* 9508c2ecf20Sopenharmony_ci * Location Monitor Attribute Register CRG + $42C 9518c2ecf20Sopenharmony_ci */ 9528c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_EN (1<<7) /* Enable Location Monitor */ 9538c2ecf20Sopenharmony_ci 9548c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_AS_M (7<<4) /* Address Space MASK */ 9558c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_AS_A16 (0<<4) /* A16 */ 9568c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_AS_A24 (1<<4) /* A24 */ 9578c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_AS_A32 (2<<4) /* A32 */ 9588c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_AS_A64 (4<<4) /* A64 */ 9598c2ecf20Sopenharmony_ci 9608c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_SUPR (1<<3) /* Supervisor Access */ 9618c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_NPRIV (1<<2) /* Non-Priv (User) Access */ 9628c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_PGM (1<<1) /* Program Access */ 9638c2ecf20Sopenharmony_ci#define TSI148_LCSR_LMAT_DATA (1<<0) /* Data Access */ 9648c2ecf20Sopenharmony_ci 9658c2ecf20Sopenharmony_ci/* 9668c2ecf20Sopenharmony_ci * Broadcast Pulse Generator Timer Register CRG + $438 9678c2ecf20Sopenharmony_ci */ 9688c2ecf20Sopenharmony_ci#define TSI148_LCSR_BPGTR_BPGT_M (0xFFFF<<0) /* Mask */ 9698c2ecf20Sopenharmony_ci 9708c2ecf20Sopenharmony_ci/* 9718c2ecf20Sopenharmony_ci * Broadcast Programmable Clock Timer Register CRG + $43C 9728c2ecf20Sopenharmony_ci */ 9738c2ecf20Sopenharmony_ci#define TSI148_LCSR_BPCTR_BPCT_M (0xFFFFFF<<0) /* Mask */ 9748c2ecf20Sopenharmony_ci 9758c2ecf20Sopenharmony_ci/* 9768c2ecf20Sopenharmony_ci * VMEbus Interrupt Control Register CRG + $43C 9778c2ecf20Sopenharmony_ci */ 9788c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_CNTS_M (3<<22) /* Cntr Source MASK */ 9798c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_CNTS_DIS (1<<22) /* Cntr Disable */ 9808c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_CNTS_IRQ1 (2<<22) /* IRQ1 to Cntr */ 9818c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_CNTS_IRQ2 (3<<22) /* IRQ2 to Cntr */ 9828c2ecf20Sopenharmony_ci 9838c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_EDGIS_M (3<<20) /* Edge interrupt MASK */ 9848c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_EDGIS_DIS (1<<20) /* Edge interrupt Disable */ 9858c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_EDGIS_IRQ1 (2<<20) /* IRQ1 to Edge */ 9868c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_EDGIS_IRQ2 (3<<20) /* IRQ2 to Edge */ 9878c2ecf20Sopenharmony_ci 9888c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQIF_M (3<<18) /* IRQ1* Function MASK */ 9898c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQIF_NORM (1<<18) /* Normal */ 9908c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQIF_PULSE (2<<18) /* Pulse Generator */ 9918c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQIF_PROG (3<<18) /* Programmable Clock */ 9928c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQIF_1U (4<<18) /* 1us Clock */ 9938c2ecf20Sopenharmony_ci 9948c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQ2F_M (3<<16) /* IRQ2* Function MASK */ 9958c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQ2F_NORM (1<<16) /* Normal */ 9968c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQ2F_PULSE (2<<16) /* Pulse Generator */ 9978c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQ2F_PROG (3<<16) /* Programmable Clock */ 9988c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQ2F_1U (4<<16) /* 1us Clock */ 9998c2ecf20Sopenharmony_ci 10008c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_BIP (1<<15) /* Broadcast Interrupt Pulse */ 10018c2ecf20Sopenharmony_ci 10028c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQC (1<<12) /* VMEbus IRQ Clear */ 10038c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQS (1<<11) /* VMEbus IRQ Status */ 10048c2ecf20Sopenharmony_ci 10058c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQL_M (7<<8) /* VMEbus SW IRQ Level Mask */ 10068c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQL_1 (1<<8) /* VMEbus SW IRQ Level 1 */ 10078c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQL_2 (2<<8) /* VMEbus SW IRQ Level 2 */ 10088c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQL_3 (3<<8) /* VMEbus SW IRQ Level 3 */ 10098c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQL_4 (4<<8) /* VMEbus SW IRQ Level 4 */ 10108c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQL_5 (5<<8) /* VMEbus SW IRQ Level 5 */ 10118c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQL_6 (6<<8) /* VMEbus SW IRQ Level 6 */ 10128c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_IRQL_7 (7<<8) /* VMEbus SW IRQ Level 7 */ 10138c2ecf20Sopenharmony_ci 10148c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_VICR_IRQL[8] = { 0, TSI148_LCSR_VICR_IRQL_1, 10158c2ecf20Sopenharmony_ci TSI148_LCSR_VICR_IRQL_2, TSI148_LCSR_VICR_IRQL_3, 10168c2ecf20Sopenharmony_ci TSI148_LCSR_VICR_IRQL_4, TSI148_LCSR_VICR_IRQL_5, 10178c2ecf20Sopenharmony_ci TSI148_LCSR_VICR_IRQL_6, TSI148_LCSR_VICR_IRQL_7 }; 10188c2ecf20Sopenharmony_ci 10198c2ecf20Sopenharmony_ci#define TSI148_LCSR_VICR_STID_M (0xFF<<0) /* Status/ID Mask */ 10208c2ecf20Sopenharmony_ci 10218c2ecf20Sopenharmony_ci/* 10228c2ecf20Sopenharmony_ci * Interrupt Enable Register CRG + $440 10238c2ecf20Sopenharmony_ci */ 10248c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_DMA1EN (1<<25) /* DMAC 1 */ 10258c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_DMA0EN (1<<24) /* DMAC 0 */ 10268c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_LM3EN (1<<23) /* Location Monitor 3 */ 10278c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_LM2EN (1<<22) /* Location Monitor 2 */ 10288c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_LM1EN (1<<21) /* Location Monitor 1 */ 10298c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_LM0EN (1<<20) /* Location Monitor 0 */ 10308c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_MB3EN (1<<19) /* Mail Box 3 */ 10318c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_MB2EN (1<<18) /* Mail Box 2 */ 10328c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_MB1EN (1<<17) /* Mail Box 1 */ 10338c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_MB0EN (1<<16) /* Mail Box 0 */ 10348c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_PERREN (1<<13) /* PCI/X Error */ 10358c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_VERREN (1<<12) /* VMEbus Error */ 10368c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_VIEEN (1<<11) /* VMEbus IRQ Edge */ 10378c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_IACKEN (1<<10) /* IACK */ 10388c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_SYSFLEN (1<<9) /* System Fail */ 10398c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_ACFLEN (1<<8) /* AC Fail */ 10408c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_IRQ7EN (1<<7) /* IRQ7 */ 10418c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_IRQ6EN (1<<6) /* IRQ6 */ 10428c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_IRQ5EN (1<<5) /* IRQ5 */ 10438c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_IRQ4EN (1<<4) /* IRQ4 */ 10448c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_IRQ3EN (1<<3) /* IRQ3 */ 10458c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_IRQ2EN (1<<2) /* IRQ2 */ 10468c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEN_IRQ1EN (1<<1) /* IRQ1 */ 10478c2ecf20Sopenharmony_ci 10488c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_INTEN_LMEN[4] = { TSI148_LCSR_INTEN_LM0EN, 10498c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_LM1EN, 10508c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_LM2EN, 10518c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_LM3EN }; 10528c2ecf20Sopenharmony_ci 10538c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_INTEN_IRQEN[7] = { TSI148_LCSR_INTEN_IRQ1EN, 10548c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_IRQ2EN, 10558c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_IRQ3EN, 10568c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_IRQ4EN, 10578c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_IRQ5EN, 10588c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_IRQ6EN, 10598c2ecf20Sopenharmony_ci TSI148_LCSR_INTEN_IRQ7EN }; 10608c2ecf20Sopenharmony_ci 10618c2ecf20Sopenharmony_ci/* 10628c2ecf20Sopenharmony_ci * Interrupt Enable Out Register CRG + $444 10638c2ecf20Sopenharmony_ci */ 10648c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_DMA1EO (1<<25) /* DMAC 1 */ 10658c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_DMA0EO (1<<24) /* DMAC 0 */ 10668c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_LM3EO (1<<23) /* Loc Monitor 3 */ 10678c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_LM2EO (1<<22) /* Loc Monitor 2 */ 10688c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_LM1EO (1<<21) /* Loc Monitor 1 */ 10698c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_LM0EO (1<<20) /* Location Monitor 0 */ 10708c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_MB3EO (1<<19) /* Mail Box 3 */ 10718c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_MB2EO (1<<18) /* Mail Box 2 */ 10728c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_MB1EO (1<<17) /* Mail Box 1 */ 10738c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_MB0EO (1<<16) /* Mail Box 0 */ 10748c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_PERREO (1<<13) /* PCI/X Error */ 10758c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_VERREO (1<<12) /* VMEbus Error */ 10768c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_VIEEO (1<<11) /* VMEbus IRQ Edge */ 10778c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_IACKEO (1<<10) /* IACK */ 10788c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_SYSFLEO (1<<9) /* System Fail */ 10798c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_ACFLEO (1<<8) /* AC Fail */ 10808c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_IRQ7EO (1<<7) /* IRQ7 */ 10818c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_IRQ6EO (1<<6) /* IRQ6 */ 10828c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_IRQ5EO (1<<5) /* IRQ5 */ 10838c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_IRQ4EO (1<<4) /* IRQ4 */ 10848c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_IRQ3EO (1<<3) /* IRQ3 */ 10858c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_IRQ2EO (1<<2) /* IRQ2 */ 10868c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTEO_IRQ1EO (1<<1) /* IRQ1 */ 10878c2ecf20Sopenharmony_ci 10888c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_INTEO_LMEO[4] = { TSI148_LCSR_INTEO_LM0EO, 10898c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_LM1EO, 10908c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_LM2EO, 10918c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_LM3EO }; 10928c2ecf20Sopenharmony_ci 10938c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_INTEO_IRQEO[7] = { TSI148_LCSR_INTEO_IRQ1EO, 10948c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_IRQ2EO, 10958c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_IRQ3EO, 10968c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_IRQ4EO, 10978c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_IRQ5EO, 10988c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_IRQ6EO, 10998c2ecf20Sopenharmony_ci TSI148_LCSR_INTEO_IRQ7EO }; 11008c2ecf20Sopenharmony_ci 11018c2ecf20Sopenharmony_ci/* 11028c2ecf20Sopenharmony_ci * Interrupt Status Register CRG + $448 11038c2ecf20Sopenharmony_ci */ 11048c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_DMA1S (1<<25) /* DMA 1 */ 11058c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_DMA0S (1<<24) /* DMA 0 */ 11068c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_LM3S (1<<23) /* Location Monitor 3 */ 11078c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_LM2S (1<<22) /* Location Monitor 2 */ 11088c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_LM1S (1<<21) /* Location Monitor 1 */ 11098c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_LM0S (1<<20) /* Location Monitor 0 */ 11108c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_MB3S (1<<19) /* Mail Box 3 */ 11118c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_MB2S (1<<18) /* Mail Box 2 */ 11128c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_MB1S (1<<17) /* Mail Box 1 */ 11138c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_MB0S (1<<16) /* Mail Box 0 */ 11148c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_PERRS (1<<13) /* PCI/X Error */ 11158c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_VERRS (1<<12) /* VMEbus Error */ 11168c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_VIES (1<<11) /* VMEbus IRQ Edge */ 11178c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_IACKS (1<<10) /* IACK */ 11188c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_SYSFLS (1<<9) /* System Fail */ 11198c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_ACFLS (1<<8) /* AC Fail */ 11208c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_IRQ7S (1<<7) /* IRQ7 */ 11218c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_IRQ6S (1<<6) /* IRQ6 */ 11228c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_IRQ5S (1<<5) /* IRQ5 */ 11238c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_IRQ4S (1<<4) /* IRQ4 */ 11248c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_IRQ3S (1<<3) /* IRQ3 */ 11258c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_IRQ2S (1<<2) /* IRQ2 */ 11268c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTS_IRQ1S (1<<1) /* IRQ1 */ 11278c2ecf20Sopenharmony_ci 11288c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_INTS_LMS[4] = { TSI148_LCSR_INTS_LM0S, 11298c2ecf20Sopenharmony_ci TSI148_LCSR_INTS_LM1S, 11308c2ecf20Sopenharmony_ci TSI148_LCSR_INTS_LM2S, 11318c2ecf20Sopenharmony_ci TSI148_LCSR_INTS_LM3S }; 11328c2ecf20Sopenharmony_ci 11338c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_INTS_MBS[4] = { TSI148_LCSR_INTS_MB0S, 11348c2ecf20Sopenharmony_ci TSI148_LCSR_INTS_MB1S, 11358c2ecf20Sopenharmony_ci TSI148_LCSR_INTS_MB2S, 11368c2ecf20Sopenharmony_ci TSI148_LCSR_INTS_MB3S }; 11378c2ecf20Sopenharmony_ci 11388c2ecf20Sopenharmony_ci/* 11398c2ecf20Sopenharmony_ci * Interrupt Clear Register CRG + $44C 11408c2ecf20Sopenharmony_ci */ 11418c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_DMA1C (1<<25) /* DMA 1 */ 11428c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_DMA0C (1<<24) /* DMA 0 */ 11438c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_LM3C (1<<23) /* Location Monitor 3 */ 11448c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_LM2C (1<<22) /* Location Monitor 2 */ 11458c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_LM1C (1<<21) /* Location Monitor 1 */ 11468c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_LM0C (1<<20) /* Location Monitor 0 */ 11478c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_MB3C (1<<19) /* Mail Box 3 */ 11488c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_MB2C (1<<18) /* Mail Box 2 */ 11498c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_MB1C (1<<17) /* Mail Box 1 */ 11508c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_MB0C (1<<16) /* Mail Box 0 */ 11518c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_PERRC (1<<13) /* VMEbus Error */ 11528c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_VERRC (1<<12) /* VMEbus Access Time-out */ 11538c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_VIEC (1<<11) /* VMEbus IRQ Edge */ 11548c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_IACKC (1<<10) /* IACK */ 11558c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_SYSFLC (1<<9) /* System Fail */ 11568c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTC_ACFLC (1<<8) /* AC Fail */ 11578c2ecf20Sopenharmony_ci 11588c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_INTC_LMC[4] = { TSI148_LCSR_INTC_LM0C, 11598c2ecf20Sopenharmony_ci TSI148_LCSR_INTC_LM1C, 11608c2ecf20Sopenharmony_ci TSI148_LCSR_INTC_LM2C, 11618c2ecf20Sopenharmony_ci TSI148_LCSR_INTC_LM3C }; 11628c2ecf20Sopenharmony_ci 11638c2ecf20Sopenharmony_cistatic const int TSI148_LCSR_INTC_MBC[4] = { TSI148_LCSR_INTC_MB0C, 11648c2ecf20Sopenharmony_ci TSI148_LCSR_INTC_MB1C, 11658c2ecf20Sopenharmony_ci TSI148_LCSR_INTC_MB2C, 11668c2ecf20Sopenharmony_ci TSI148_LCSR_INTC_MB3C }; 11678c2ecf20Sopenharmony_ci 11688c2ecf20Sopenharmony_ci/* 11698c2ecf20Sopenharmony_ci * Interrupt Map Register 1 CRG + $458 11708c2ecf20Sopenharmony_ci */ 11718c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_DMA1M_M (3<<18) /* DMA 1 */ 11728c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_DMA0M_M (3<<16) /* DMA 0 */ 11738c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_LM3M_M (3<<14) /* Location Monitor 3 */ 11748c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_LM2M_M (3<<12) /* Location Monitor 2 */ 11758c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_LM1M_M (3<<10) /* Location Monitor 1 */ 11768c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_LM0M_M (3<<8) /* Location Monitor 0 */ 11778c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_MB3M_M (3<<6) /* Mail Box 3 */ 11788c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_MB2M_M (3<<4) /* Mail Box 2 */ 11798c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_MB1M_M (3<<2) /* Mail Box 1 */ 11808c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM1_MB0M_M (3<<0) /* Mail Box 0 */ 11818c2ecf20Sopenharmony_ci 11828c2ecf20Sopenharmony_ci/* 11838c2ecf20Sopenharmony_ci * Interrupt Map Register 2 CRG + $45C 11848c2ecf20Sopenharmony_ci */ 11858c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_PERRM_M (3<<26) /* PCI Bus Error */ 11868c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_VERRM_M (3<<24) /* VMEbus Error */ 11878c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_VIEM_M (3<<22) /* VMEbus IRQ Edge */ 11888c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_IACKM_M (3<<20) /* IACK */ 11898c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_SYSFLM_M (3<<18) /* System Fail */ 11908c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_ACFLM_M (3<<16) /* AC Fail */ 11918c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_IRQ7M_M (3<<14) /* IRQ7 */ 11928c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_IRQ6M_M (3<<12) /* IRQ6 */ 11938c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_IRQ5M_M (3<<10) /* IRQ5 */ 11948c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_IRQ4M_M (3<<8) /* IRQ4 */ 11958c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_IRQ3M_M (3<<6) /* IRQ3 */ 11968c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_IRQ2M_M (3<<4) /* IRQ2 */ 11978c2ecf20Sopenharmony_ci#define TSI148_LCSR_INTM2_IRQ1M_M (3<<2) /* IRQ1 */ 11988c2ecf20Sopenharmony_ci 11998c2ecf20Sopenharmony_ci/* 12008c2ecf20Sopenharmony_ci * DMA Control (0-1) Registers CRG + $500 12018c2ecf20Sopenharmony_ci */ 12028c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_ABT (1<<27) /* Abort */ 12038c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PAU (1<<26) /* Pause */ 12048c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_DGO (1<<25) /* DMA Go */ 12058c2ecf20Sopenharmony_ci 12068c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_MOD (1<<23) /* Mode */ 12078c2ecf20Sopenharmony_ci 12088c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_M (7<<12) /* VMEbus block Size MASK */ 12098c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_32 (0<<12) /* VMEbus block Size 32 */ 12108c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_64 (1<<12) /* VMEbus block Size 64 */ 12118c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_128 (2<<12) /* VMEbus block Size 128 */ 12128c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_256 (3<<12) /* VMEbus block Size 256 */ 12138c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_512 (4<<12) /* VMEbus block Size 512 */ 12148c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_1024 (5<<12) /* VMEbus block Size 1024 */ 12158c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_2048 (6<<12) /* VMEbus block Size 2048 */ 12168c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBKS_4096 (7<<12) /* VMEbus block Size 4096 */ 12178c2ecf20Sopenharmony_ci 12188c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_M (7<<8) /* VMEbus back-off MASK */ 12198c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_0 (0<<8) /* VMEbus back-off 0us */ 12208c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_1 (1<<8) /* VMEbus back-off 1us */ 12218c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_2 (2<<8) /* VMEbus back-off 2us */ 12228c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_4 (3<<8) /* VMEbus back-off 4us */ 12238c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_8 (4<<8) /* VMEbus back-off 8us */ 12248c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_16 (5<<8) /* VMEbus back-off 16us */ 12258c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_32 (6<<8) /* VMEbus back-off 32us */ 12268c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_VBOT_64 (7<<8) /* VMEbus back-off 64us */ 12278c2ecf20Sopenharmony_ci 12288c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_M (7<<4) /* PCI block size MASK */ 12298c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_32 (0<<4) /* PCI block size 32 bytes */ 12308c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_64 (1<<4) /* PCI block size 64 bytes */ 12318c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_128 (2<<4) /* PCI block size 128 bytes */ 12328c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_256 (3<<4) /* PCI block size 256 bytes */ 12338c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_512 (4<<4) /* PCI block size 512 bytes */ 12348c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_1024 (5<<4) /* PCI block size 1024 bytes */ 12358c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_2048 (6<<4) /* PCI block size 2048 bytes */ 12368c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBKS_4096 (7<<4) /* PCI block size 4096 bytes */ 12378c2ecf20Sopenharmony_ci 12388c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_M (7<<0) /* PCI back off MASK */ 12398c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_0 (0<<0) /* PCI back off 0us */ 12408c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_1 (1<<0) /* PCI back off 1us */ 12418c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_2 (2<<0) /* PCI back off 2us */ 12428c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_4 (3<<0) /* PCI back off 3us */ 12438c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_8 (4<<0) /* PCI back off 4us */ 12448c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_16 (5<<0) /* PCI back off 8us */ 12458c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_32 (6<<0) /* PCI back off 16us */ 12468c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCTL_PBOT_64 (7<<0) /* PCI back off 32us */ 12478c2ecf20Sopenharmony_ci 12488c2ecf20Sopenharmony_ci/* 12498c2ecf20Sopenharmony_ci * DMA Status Registers (0-1) CRG + $504 12508c2ecf20Sopenharmony_ci */ 12518c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA_SMA (1<<31) /* PCI Signalled Master Abt */ 12528c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA_RTA (1<<30) /* PCI Received Target Abt */ 12538c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA_MRC (1<<29) /* PCI Max Retry Count */ 12548c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA_VBE (1<<28) /* VMEbus error */ 12558c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA_ABT (1<<27) /* Abort */ 12568c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA_PAU (1<<26) /* Pause */ 12578c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA_DON (1<<25) /* Done */ 12588c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSTA_BSY (1<<24) /* Busy */ 12598c2ecf20Sopenharmony_ci 12608c2ecf20Sopenharmony_ci/* 12618c2ecf20Sopenharmony_ci * DMA Current Link Address Lower (0-1) 12628c2ecf20Sopenharmony_ci */ 12638c2ecf20Sopenharmony_ci#define TSI148_LCSR_DCLAL_M (0x3FFFFFF<<6) /* Mask */ 12648c2ecf20Sopenharmony_ci 12658c2ecf20Sopenharmony_ci/* 12668c2ecf20Sopenharmony_ci * DMA Source Attribute (0-1) Reg 12678c2ecf20Sopenharmony_ci */ 12688c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TYP_M (3<<28) /* Source Bus Type */ 12698c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TYP_PCI (0<<28) /* PCI Bus */ 12708c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TYP_VME (1<<28) /* VMEbus */ 12718c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TYP_PAT (2<<28) /* Data Pattern */ 12728c2ecf20Sopenharmony_ci 12738c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_PSZ (1<<25) /* Pattern Size */ 12748c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_NIN (1<<24) /* No Increment */ 12758c2ecf20Sopenharmony_ci 12768c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_2eSSTM_M (3<<11) /* 2eSST Trans Rate Mask */ 12778c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_2eSSTM_160 (0<<11) /* 160 MB/s */ 12788c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_2eSSTM_267 (1<<11) /* 267 MB/s */ 12798c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_2eSSTM_320 (2<<11) /* 320 MB/s */ 12808c2ecf20Sopenharmony_ci 12818c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TM_M (7<<8) /* Bus Transfer Protocol Mask */ 12828c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TM_SCT (0<<8) /* SCT */ 12838c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TM_BLT (1<<8) /* BLT */ 12848c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TM_MBLT (2<<8) /* MBLT */ 12858c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TM_2eVME (3<<8) /* 2eVME */ 12868c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TM_2eSST (4<<8) /* 2eSST */ 12878c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_TM_2eSSTB (5<<8) /* 2eSST Broadcast */ 12888c2ecf20Sopenharmony_ci 12898c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_DBW_M (3<<6) /* Max Data Width MASK */ 12908c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_DBW_16 (0<<6) /* 16 Bits */ 12918c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_DBW_32 (1<<6) /* 32 Bits */ 12928c2ecf20Sopenharmony_ci 12938c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_SUP (1<<5) /* Supervisory Mode */ 12948c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_PGM (1<<4) /* Program Mode */ 12958c2ecf20Sopenharmony_ci 12968c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_M (0xf<<0) /* Address Space Mask */ 12978c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_A16 (0<<0) /* A16 */ 12988c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_A24 (1<<0) /* A24 */ 12998c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_A32 (2<<0) /* A32 */ 13008c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_A64 (4<<0) /* A64 */ 13018c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_CRCSR (5<<0) /* CR/CSR */ 13028c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_USER1 (8<<0) /* User1 */ 13038c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_USER2 (9<<0) /* User2 */ 13048c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_USER3 (0xa<<0) /* User3 */ 13058c2ecf20Sopenharmony_ci#define TSI148_LCSR_DSAT_AMODE_USER4 (0xb<<0) /* User4 */ 13068c2ecf20Sopenharmony_ci 13078c2ecf20Sopenharmony_ci/* 13088c2ecf20Sopenharmony_ci * DMA Destination Attribute Registers (0-1) 13098c2ecf20Sopenharmony_ci */ 13108c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TYP_PCI (0<<28) /* Destination PCI Bus */ 13118c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TYP_VME (1<<28) /* Destination VMEbus */ 13128c2ecf20Sopenharmony_ci 13138c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_2eSSTM_M (3<<11) /* 2eSST Transfer Rate Mask */ 13148c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_2eSSTM_160 (0<<11) /* 160 MB/s */ 13158c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_2eSSTM_267 (1<<11) /* 267 MB/s */ 13168c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_2eSSTM_320 (2<<11) /* 320 MB/s */ 13178c2ecf20Sopenharmony_ci 13188c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TM_M (7<<8) /* Bus Transfer Protocol Mask */ 13198c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TM_SCT (0<<8) /* SCT */ 13208c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TM_BLT (1<<8) /* BLT */ 13218c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TM_MBLT (2<<8) /* MBLT */ 13228c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TM_2eVME (3<<8) /* 2eVME */ 13238c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TM_2eSST (4<<8) /* 2eSST */ 13248c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_TM_2eSSTB (5<<8) /* 2eSST Broadcast */ 13258c2ecf20Sopenharmony_ci 13268c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_DBW_M (3<<6) /* Max Data Width MASK */ 13278c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_DBW_16 (0<<6) /* 16 Bits */ 13288c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_DBW_32 (1<<6) /* 32 Bits */ 13298c2ecf20Sopenharmony_ci 13308c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_SUP (1<<5) /* Supervisory/User Access */ 13318c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_PGM (1<<4) /* Program/Data Access */ 13328c2ecf20Sopenharmony_ci 13338c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_M (0xf<<0) /* Address Space Mask */ 13348c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_A16 (0<<0) /* A16 */ 13358c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_A24 (1<<0) /* A24 */ 13368c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_A32 (2<<0) /* A32 */ 13378c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_A64 (4<<0) /* A64 */ 13388c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_CRCSR (5<<0) /* CRC/SR */ 13398c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_USER1 (8<<0) /* User1 */ 13408c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_USER2 (9<<0) /* User2 */ 13418c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_USER3 (0xa<<0) /* User3 */ 13428c2ecf20Sopenharmony_ci#define TSI148_LCSR_DDAT_AMODE_USER4 (0xb<<0) /* User4 */ 13438c2ecf20Sopenharmony_ci 13448c2ecf20Sopenharmony_ci/* 13458c2ecf20Sopenharmony_ci * DMA Next Link Address Lower 13468c2ecf20Sopenharmony_ci */ 13478c2ecf20Sopenharmony_ci#define TSI148_LCSR_DNLAL_DNLAL_M (0x3FFFFFF<<6) /* Address Mask */ 13488c2ecf20Sopenharmony_ci#define TSI148_LCSR_DNLAL_LLA (1<<0) /* Last Link Address Indicator */ 13498c2ecf20Sopenharmony_ci 13508c2ecf20Sopenharmony_ci/* 13518c2ecf20Sopenharmony_ci * DMA 2eSST Broadcast Select 13528c2ecf20Sopenharmony_ci */ 13538c2ecf20Sopenharmony_ci#define TSI148_LCSR_DBS_M (0x1FFFFF<<0) /* Mask */ 13548c2ecf20Sopenharmony_ci 13558c2ecf20Sopenharmony_ci/* 13568c2ecf20Sopenharmony_ci * GCSR Register Group 13578c2ecf20Sopenharmony_ci */ 13588c2ecf20Sopenharmony_ci 13598c2ecf20Sopenharmony_ci/* 13608c2ecf20Sopenharmony_ci * GCSR Control and Status Register CRG + $604 13618c2ecf20Sopenharmony_ci */ 13628c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_LRST (1<<15) /* Local Reset */ 13638c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_SFAILEN (1<<14) /* System Fail enable */ 13648c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_BDFAILS (1<<13) /* Board Fail Status */ 13658c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_SCON (1<<12) /* System Copntroller */ 13668c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_MEN (1<<11) /* Module Enable (READY) */ 13678c2ecf20Sopenharmony_ci 13688c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_LMI3S (1<<7) /* Loc Monitor 3 Int Status */ 13698c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_LMI2S (1<<6) /* Loc Monitor 2 Int Status */ 13708c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_LMI1S (1<<5) /* Loc Monitor 1 Int Status */ 13718c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_LMI0S (1<<4) /* Loc Monitor 0 Int Status */ 13728c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_MBI3S (1<<3) /* Mail box 3 Int Status */ 13738c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_MBI2S (1<<2) /* Mail box 2 Int Status */ 13748c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_MBI1S (1<<1) /* Mail box 1 Int Status */ 13758c2ecf20Sopenharmony_ci#define TSI148_GCSR_GCTRL_MBI0S (1<<0) /* Mail box 0 Int Status */ 13768c2ecf20Sopenharmony_ci 13778c2ecf20Sopenharmony_ci#define TSI148_GCSR_GAP (1<<5) /* Geographic Addr Parity */ 13788c2ecf20Sopenharmony_ci#define TSI148_GCSR_GA_M (0x1F<<0) /* Geographic Address Mask */ 13798c2ecf20Sopenharmony_ci 13808c2ecf20Sopenharmony_ci/* 13818c2ecf20Sopenharmony_ci * CR/CSR Register Group 13828c2ecf20Sopenharmony_ci */ 13838c2ecf20Sopenharmony_ci 13848c2ecf20Sopenharmony_ci/* 13858c2ecf20Sopenharmony_ci * CR/CSR Bit Clear Register CRG + $FF4 13868c2ecf20Sopenharmony_ci */ 13878c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBCR_LRSTC (1<<7) /* Local Reset Clear */ 13888c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBCR_SFAILC (1<<6) /* System Fail Enable Clear */ 13898c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBCR_BDFAILS (1<<5) /* Board Fail Status */ 13908c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBCR_MENC (1<<4) /* Module Enable Clear */ 13918c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBCR_BERRSC (1<<3) /* Bus Error Status Clear */ 13928c2ecf20Sopenharmony_ci 13938c2ecf20Sopenharmony_ci/* 13948c2ecf20Sopenharmony_ci * CR/CSR Bit Set Register CRG+$FF8 13958c2ecf20Sopenharmony_ci */ 13968c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBSR_LISTS (1<<7) /* Local Reset Clear */ 13978c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBSR_SFAILS (1<<6) /* System Fail Enable Clear */ 13988c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBSR_BDFAILS (1<<5) /* Board Fail Status */ 13998c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBSR_MENS (1<<4) /* Module Enable Clear */ 14008c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CSRBSR_BERRS (1<<3) /* Bus Error Status Clear */ 14018c2ecf20Sopenharmony_ci 14028c2ecf20Sopenharmony_ci/* 14038c2ecf20Sopenharmony_ci * CR/CSR Base Address Register CRG + FFC 14048c2ecf20Sopenharmony_ci */ 14058c2ecf20Sopenharmony_ci#define TSI148_CRCSR_CBAR_M (0x1F<<3) /* Mask */ 14068c2ecf20Sopenharmony_ci 14078c2ecf20Sopenharmony_ci#endif /* TSI148_H */ 1408