fdt.h revision 226496
1226496Sjchandra/*- 2226496Sjchandra * Copyright (c) 2010 The FreeBSD Foundation 3226496Sjchandra * All rights reserved. 4226496Sjchandra * 5226496Sjchandra * This software was developed by Semihalf under sponsorship from 6226496Sjchandra * the FreeBSD Foundation. 7226496Sjchandra * 8226496Sjchandra * Redistribution and use in source and binary forms, with or without 9226496Sjchandra * modification, are permitted provided that the following conditions 10226496Sjchandra * are met: 11226496Sjchandra * 1. Redistributions of source code must retain the above copyright 12226496Sjchandra * notice, this list of conditions and the following disclaimer. 13226496Sjchandra * 2. Redistributions in binary form must reproduce the above copyright 14226496Sjchandra * notice, this list of conditions and the following disclaimer in the 15226496Sjchandra * documentation and/or other materials provided with the distribution. 16226496Sjchandra * 17226496Sjchandra * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18226496Sjchandra * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19226496Sjchandra * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20226496Sjchandra * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21226496Sjchandra * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22226496Sjchandra * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23226496Sjchandra * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24226496Sjchandra * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25226496Sjchandra * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26226496Sjchandra * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27226496Sjchandra * SUCH DAMAGE. 28226496Sjchandra * 29226496Sjchandra * $FreeBSD: head/sys/mips/include/fdt.h 226496 2011-10-18 07:29:21Z jchandra $ 30226496Sjchandra */ 31226496Sjchandra 32226496Sjchandra#ifndef _MACHINE_FDT_H_ 33226496Sjchandra#define _MACHINE_FDT_H_ 34226496Sjchandra 35226496Sjchandra#include <machine/bus.h> 36226496Sjchandra#include <machine/intr_machdep.h> 37226496Sjchandra 38226496Sjchandra/* Max interrupt number */ 39226496Sjchandra#if defined(CPU_RMI) || defined(CPU_NLM) 40226496Sjchandra#define FDT_INTR_MAX XLR_MAX_INTR 41226496Sjchandra#else 42226496Sjchandra#define FDT_INTR_MAX (NHARD_IRQS + NSOFT_IRQS) 43226496Sjchandra#endif 44226496Sjchandra 45226496Sjchandra/* Map phandle/intpin pair to global IRQ number */ 46226496Sjchandra#define FDT_MAP_IRQ(node, pin) (pin) 47226496Sjchandra 48226496Sjchandra/* 49226496Sjchandra * Bus space tag. XXX endianess info needs to be derived from the blob. 50226496Sjchandra */ 51226496Sjchandra#define fdtbus_bs_tag NULL 52226496Sjchandra 53226496Sjchandra#endif /* _MACHINE_FDT_H_ */ 54