1139825Simp/*- 299651Sbenno * Copyright (C) 2002 Benno Rice. 399651Sbenno * All rights reserved. 499651Sbenno * 599651Sbenno * Redistribution and use in source and binary forms, with or without 699651Sbenno * modification, are permitted provided that the following conditions 799651Sbenno * are met: 899651Sbenno * 1. Redistributions of source code must retain the above copyright 999651Sbenno * notice, this list of conditions and the following disclaimer. 1099651Sbenno * 2. Redistributions in binary form must reproduce the above copyright 1199651Sbenno * notice, this list of conditions and the following disclaimer in the 1299651Sbenno * documentation and/or other materials provided with the distribution. 1399651Sbenno * 1499651Sbenno * THIS SOFTWARE IS PROVIDED BY Benno Rice ``AS IS'' AND ANY EXPRESS OR 1599651Sbenno * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1699651Sbenno * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1799651Sbenno * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1899651Sbenno * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 1999651Sbenno * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 2099651Sbenno * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 2199651Sbenno * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 2299651Sbenno * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 2399651Sbenno * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2499651Sbenno * 2599651Sbenno * $FreeBSD: releng/10.2/sys/powerpc/include/intr_machdep.h 265969 2014-05-13 18:06:26Z ian $ 2699651Sbenno */ 2799651Sbenno 2899651Sbenno#ifndef _MACHINE_INTR_MACHDEP_H_ 2999651Sbenno#define _MACHINE_INTR_MACHDEP_H_ 3099651Sbenno 31171805Smarcel#define INTR_VECTORS 256 3299651Sbenno 33218075Smarcel#define MAX_PICS 5 34218184Smarcel#define MAP_IRQ(node, pin) powerpc_get_irq(node, pin) 35209298Snwhitehorn 36208149Snwhitehorn/* 37208149Snwhitehorn * Default base address for MSI messages on PowerPC 38208149Snwhitehorn */ 39208149Snwhitehorn#define MSI_INTEL_ADDR_BASE 0xfee00000 40208149Snwhitehorn 41209298Snwhitehornextern device_t root_pic; 4299651Sbenno 43171805Smarcelstruct trapframe; 4499651Sbenno 45176208Smarceldriver_filter_t powerpc_ipi_handler; 46171785Smarcel 47212453Smavvoid intrcnt_add(const char *name, u_long **countp); 48212453Smav 49218075Smarcelvoid powerpc_register_pic(device_t, uint32_t, u_int, u_int, u_int); 50218075Smarcelu_int powerpc_get_irq(uint32_t, u_int); 51176208Smarcel 52171805Smarcelvoid powerpc_dispatch_intr(u_int, struct trapframe *); 53171805Smarcelint powerpc_enable_intr(void); 54209298Snwhitehornint powerpc_setup_intr(const char *, u_int, driver_filter_t, driver_intr_t, 55209298Snwhitehorn void *, enum intr_type, void **); 56171805Smarcelint powerpc_teardown_intr(void *); 57209486Snwhitehornint powerpc_bind_intr(u_int irq, u_char cpu); 58176918Smarcelint powerpc_config_intr(int, enum intr_trigger, enum intr_polarity); 59265969Sianint powerpc_fw_config_intr(int irq, int sense_code); 6099651Sbenno 6199651Sbenno#endif /* _MACHINE_INTR_MACHDEP_H_ */ 62