1209130Sraj/*- 2209130Sraj * Copyright (c) 2010 The FreeBSD Foundation 3209130Sraj * All rights reserved. 4209130Sraj * 5209130Sraj * This software was developed by Semihalf under sponsorship from 6209130Sraj * the FreeBSD Foundation. 7209130Sraj * 8209130Sraj * Redistribution and use in source and binary forms, with or without 9209130Sraj * modification, are permitted provided that the following conditions 10209130Sraj * are met: 11209130Sraj * 1. Redistributions of source code must retain the above copyright 12209130Sraj * notice, this list of conditions and the following disclaimer. 13209130Sraj * 2. Redistributions in binary form must reproduce the above copyright 14209130Sraj * notice, this list of conditions and the following disclaimer in the 15209130Sraj * documentation and/or other materials provided with the distribution. 16209130Sraj * 17209130Sraj * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18209130Sraj * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19209130Sraj * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20209130Sraj * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21209130Sraj * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22209130Sraj * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23209130Sraj * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24209130Sraj * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25209130Sraj * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26209130Sraj * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27209130Sraj * SUCH DAMAGE. 28209130Sraj * 29209130Sraj * $FreeBSD: releng/10.3/sys/arm/include/fdt.h 266084 2014-05-14 19:18:58Z ian $ 30209130Sraj */ 31209130Sraj 32209130Sraj#ifndef _MACHINE_FDT_H_ 33209130Sraj#define _MACHINE_FDT_H_ 34209130Sraj 35209130Sraj#include <dev/ofw/openfirm.h> 36209130Sraj 37209130Sraj#include <vm/vm.h> 38209130Sraj#include <vm/pmap.h> 39209130Sraj 40210247Sraj#include <machine/bus.h> 41209130Sraj#include <machine/intr.h> 42209130Sraj 43209130Sraj/* Max interrupt number */ 44209130Sraj#define FDT_INTR_MAX NIRQ 45209130Sraj 46236992Simp/* Map phandle/intpin pair to global IRQ number */ 47218073Smarcel#define FDT_MAP_IRQ(node, pin) (pin) 48218073Smarcel 49209130Sraj/* 50209130Sraj * Bus space tag. XXX endianess info needs to be derived from the blob. 51209130Sraj */ 52209130Srajextern bus_space_tag_t fdtbus_bs_tag; 53209130Sraj 54259364Sianstruct arm_devmap_entry; 55259364Sian 56259364Sianint fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); 57209130Sraj 58209130Sraj#endif /* _MACHINE_FDT_H_ */ 59