fdt.h revision 250840
1250840Smarcel/*-
2250840Smarcel * Copyright (c) 2013 Juniper Networks, Inc.
3250840Smarcel * All rights reserved.
4250840Smarcel *
5250840Smarcel * Redistribution and use in source and binary forms, with or without
6250840Smarcel * modification, are permitted provided that the following conditions
7250840Smarcel * are met:
8250840Smarcel * 1. Redistributions of source code must retain the above copyright
9250840Smarcel *    notice, this list of conditions and the following disclaimer.
10250840Smarcel * 2. Redistributions in binary form must reproduce the above copyright
11250840Smarcel *    notice, this list of conditions and the following disclaimer in the
12250840Smarcel *    documentation and/or other materials provided with the distribution.
13250840Smarcel *
14250840Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15250840Smarcel * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16250840Smarcel * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17250840Smarcel * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18250840Smarcel * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19250840Smarcel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20250840Smarcel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21250840Smarcel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22250840Smarcel * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23250840Smarcel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24250840Smarcel * SUCH DAMAGE.
25250840Smarcel *
26250840Smarcel * $FreeBSD: head/sys/x86/include/fdt.h 250840 2013-05-21 03:05:49Z marcel $
27250840Smarcel */
28250840Smarcel
29250840Smarcel#ifndef _MACHINE_FDT_H_
30250840Smarcel#define _MACHINE_FDT_H_
31250840Smarcel
32250840Smarcel#include <machine/intr_machdep.h>
33250840Smarcel#include <x86/bus.h>
34250840Smarcel
35250840Smarcel/* Max interrupt number. */
36250840Smarcel#define FDT_INTR_MAX	NUM_IO_INTS
37250840Smarcel
38250840Smarcel/* Map phandle/intpin pair to global IRQ number */
39250840Smarcel#define	FDT_MAP_IRQ(node, pin)	\
40250840Smarcel	    (panic("%s: FDT_MAP_IRQ(%#x, %#x)", __func__, node, pin), -1)
41250840Smarcel
42250840Smarcel/* Bus space tag. XXX we only support I/O port space this way. */
43250840Smarcel#define fdtbus_bs_tag	X86_BUS_SPACE_IO
44250840Smarcel
45250840Smarcelstruct mem_region {
46250840Smarcel	vm_offset_t	mr_start;
47250840Smarcel	vm_size_t	mr_size;
48250840Smarcel};
49250840Smarcel
50250840Smarcel__BEGIN_DECLS
51250840Smarcelint x86_init_fdt(void);
52250840Smarcel__END_DECLS
53250840Smarcel
54250840Smarcel#endif /* _MACHINE_FDT_H_ */
55