// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2015 - Ben Herrenschmidt, IBM Corp. * * Driver for Aspeed "new" VIC as found in SoC generation 3 and later * * Based on irq-vic.c: * * Copyright (C) 1999 - 2003 ARM Limited * Copyright (C) 2000 Deep Blue Solutions Ltd
*/
/* These definitions correspond to the "new mapping" of the * register set that interleaves "high" and "low". The offsets * below are for the "low" register, add 4 to get to the high one
*/ #define AVIC_IRQ_STATUS 0x00 #define AVIC_FIQ_STATUS 0x08 #define AVIC_RAW_STATUS 0x10 #define AVIC_INT_SELECT 0x18 #define AVIC_INT_ENABLE 0x20 #define AVIC_INT_ENABLE_CLR 0x28 #define AVIC_INT_TRIGGER 0x30 #define AVIC_INT_TRIGGER_CLR 0x38 #define AVIC_INT_SENSE 0x40 #define AVIC_INT_DUAL_EDGE 0x48 #define AVIC_INT_EVENT 0x50 #define AVIC_EDGE_CLR 0x58 #define AVIC_EDGE_STATUS 0x60
/* Make sure no soft trigger is on */
writel(0xffffffff, vic->base + AVIC_INT_TRIGGER_CLR);
writel(0xffffffff, vic->base + AVIC_INT_TRIGGER_CLR + 4);
/* Set everything to be IRQ */
writel(0, vic->base + AVIC_INT_SELECT);
writel(0, vic->base + AVIC_INT_SELECT + 4);
/* Some interrupts have a programmable high/low level trigger * (4 GPIO direct inputs), for now we assume this was configured * by firmware. We read which ones are edge now.
*/
sense = readl(vic->base + AVIC_INT_SENSE);
vic->edge_sources[0] = ~sense;
sense = readl(vic->base + AVIC_INT_SENSE + 4);
vic->edge_sources[1] = ~sense;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.