1209908Sraj/*- 2209908Sraj * Copyright (c) 2010 The FreeBSD Foundation 3209908Sraj * All rights reserved. 4209908Sraj * 5209908Sraj * This software was developed by Semihalf under sponsorship from 6209908Sraj * the FreeBSD Foundation. 7209908Sraj * 8209908Sraj * Redistribution and use in source and binary forms, with or without 9209908Sraj * modification, are permitted provided that the following conditions 10209908Sraj * are met: 11209908Sraj * 1. Redistributions of source code must retain the above copyright 12209908Sraj * notice, this list of conditions and the following disclaimer. 13209908Sraj * 2. Redistributions in binary form must reproduce the above copyright 14209908Sraj * notice, this list of conditions and the following disclaimer in the 15209908Sraj * documentation and/or other materials provided with the distribution. 16209908Sraj * 17209908Sraj * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18209908Sraj * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19209908Sraj * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20209908Sraj * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21209908Sraj * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22209908Sraj * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23209908Sraj * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24209908Sraj * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25209908Sraj * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26209908Sraj * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27209908Sraj * SUCH DAMAGE. 28209908Sraj * 29209908Sraj * $FreeBSD$ 30209908Sraj */ 31209908Sraj 32209908Sraj#ifndef _MACHINE_FDT_H_ 33209908Sraj#define _MACHINE_FDT_H_ 34209908Sraj 35209908Sraj#include <machine/bus.h> 36209908Sraj#include <machine/intr_machdep.h> 37209908Sraj 38209908Sraj/* Max interrupt number */ 39209908Sraj#define FDT_INTR_MAX INTR_VECTORS 40209908Sraj 41218073Smarcel/* Map phandle/intpin pair to global IRQ number */ 42218073Smarcel#define FDT_MAP_IRQ(node, pin) powerpc_get_irq(node, pin) 43218073Smarcel 44209908Sraj/* 45209908Sraj * Bus space tag. XXX endianess info needs to be derived from the blob. 46209908Sraj */ 47209908Sraj#define fdtbus_bs_tag (&bs_be_tag) 48209908Sraj 49209908Sraj#endif /* _MACHINE_FDT_H_ */ 50