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 * $FreeBSD$ 32 */ 33 34#ifndef _ARM64_CORESIGHT_CORESIGHT_FUNNEL_H_ 35#define _ARM64_CORESIGHT_CORESIGHT_FUNNEL_H_ 36 37#define FUNNEL_FUNCTL 0x000 /* Funnel Control Register */ 38#define FUNCTL_HOLDTIME_SHIFT 8 39#define FUNCTL_HOLDTIME_MASK (0xf << FUNCTL_HOLDTIME_SHIFT) 40#define FUNNEL_PRICTL 0x004 /* Priority Control Register */ 41#define FUNNEL_ITATBDATA0 0xEEC /* Integration Register, ITATBDATA0 */ 42#define FUNNEL_ITATBCTR2 0xEF0 /* Integration Register, ITATBCTR2 */ 43#define FUNNEL_ITATBCTR1 0xEF4 /* Integration Register, ITATBCTR1 */ 44#define FUNNEL_ITATBCTR0 0xEF8 /* Integration Register, ITATBCTR0 */ 45#define FUNNEL_IMCR 0xF00 /* Integration Mode Control Register */ 46#define FUNNEL_CTSR 0xFA0 /* Claim Tag Set Register */ 47#define FUNNEL_CTCR 0xFA4 /* Claim Tag Clear Register */ 48#define FUNNEL_LOCKACCESS 0xFB0 /* Lock Access */ 49#define FUNNEL_LOCKSTATUS 0xFB4 /* Lock Status */ 50#define FUNNEL_AUTHSTATUS 0xFB8 /* Authentication status */ 51#define FUNNEL_DEVICEID 0xFC8 /* Device ID */ 52#define FUNNEL_DEVICETYPE 0xFCC /* Device Type Identifier */ 53#define FUNNEL_PERIPH4 0xFD0 /* Peripheral ID4 */ 54#define FUNNEL_PERIPH5 0xFD4 /* Peripheral ID5 */ 55#define FUNNEL_PERIPH6 0xFD8 /* Peripheral ID6 */ 56#define FUNNEL_PERIPH7 0xFDC /* Peripheral ID7 */ 57#define FUNNEL_PERIPH0 0xFE0 /* Peripheral ID0 */ 58#define FUNNEL_PERIPH1 0xFE4 /* Peripheral ID1 */ 59#define FUNNEL_PERIPH2 0xFE8 /* Peripheral ID2 */ 60#define FUNNEL_PERIPH3 0xFEC /* Peripheral ID3 */ 61#define FUNNEL_COMP0 0xFF0 /* Component ID0 */ 62#define FUNNEL_COMP1 0xFF4 /* Component ID1 */ 63#define FUNNEL_COMP2 0xFF8 /* Component ID2 */ 64#define FUNNEL_COMP3 0xFFC /* Component ID3 */ 65 66#define HWTYPE_NONE 0 67#define HWTYPE_FUNNEL 1 68#define HWTYPE_STATIC_FUNNEL 2 69 70DECLARE_CLASS(funnel_driver); 71 72struct funnel_softc { 73 struct resource *res; 74 struct coresight_platform_data *pdata; 75 int hwtype; 76}; 77 78int funnel_attach(device_t dev); 79 80#endif /* !_ARM64_CORESIGHT_CORESIGHT_FUNNEL_H_ */ 81