1 |
/* $MidnightBSD$ */ |
2 |
/*- |
3 |
* Copyright (c) 2014 Andrew Turner <andrew@FreeBSD.org> |
4 |
* All rights reserved. |
5 |
* |
6 |
* Redistribution and use in source and binary forms, with or without |
7 |
* modification, are permitted provided that the following conditions |
8 |
* are met: |
9 |
* 1. Redistributions of source code must retain the above copyright |
10 |
* notice, this list of conditions and the following disclaimer. |
11 |
* 2. Redistributions in binary form must reproduce the above copyright |
12 |
* notice, this list of conditions and the following disclaimer in the |
13 |
* documentation and/or other materials provided with the distribution. |
14 |
* |
15 |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
16 |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
17 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
18 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
19 |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
20 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
21 |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
22 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
23 |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
24 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
25 |
* SUCH DAMAGE. |
26 |
* |
27 |
* $FreeBSD: stable/10/sys/boot/fdt/fdt_platform.h 275763 2014-12-14 15:33:45Z andrew $ |
28 |
*/ |
29 |
|
30 |
#ifndef FDT_PLATFORM_H |
31 |
#define FDT_PLATFORM_H |
32 |
|
33 |
struct fdt_header; |
34 |
|
35 |
struct fdt_mem_region { |
36 |
unsigned long start; |
37 |
unsigned long size; |
38 |
}; |
39 |
|
40 |
#define TMP_MAX_ETH 8 |
41 |
|
42 |
int fdt_copy(vm_offset_t); |
43 |
void fdt_fixup_cpubusfreqs(unsigned long, unsigned long); |
44 |
void fdt_fixup_ethernet(const char *, char *, int); |
45 |
void fdt_fixup_memory(struct fdt_mem_region *, size_t); |
46 |
void fdt_fixup_stdout(const char *); |
47 |
int fdt_load_dtb_addr(struct fdt_header *); |
48 |
int fdt_load_dtb_file(const char *); |
49 |
int fdt_setup_fdtp(void); |
50 |
|
51 |
/* The platform library needs to implement these functions */ |
52 |
int fdt_platform_load_dtb(void); |
53 |
void fdt_platform_fixups(void); |
54 |
|
55 |
#endif /* FDT_PLATFORM_H */ |