1 /*- 2 * Copyright (c) 2018-2020 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * This software was developed by BAE Systems, the University of Cambridge 6 * Computer Laboratory, and Memorial University under DARPA/AFRL contract 7 * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing 8 * (TC) research program. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32 #ifndef _ARM64_CORESIGHT_CORESIGHT_FUNNEL_H_ 33 #define _ARM64_CORESIGHT_CORESIGHT_FUNNEL_H_ 34 35 #define FUNNEL_FUNCTL 0x000 /* Funnel Control Register */ 36 #define FUNCTL_HOLDTIME_SHIFT 8 37 #define FUNCTL_HOLDTIME_MASK (0xf << FUNCTL_HOLDTIME_SHIFT) 38 #define FUNNEL_PRICTL 0x004 /* Priority Control Register */ 39 #define FUNNEL_ITATBDATA0 0xEEC /* Integration Register, ITATBDATA0 */ 40 #define FUNNEL_ITATBCTR2 0xEF0 /* Integration Register, ITATBCTR2 */ 41 #define FUNNEL_ITATBCTR1 0xEF4 /* Integration Register, ITATBCTR1 */ 42 #define FUNNEL_ITATBCTR0 0xEF8 /* Integration Register, ITATBCTR0 */ 43 #define FUNNEL_IMCR 0xF00 /* Integration Mode Control Register */ 44 #define FUNNEL_CTSR 0xFA0 /* Claim Tag Set Register */ 45 #define FUNNEL_CTCR 0xFA4 /* Claim Tag Clear Register */ 46 #define FUNNEL_LOCKACCESS 0xFB0 /* Lock Access */ 47 #define FUNNEL_LOCKSTATUS 0xFB4 /* Lock Status */ 48 #define FUNNEL_AUTHSTATUS 0xFB8 /* Authentication status */ 49 #define FUNNEL_DEVICEID 0xFC8 /* Device ID */ 50 #define FUNNEL_DEVICETYPE 0xFCC /* Device Type Identifier */ 51 #define FUNNEL_PERIPH4 0xFD0 /* Peripheral ID4 */ 52 #define FUNNEL_PERIPH5 0xFD4 /* Peripheral ID5 */ 53 #define FUNNEL_PERIPH6 0xFD8 /* Peripheral ID6 */ 54 #define FUNNEL_PERIPH7 0xFDC /* Peripheral ID7 */ 55 #define FUNNEL_PERIPH0 0xFE0 /* Peripheral ID0 */ 56 #define FUNNEL_PERIPH1 0xFE4 /* Peripheral ID1 */ 57 #define FUNNEL_PERIPH2 0xFE8 /* Peripheral ID2 */ 58 #define FUNNEL_PERIPH3 0xFEC /* Peripheral ID3 */ 59 #define FUNNEL_COMP0 0xFF0 /* Component ID0 */ 60 #define FUNNEL_COMP1 0xFF4 /* Component ID1 */ 61 #define FUNNEL_COMP2 0xFF8 /* Component ID2 */ 62 #define FUNNEL_COMP3 0xFFC /* Component ID3 */ 63 64 #define HWTYPE_NONE 0 65 #define HWTYPE_FUNNEL 1 66 #define HWTYPE_STATIC_FUNNEL 2 67 68 DECLARE_CLASS(funnel_driver); 69 70 struct funnel_softc { 71 struct resource *res; 72 struct coresight_platform_data *pdata; 73 int hwtype; 74 }; 75 76 int funnel_attach(device_t dev); 77 78 #endif /* !_ARM64_CORESIGHT_CORESIGHT_FUNNEL_H_ */ 79